Skip to content

Commit

Permalink
Merge pull request #549 from oat-sa/release-5.5.0
Browse files Browse the repository at this point in the history
Release 5.5.0
  • Loading branch information
ssipasseuth authored Aug 12, 2016
2 parents 0d3aba5 + d9d3182 commit a67d79a
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions scripts/update/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
* @author Jean-S�bastien Conan <[email protected]>
*/
class Updater extends \common_ext_ExtensionUpdater {

/**
*
*
* @param string $initialVersion
* @return string $versionUpdatedTo
*/
public function update($initialVersion) {

$currentVersion = $initialVersion;

// add testrunner config
if ($currentVersion == '2.6') {

Expand All @@ -59,15 +59,15 @@ public function update($initialVersion) {

$currentVersion = '2.6.1';
}

if ($currentVersion == '2.6.1') {
$config = \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest')->getConfig('testRunner');
$config['exitButton'] = false;
\common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest')->setConfig('testRunner', $config);

$currentVersion = '2.6.2';
}

// add testrunner review screen config
if ($currentVersion == '2.6.2') {
$extension = \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest');
Expand All @@ -81,7 +81,7 @@ public function update($initialVersion) {

$currentVersion = '2.6.3';
}

// adjust testrunner config
if ($currentVersion == '2.6.3') {
$defaultConfig = array(
Expand Down Expand Up @@ -118,13 +118,13 @@ public function update($initialVersion) {
// add markForReview button
if ($currentVersion === '2.7.0') {
$registry = TestRunnerClientConfigRegistry::getRegistry();

$registry->registerQtiTools('markForReview', array(
'label' => 'Mark for review',
'icon' => 'anchor',
'hook' => 'taoQtiTest/testRunner/actionBar/markForReview'
));

$currentVersion = '2.8.0';
}

Expand All @@ -143,7 +143,7 @@ public function update($initialVersion) {
// adjust testrunner config: set the "can collapse" option
if ($currentVersion == '2.9.0') {
$registry = TestRunnerClientConfigRegistry::getRegistry();

$registry->registerQtiTools('collapseReview', array(
'title' => 'Show/Hide the review screen',
'label' => 'Review',
Expand Down Expand Up @@ -184,7 +184,7 @@ public function update($initialVersion) {

$currentVersion = '2.12.0';
}

// update the test taker review action buttons
if ($currentVersion == '2.12.0') {
$registry = TestRunnerClientConfigRegistry::getRegistry();
Expand Down Expand Up @@ -217,7 +217,7 @@ public function update($initialVersion) {

$currentVersion = '2.14.0';
}

if ($currentVersion === '2.14.0') {
try {
$this->getServiceManager()->get('taoQtiTest/SessionStateService');
Expand All @@ -239,7 +239,7 @@ public function update($initialVersion) {

$currentVersion = '2.16.0';
}

$this->setVersion($currentVersion);

if ($this->isBetween('2.16.0','2.17.0')) {
Expand All @@ -255,12 +255,12 @@ public function update($initialVersion) {

$this->getServiceManager()->register(QtiRunnerService::CONFIG_ID, $service);
}

$this->setVersion('2.17.0');
}

$this->skip('2.17.0','2.19.1');

if ($this->isVersion('2.19.1')) {
// sets default plugin options
$extension = \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest');
Expand Down Expand Up @@ -293,7 +293,7 @@ public function update($initialVersion) {

$this->setVersion('2.23.0');
}

$this->skip('2.23.0','2.24.0');

if ($this->isVersion('2.24.0')) {
Expand Down Expand Up @@ -325,7 +325,7 @@ public function update($initialVersion) {

$this->setVersion('2.26.0');
}

$this->skip('2.26.0', '2.27.0');

if ($this->isVersion('2.27.0')) {
Expand Down Expand Up @@ -427,10 +427,10 @@ public function update($initialVersion) {
'params' => []
],
]);

$extension->setConfig('testRunner', $config);
}

$this->setVersion('2.31.1');
}

Expand Down Expand Up @@ -518,9 +518,9 @@ public function update($initialVersion) {
$this->setVersion('5.0.0');
}

$this->skip('5.0.0', '5.3.0');
$this->skip('5.0.0', '5.4.0');

if ($this->isVersion('5.3.0')) {
if ($this->isVersion('5.4.0')) {

$extension = \common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiTest');
$config = $extension->getConfig('testRunner');
Expand Down

0 comments on commit a67d79a

Please sign in to comment.