Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tdr 10 upgrade jquery #1360

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
'name' => 'taoQtiItem',
'label' => 'QTI item model',
'license' => 'GPL-2.0',
'version' => '23.0.4',
'version' => '23.1.0',
'author' => 'Open Assessment Technologies',
'requires' => array(
'taoItems' => '>=10.1.0',
'tao' => '>=40.3.0',
'tao' => '>=40.4.0',
'generis' => '>=12.5.0',
),
'models' => array(
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,6 @@ public function update($initialVersion){
$this->setVersion('21.0.0');
}

$this->skip('21.0.0', '23.0.4');
$this->skip('21.0.0', '23.1.0');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ define([
'use strict';

var InteractionStateAnswer = stateFactory.extend(Answer, function initAnswerState(){
this.widget.$original.find('.likert input').prop('disabled', 'disabled');
this.widget.$original.find('.likert input').prop('disabled', true);
}, function exitAnswerState(){
this.widget.$original.find('.likert input').removeProp('disabled');
this.widget.$original.find('.likert input').prop('disabled', false);
});

InteractionStateAnswer.prototype.initResponseForm = function initResponseForm(){
Expand All @@ -18,4 +18,4 @@ define([
};

return InteractionStateAnswer;
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ define([
'use strict';

var InteractionStateAnswer = stateFactory.extend(Answer, function initAnswerState(){
this.widget.$original.find('.likert input').prop('disabled', 'disabled');
this.widget.$original.find('.likert input').prop('disabled', true);
}, function exitAnswerState(){
this.widget.$original.find('.likert input').removeProp('disabled');
this.widget.$original.find('.likert input').prop('disabled', false);
});

InteractionStateAnswer.prototype.initResponseForm = function initResponseForm(){
Expand All @@ -18,4 +18,4 @@ define([
};

return InteractionStateAnswer;
});
});
2 changes: 1 addition & 1 deletion views/js/loader/qtiLoader.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItemRunner.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItemRunner.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/qtiCreator/plugins/menu/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define([
* Enable the button
*/
enable : function enable (){
this.$element.removeProp('disabled')
this.$element.prop('disabled', false)
.removeClass('disabled');
},

Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/plugins/menu/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ define([
* Enable the button
*/
enable : function enable (){
this.$element.removeProp('disabled')
this.$element.prop('disabled', false)
.removeClass('disabled');
},

Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/plugins/menu/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ define([
* Enable the button
*/
enable : function enable (){
this.$element.removeProp('disabled')
this.$element.prop('disabled', false)
.removeClass('disabled');
},

Expand Down
2 changes: 1 addition & 1 deletion views/js/qtiCreator/plugins/navigation/back.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ define([
* Enable the button
*/
enable : function enable (){
this.$element.removeProp('disabled')
this.$element.prop('disabled', false)
.removeClass('disabled');
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ define([
var currentLeft = $left.select2('val'),
currentRight = $right.select2('val');

$options.removeProp('disabled');
$options.prop('disabled', false);

_(pairs).where({leftId : currentLeft}).forEach(function(pair){
$right.find('option[value="' + pair.rightId+ '"]').prop('disabled', true);
Expand All @@ -202,7 +202,7 @@ define([
var currentRight = $right.select2('val'),
currentLeft = $left.select2('val');

$options.removeProp('disabled');
$options.prop('disabled', false);

_(pairs).where({rightId : currentRight}).forEach(function(pair){
$left.find('option[value="' + pair.leftId+ '"]').prop('disabled', true);
Expand All @@ -223,7 +223,7 @@ define([
var lval = $left.select2('val');
var rval = $right.select2('val');

$options.removeProp('disabled');
$options.prop('disabled', false);
e.preventDefault();

if(lval && rval){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ define([
var response = interaction.getResponseDeclaration();

//enable the checkbox to enable user selection
this.widget.$original.find('.hottext-checkmark > input').removeProp('disabled');
this.widget.$original.find('.hottext-checkmark > input').prop('disabled', false);

//really need to destroy before ?
commonRenderer.resetResponse(interaction);
commonRenderer.destroy(interaction);

//add a specific instruction
instructionMgr.appendInstruction(interaction, __('Please select the correct hottext choices below.'));

//use the common Renderer
commonRenderer.render.call(interaction.getRenderer(), interaction);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define([
commonRenderer.render(interaction);

widget.$container.find('table.matrix input[type=checkbox]')
.removeProp('disabled')
.prop('disabled', false)
.attr('data-edit', 'correct')
.attr('data-role', 'correct');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ define([

//finally, apply defined correct response and response mapping:
responseWidget.setResponse(interaction, _.values(response.getCorrect()));
//change the correct state

//change the correct state
_widget.on('metaChange', function(meta){
if(meta.key === 'defineCorrect'){
if(meta.value){
$('.match-interaction-area input[type="checkbox"]', _widget.$container)
.removeProp('disabled')
.prop('disabled', false)
.removeClass('disabled');
} else {
$('.match-interaction-area input[type="checkbox"]', _widget.$container)
Expand All @@ -44,4 +44,4 @@ define([
});

return MatchInteractionStateMap;
});
});
10 changes: 4 additions & 6 deletions views/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions views/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "git+https://github.com/oat-sa/extension-tao-itemqti.git"
},
"dependencies": {
"@oat-sa/tao-item-runner": "0.4.0",
"@oat-sa/tao-item-runner-qti": "0.4.13"
"@oat-sa/tao-item-runner": "oat-sa/tao-item-runner-fe#breaking/TDR-10_upgrade-jquery",
"@oat-sa/tao-item-runner-qti": "oat-sa/tao-item-runner-qti-fe#breaking/TDR-10_upgrade-jquery"
}
}