diff --git a/actions/class.Creator.php b/actions/class.Creator.php
index 3c86bf77f4..d775614da9 100755
--- a/actions/class.Creator.php
+++ b/actions/class.Creator.php
@@ -18,6 +18,7 @@
*/
use oat\taoQtiTest\models\TestCategoryPresetProvider;
use oat\taoQtiTest\models\TestModelService;
+use oat\taoQtiTest\models\runner\config\QtiRunnerConfig;
/**
* QTI test Creator Controller.
@@ -56,6 +57,10 @@ public function index(){
}
$this->setData('identifierUrl', _url('getIdentifier', null, null, array('uri' => $testUri)));
+ $testConfig = $this->getServiceManager()->get(QtiRunnerConfig::SERVICE_ID);
+ $this->setData('enableAllowSkipping', $testConfig->getConfigValue('enableAllowSkipping'));
+ $this->setData('enableValidateResponses', $testConfig->getConfigValue('enableValidateResponses'));
+
$this->setView('creator.tpl');
}
diff --git a/manifest.php b/manifest.php
index aa927c5ac9..97e6c3bd66 100755
--- a/manifest.php
+++ b/manifest.php
@@ -29,7 +29,7 @@
'label' => 'QTI test model',
'description' => 'TAO QTI test implementation',
'license' => 'GPL-2.0',
- 'version' => '15.11.1',
+ 'version' => '15.11.2',
'author' => 'Open Assessment Technologies',
'requires' => array(
'taoTests' => '>=6.4.0',
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index 1e6f476402..c0ebc77a94 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -1589,6 +1589,6 @@ public function update($initialVersion) {
$this->setVersion('14.1.5');
}
- $this->skip('14.1.5', '15.11.1');
+ $this->skip('14.1.5', '15.11.2');
}
}
diff --git a/views/js/controller/creator/creator.js b/views/js/controller/creator/creator.js
index ccb4f47ce8..b755e6f340 100644
--- a/views/js/controller/creator/creator.js
+++ b/views/js/controller/creator/creator.js
@@ -161,7 +161,9 @@ define([
uri : options.uri,
identifiers : self.identifiers,
labels : options.labels,
- routes : options.routes
+ routes : options.routes,
+ enableAllowSkipping: options.enableAllowSkipping,
+ enableValidateResponses: options.enableValidateResponses
});
//detect the scoring mode
diff --git a/views/js/controller/creator/templates/itemref-props.tpl b/views/js/controller/creator/templates/itemref-props.tpl
index 287c8f982c..e0260fcf74 100644
--- a/views/js/controller/creator/templates/itemref-props.tpl
+++ b/views/js/controller/creator/templates/itemref-props.tpl
@@ -223,6 +223,7 @@
+ {{#if enableAllowSkipping}}
@@ -240,8 +241,10 @@
+ {{/if}}
+ {{#if enableValidateResponses}}
@@ -259,6 +262,7 @@
+ {{/if}}
diff --git a/views/js/controller/creator/templates/section-props.tpl b/views/js/controller/creator/templates/section-props.tpl
index 8314dc5951..08d4fde25d 100644
--- a/views/js/controller/creator/templates/section-props.tpl
+++ b/views/js/controller/creator/templates/section-props.tpl
@@ -333,6 +333,7 @@
+ {{#if enableAllowSkipping}}
@@ -350,8 +351,10 @@
+ {{/if}}
+ {{#if enableValidateResponses}}
@@ -369,6 +372,7 @@
+ {{/if}}
diff --git a/views/js/controller/creator/templates/testpart-props.tpl b/views/js/controller/creator/templates/testpart-props.tpl
index e146cc7461..c13ec8f438 100644
--- a/views/js/controller/creator/templates/testpart-props.tpl
+++ b/views/js/controller/creator/templates/testpart-props.tpl
@@ -172,6 +172,7 @@
+ {{#if enableAllowSkipping}}
@@ -189,8 +190,10 @@
+ {{/if}}
+ {{#if enableValidateResponses}}
@@ -208,6 +211,7 @@
+ {{/if}}
diff --git a/views/js/controller/creator/views/itemref.js b/views/js/controller/creator/views/itemref.js
index e25d57a07f..54a6eca8c5 100644
--- a/views/js/controller/creator/views/itemref.js
+++ b/views/js/controller/creator/views/itemref.js
@@ -61,6 +61,10 @@ function(
function setUp (modelOverseer, refModel, $itemRef){
var $actionContainer = $('.actions', $itemRef);
+ var config = modelOverseer.getConfig();
+
+ refModel.enableAllowSkipping = config.enableAllowSkipping || false;
+ refModel.enableValidateResponses = config.enableValidateResponses || false;
actions.properties($actionContainer, 'itemref', refModel, propHandler);
actions.move($actionContainer, 'itemrefs', 'itemref');
diff --git a/views/js/controller/creator/views/section.js b/views/js/controller/creator/views/section.js
index 800fd5fa53..3e49399a14 100644
--- a/views/js/controller/creator/views/section.js
+++ b/views/js/controller/creator/views/section.js
@@ -64,6 +64,10 @@ function(
if(!_.isEmpty(config.routes.blueprintsById)){
sectionModel.hasBlueprint = true;
}
+
+ sectionModel.enableAllowSkipping = config.enableAllowSkipping || false;
+ sectionModel.enableValidateResponses = config.enableValidateResponses || false;
+
actions.properties($actionContainer, 'section', sectionModel, propHandler);
actions.move($actionContainer, 'sections', 'section');
itemRefs();
diff --git a/views/js/controller/creator/views/testpart.js b/views/js/controller/creator/views/testpart.js
index d445c82fbf..b93ecb00da 100644
--- a/views/js/controller/creator/views/testpart.js
+++ b/views/js/controller/creator/views/testpart.js
@@ -39,6 +39,9 @@ function($, _, actions, sectionView, templates, qtiTestHelper){
var $actionContainer = $('h1', $testPart);
var config = modelOverseer.getConfig();
+ partModel.enableAllowSkipping = config.enableAllowSkipping || false;
+ partModel.enableValidateResponses = config.enableValidateResponses || false;
+
//run setup methods
actions.properties($actionContainer, 'testpart', partModel, propHandler);
actions.move($actionContainer, 'testparts', 'testpart');
diff --git a/views/templates/creator.tpl b/views/templates/creator.tpl
index a9400d5fb1..93df66ec96 100755
--- a/views/templates/creator.tpl
+++ b/views/templates/creator.tpl
@@ -75,7 +75,9 @@ requirejs.config({
identifier : '=get_data('identifierUrl')?>'
},
categoriesPresets : =get_data('categoriesPresets')?>,
- labels : =get_data('labels')?>
+ labels : =get_data('labels')?>,
+ enableAllowSkipping : "= get_data('enableAllowSkipping') ?>",
+ enableValidateResponses : "= get_data('enableValidateResponses') ?>"
}
}
});