diff --git a/package-lock.json b/package-lock.json index 25b64eee..d0225346 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "1.3.4", + "version": "1.3.4-1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1b0477b8..71ad2e35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "1.3.4", + "version": "1.3.4-1", "displayName": "TAO Item Runner QTI", "description": "TAO QTI Item Runner modules", "files": [ diff --git a/src/qtiCommonRenderer/renderers/interactions/ChoiceInteraction.js b/src/qtiCommonRenderer/renderers/interactions/ChoiceInteraction.js index 9f7ff152..28f9eb3f 100644 --- a/src/qtiCommonRenderer/renderers/interactions/ChoiceInteraction.js +++ b/src/qtiCommonRenderer/renderers/interactions/ChoiceInteraction.js @@ -186,8 +186,13 @@ const _setInstructions = function _setInstructions(interaction) { const highlightInvalidInput = function highlightInvalidInput($choice) { const $input = $choice.find('.real-label > input'); - const $li = $choice.css('color', '#BA122B'); - const $icon = $choice.find('.real-label > span').css('color', '#BA122B').addClass('cross error'); + const $icon = $choice.find('.real-label > span'); + + const choiceStyle = $choice.attr('style'); + const iconStyle = $icon.attr('style'); + $choice.css('color', '#BA122B'); + $icon.css('color', '#BA122B').addClass('cross error') + let timeout = interaction.data('__instructionTimeout'); if (timeout) { @@ -195,9 +200,9 @@ const _setInstructions = function _setInstructions(interaction) { } timeout = setTimeout(function () { $input.prop('checked', false); - $li.removeAttr('style'); - $icon.removeAttr('style').removeClass('cross'); - $li.toggleClass('user-selected', false); + $choice.attr('style', choiceStyle); + $icon.attr('style', iconStyle).removeClass('cross'); + $choice.toggleClass('user-selected', false); containerHelper.triggerResponseChangeEvent(interaction); }, 150); interaction.data('__instructionTimeout', timeout); @@ -340,7 +345,7 @@ const resetResponse = function resetResponse(interaction) { * http://www.imsglobal.org/question/qtiv2p1/imsqti_infov2p1.html#element10278 * * @param {Object} interaction - the interaction instance - * @param {0bject} response - the PCI formated response + * @param {Object} response - the PCI formatted response */ const setResponse = function setResponse(interaction, response) { const $container = containerHelper.get(interaction);