Skip to content

Commit

Permalink
fix: rename order field to data-order in order interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill-Hatalski committed Nov 7, 2024
1 parent 21b4450 commit 8a8adb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const _setInstructions = function (interaction) {
};

const resetResponse = function (interaction) {
const isSingleOrder = interaction.attr('order') === 'single';
const isSingleOrder = interaction.attr('data-order') === 'single';
const $container = containerHelper.get(interaction);
const initialOrder = _.keys(interaction.getChoices());
const $resultArea = $('.result-area', $container);
Expand Down Expand Up @@ -146,7 +146,7 @@ const render = function (interaction) {
choiceSelector = `${$choiceArea.selector} >li:not(.deactivated)`,
resultSelector = `${$resultArea.selector} >li`,
$dragContainer = $container.find('.drag-container'),
isSingleOrder = interaction.attr('order') === 'single',
isSingleOrder = interaction.attr('data-order') === 'single',
orientation =
interaction.attr('orientation') && orientationSelectionEnabled
? interaction.attr('orientation')
Expand Down Expand Up @@ -573,7 +573,7 @@ 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';
const isSingleOrder = interaction.attr('data-order') === '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}}"
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 8a8adb6

Please sign in to comment.