Skip to content

Commit

Permalink
Merge branch 'release-30.16.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jul 19, 2024
2 parents 74342b8 + b32c884 commit ce82146
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 70 deletions.
152 changes: 113 additions & 39 deletions locales/it-IT/messages.po

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/it-IT/messages_po.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions locales/it-IT/qtiItemRunner.rdf.po
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
msgid ""
msgstr ""
"Project-Id-Version: tao-open-source\n"
"PO-Revision-Date: 2023-09-13 14:47\n"
"Project-Id-Version: TAO 2024.07\n"
"PO-Revision-Date: 2024-07-17T14:43:35\n"
"Last-Translator: TAO Translation Team <[email protected]>\n"
"MIME-Version: 1.0\n"
"Language: it\n"
"Language: it-IT\n"
"sourceLanguage: en-US\n"
"targetLanguage: en-US\n"
"Content-Type: text/plain; charset=UTF-8\n"
"targetLanguage: it-IT\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: tao-open-source\n"
Expand Down
10 changes: 5 additions & 5 deletions locales/it-IT/taoQti.rdf.po
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
msgid ""
msgstr ""
"Project-Id-Version: tao-open-source\n"
"PO-Revision-Date: 2023-09-13 14:47\n"
"Project-Id-Version: TAO 2024.07\n"
"PO-Revision-Date: 2024-07-17T14:43:35\n"
"Last-Translator: TAO Translation Team <[email protected]>\n"
"MIME-Version: 1.0\n"
"Language: it\n"
"Language: it-IT\n"
"sourceLanguage: en-US\n"
"targetLanguage: en-US\n"
"Content-Type: text/plain; charset=UTF-8\n"
"targetLanguage: it-IT\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: tao-open-source\n"
Expand Down
2 changes: 1 addition & 1 deletion views/css/qti-runner.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/css/qti-runner.css.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.

15 changes: 15 additions & 0 deletions views/js/qtiCreator/tpl/forms/item.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,18 @@
</select>
</div>
{{/if}}

{{#if showRemoveInstructions}}
<div class="panel">
<label>
<input name="removeInstructions" type="checkbox" {{#if removeInstructions}}checked="checked" {{/if}} />
<span class="icon-checkbox"></span>
{{__ "Remove Instructions"}}
</label>
<span class="icon-help tooltipstered" data-tooltip="~ .tooltip-content:first" data-tooltip-theme="info"></span>
<span class="tooltip-content">
{{__ "Removes all instruction messages generated by the system from the interface."}}<br />
<b>{{__ "Be aware, if you choose to remove the instructions, the system will not provide any warnings to the test takers if constraints are set."}}</b>
</span>
</div>
{{/if}}
49 changes: 34 additions & 15 deletions views/js/qtiCreator/widgets/item/states/Active.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2014-2022 (original work) Open Assessment Technologies SA ;
* Copyright (c) 2014-2024 (original work) Open Assessment Technologies SA ;
*
*/
define([
Expand All @@ -29,6 +29,13 @@ define([
], function (_, features, languages, stateFactory, Active, formTpl, formElement, qtiIdentifier) {
'use strict';

// These classes are supported for removing the instructions.
// Therefore, they are verified for checking the related option.
const removeInstructionClasses = ['remove-instructions', '__custom__remove-instructions'];

// This class will be set for removing the instructions
const removeInstructionClass = 'remove-instructions';

const ItemStateActive = stateFactory.create(
Active,
function enterActiveState() {
Expand All @@ -39,7 +46,13 @@ define([
const $itemBody = _widget.$container.find('.qti-itemBody');

const showIdentifier = features.isVisible('taoQtiItem/creator/item/property/identifier');
const disableIdentifier = qtiIdentifier.isDisabled
const disableIdentifier = qtiIdentifier.isDisabled;

const itemElements = [$itemBody, item];
const itemHasClass = classes => classes.some(cls => $itemBody.hasClass(cls));
const itemAddClass = cls => itemElements.forEach(el => el.addClass(cls));
const itemRemoveClass = cls => itemElements.forEach(el => el.removeClass(cls));
const itemRemoveClasses = classes => classes.forEach(itemRemoveClass);

//build form:
$form.html(
Expand All @@ -50,6 +63,8 @@ define([
title: item.attr('title'),
timeDependent: !!item.attr('timeDependent'),
showTimeDependent: features.isVisible('taoQtiItem/creator/item/property/timeDependant'),
removeInstructions: itemHasClass(removeInstructionClasses),
showRemoveInstructions: true,
'xml:lang': item.attr('xml:lang'),
languagesList: item.data('languagesList'),
disableIdentifier
Expand All @@ -67,22 +82,26 @@ define([
areaBroker.getTitleArea().text(item.attr('title'));
},
timeDependent: formElement.getAttributeChangeCallback(),
removeInstructions(i, value) {
if (value) {
itemAddClass(removeInstructionClass);
} else {
itemRemoveClasses(removeInstructionClasses);
}
},
'xml:lang': function langChange(i, lang) {
item.attr('xml:lang', lang);
languages
.isRTLbyLanguageCode(lang)
.then((isRTL) => {
if (isRTL) {
item.bdy.attr('dir', 'rtl');
$itemBody.attr('dir', 'rtl');
} else {
item.bdy.removeAttr('dir');
$itemBody.removeAttr('dir');
}

$itemBody.trigger('item-dir-changed');
languages.isRTLbyLanguageCode(lang).then(isRTL => {
if (isRTL) {
item.bdy.attr('dir', 'rtl');
$itemBody.attr('dir', 'rtl');
} else {
item.bdy.removeAttr('dir');
$itemBody.removeAttr('dir');
}
);

$itemBody.trigger('item-dir-changed');
});
}
});

Expand Down
8 changes: 7 additions & 1 deletion views/scss/qti/_all-interactions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@
}
}


.__custom__remove-instructions, .remove-instructions {
.qti-interaction {
.instruction-container {
display: none;
}
}
}

0 comments on commit ce82146

Please sign in to comment.