Skip to content

Commit

Permalink
Merge branch 'release-1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
shaveko committed Jun 15, 2022
2 parents 2c3e3e7 + 27d5366 commit ce5b6ad
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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": "1.3.0",
"version": "1.3.1",
"displayName": "TAO Item Runner QTI",
"description": "TAO QTI Item Runner modules",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,11 @@ const isEliminable = function isEliminable(interaction) {
* @returns {Object} custom data
*/
const getCustomData = function getCustomData(interaction, data) {
const listStyleVisible = features.isVisible('taoQtiItem/creator/interaction/choice/property/listStyle');
const listStyles = (interaction.attr('class') || '').match(/\blist-style-[\w-]+/) || [];
return _.merge(data || {}, {
horizontal: interaction.attr('orientation') === 'horizontal',
listStyle: listStyles.pop(),
listStyle: listStyleVisible ? listStyles.pop() : void 0,
eliminable: isEliminable(interaction),
allowEliminationVisible: features.isVisible('taoQtiItem/creator/interaction/choice/property/allowElimination')
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ import _ from 'lodash';
import $ from 'jquery';
import __ from 'i18n';
import 'core/mouseEvent';
import features from 'services/features';
import tpl from 'taoQtiItem/qtiCommonRenderer/tpl/interactions/orderInteraction';
import containerHelper from 'taoQtiItem/qtiCommonRenderer/helpers/container';
import instructionMgr from 'taoQtiItem/qtiCommonRenderer/helpers/instructions/instructionManager';
import pciResponse from 'taoQtiItem/qtiCommonRenderer/helpers/PciResponse';
import interact from 'interact';
import interactUtils from 'ui/interactUtils';

const orientationSelectionEnabled = features.isVisible('taoQtiItem/creator/interaction/order/property/orientation');

const _freezeSize = function ($container) {
const $orderArea = $container.find('.order-interaction-area');
$orderArea.height($orderArea.height());
Expand Down Expand Up @@ -131,7 +134,7 @@ const render = function (interaction) {
choiceSelector = `${$choiceArea.selector} >li:not(.deactivated)`,
resultSelector = `${$resultArea.selector} >li`,
$dragContainer = $container.find('.drag-container'),
orientation = interaction.attr('orientation') ? interaction.attr('orientation') : 'vertical';
orientation = (interaction.attr('orientation') && orientationSelectionEnabled) ? interaction.attr('orientation') : 'vertical';

let $activeChoice = null,
scaleX,
Expand Down Expand Up @@ -597,7 +600,7 @@ const getResponse = function (interaction) {
*/
const getCustomData = function (interaction, data) {
return _.merge(data || {}, {
horizontal: interaction.attr('orientation') === 'horizontal'
horizontal: interaction.attr('orientation') === 'horizontal' && orientationSelectionEnabled
});
};

Expand Down

0 comments on commit ce5b6ad

Please sign in to comment.