Skip to content

Commit

Permalink
Merge branch 'release-2.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
oat-github-bot committed Nov 22, 2024
2 parents 21b4450 + 8eb9db8 commit dceb505
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oat-sa/tao-item-runner-qti",
"version": "2.5.1",
"version": "2.5.2",
"displayName": "TAO Item Runner QTI",
"description": "TAO QTI Item Runner modules",
"files": [
Expand Down
10 changes: 7 additions & 3 deletions src/qtiCommonRenderer/renderers/interactions/OrderInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ const _setInstructions = function (interaction) {
};

const resetResponse = function (interaction) {
const isSingleOrder = interaction.attr('order') === 'single';
const orderState = interaction.attr('data-order') || interaction.attr('order');
const isSingleOrder = orderState === 'single';
const $container = containerHelper.get(interaction);
const initialOrder = _.keys(interaction.getChoices());
const $resultArea = $('.result-area', $container);
Expand Down Expand Up @@ -146,7 +147,8 @@ const render = function (interaction) {
choiceSelector = `${$choiceArea.selector} >li:not(.deactivated)`,
resultSelector = `${$resultArea.selector} >li`,
$dragContainer = $container.find('.drag-container'),
isSingleOrder = interaction.attr('order') === 'single',
orderState = interaction.attr('data-order') || interaction.attr('order'),
isSingleOrder = orderState === 'single',
orientation =
interaction.attr('orientation') && orientationSelectionEnabled
? interaction.attr('orientation')
Expand Down Expand Up @@ -573,7 +575,9 @@ const setResponse = function (interaction, response) {
const $container = containerHelper.get(interaction);
const $choiceArea = $('.choice-area', $container);
const $resultArea = $('.result-area', $container);
const isSingleOrder = interaction.attr('order') === 'single';
// legacy order attr support
const orderState = interaction.attr('data-order') || interaction.attr('order');
const isSingleOrder = orderState === 'single';

if (response === null || _.isEmpty(response)) {
resetResponse(interaction);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div {{#if attributes.id}}id="{{attributes.id}}"{{/if}} class="qti-interaction qti-blockInteraction qti-orderInteraction{{#if horizontal}} qti-horizontal{{else}} qti-vertical{{/if}}{{#if attributes.class}} {{attributes.class}}{{/if}}{{#equal attributes.order 'single'}} qti-single{{/equal}}"
<div {{#if attributes.id}}id="{{attributes.id}}"{{/if}} class="qti-interaction qti-blockInteraction qti-orderInteraction{{#if horizontal}} qti-horizontal{{else}} qti-vertical{{/if}}{{#if attributes.class}} {{attributes.class}}{{/if}}{{#equal attributes.data-order 'single'}} qti-single{{/equal}}{{#equal attributes.order 'single'}} qti-single{{/equal}}"
data-serial="{{serial}}"
data-qti-class="orderInteraction"
data-orientation="{{#if horizontal}}horizontal{{else}}vertical{{/if}}"{{#if attributes.xml:lang}} lang="{{attributes.xml:lang}}"{{/if}}>
Expand Down

0 comments on commit dceb505

Please sign in to comment.