@pie-element/ebsr 10.3.3-next.0 → 10.3.3-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/package.json +1 -1
- package/controller/package.json +1 -1
- package/module/configure.js +2 -2
- package/module/controller.js +8 -6
- package/module/element.js +49 -30
- package/module/manifest.json +2 -2
- package/module/print.js +49 -30
- package/package.json +4 -4
package/configure/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
11
|
"@pie-element/multiple-choice": "^9.9.1",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
13
|
-
"@pie-lib/pie-toolbox": "2.
|
|
13
|
+
"@pie-lib/pie-toolbox": "2.9.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
|
15
15
|
"prop-types": "^15.6.2",
|
|
16
16
|
"react": "^16.8.1",
|
package/controller/package.json
CHANGED
package/module/configure.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.2.0/module/index.js";
|
|
2
2
|
import MultipleChoiceConfigure from '@pie-element/multiple-choice/configure/lib';
|
|
3
|
-
import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
3
|
+
import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.9.0/module/index.js";
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
5
|
function getDefaultExportFromCjs(x) {
|
|
6
6
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
package/module/controller.js
CHANGED
|
@@ -23479,10 +23479,11 @@ var _default = {
|
|
|
23479
23479
|
primaryCorrectWithAlternates: 'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.'
|
|
23480
23480
|
},
|
|
23481
23481
|
multipleChoice: {
|
|
23482
|
-
|
|
23483
|
-
minSelections_other: 'This question requires at least {{minSelections}} answers.',
|
|
23482
|
+
minSelections: 'Select at least {{minSelections}}.',
|
|
23484
23483
|
maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
|
|
23485
|
-
maxSelections_other: 'Only {{maxSelections}} answers are allowed.'
|
|
23484
|
+
maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
|
|
23485
|
+
minmaxSelections_equal: 'Select {{minSelections}}.',
|
|
23486
|
+
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.'
|
|
23486
23487
|
},
|
|
23487
23488
|
selectText: {
|
|
23488
23489
|
correctAnswerSelected: 'Correct answer selected',
|
|
@@ -23575,10 +23576,11 @@ var _default = {
|
|
|
23575
23576
|
primaryCorrectWithAlternates: 'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.'
|
|
23576
23577
|
},
|
|
23577
23578
|
multipleChoice: {
|
|
23578
|
-
|
|
23579
|
-
minSelections_other: 'Esta pregunta requiere al menos {{minSelections}} respuestas.',
|
|
23579
|
+
minSelections: 'Seleccione al menos {{minSelections}}.',
|
|
23580
23580
|
maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
|
|
23581
|
-
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.'
|
|
23581
|
+
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
|
|
23582
|
+
minmaxSelections_equal: 'Seleccione {{minSelections}}.',
|
|
23583
|
+
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.'
|
|
23582
23584
|
},
|
|
23583
23585
|
selectText: {
|
|
23584
23586
|
correctAnswerSelected: 'Respuesta correcta seleccionada',
|
package/module/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.9.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -8494,10 +8494,11 @@ var en = {};
|
|
|
8494
8494
|
primaryCorrectWithAlternates: 'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.'
|
|
8495
8495
|
},
|
|
8496
8496
|
multipleChoice: {
|
|
8497
|
-
|
|
8498
|
-
minSelections_other: 'This question requires at least {{minSelections}} answers.',
|
|
8497
|
+
minSelections: 'Select at least {{minSelections}}.',
|
|
8499
8498
|
maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
|
|
8500
|
-
maxSelections_other: 'Only {{maxSelections}} answers are allowed.'
|
|
8499
|
+
maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
|
|
8500
|
+
minmaxSelections_equal: 'Select {{minSelections}}.',
|
|
8501
|
+
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.'
|
|
8501
8502
|
},
|
|
8502
8503
|
selectText: {
|
|
8503
8504
|
correctAnswerSelected: 'Correct answer selected',
|
|
@@ -8587,10 +8588,11 @@ var es = {};
|
|
|
8587
8588
|
primaryCorrectWithAlternates: 'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.'
|
|
8588
8589
|
},
|
|
8589
8590
|
multipleChoice: {
|
|
8590
|
-
|
|
8591
|
-
minSelections_other: 'Esta pregunta requiere al menos {{minSelections}} respuestas.',
|
|
8591
|
+
minSelections: 'Seleccione al menos {{minSelections}}.',
|
|
8592
8592
|
maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
|
|
8593
|
-
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.'
|
|
8593
|
+
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
|
|
8594
|
+
minmaxSelections_equal: 'Seleccione {{minSelections}}.',
|
|
8595
|
+
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.'
|
|
8594
8596
|
},
|
|
8595
8597
|
selectText: {
|
|
8596
8598
|
correctAnswerSelected: 'Respuesta correcta seleccionada',
|
|
@@ -12842,26 +12844,45 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12842
12844
|
lineNumber: 245
|
|
12843
12845
|
}
|
|
12844
12846
|
});
|
|
12847
|
+
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
12848
|
+
if (minSelections && maxSelections) {
|
|
12849
|
+
return minSelections === maxSelections ? translator.t('translation:multipleChoice:minmaxSelections_equal', {
|
|
12850
|
+
lng: language,
|
|
12851
|
+
minSelections
|
|
12852
|
+
}) : translator.t('translation:multipleChoice:minmaxSelections_range', {
|
|
12853
|
+
lng: language,
|
|
12854
|
+
minSelections,
|
|
12855
|
+
maxSelections
|
|
12856
|
+
});
|
|
12857
|
+
}
|
|
12858
|
+
if (minSelections) {
|
|
12859
|
+
return translator.t('translation:multipleChoice:minSelections', {
|
|
12860
|
+
lng: language,
|
|
12861
|
+
minSelections
|
|
12862
|
+
});
|
|
12863
|
+
}
|
|
12864
|
+
return '';
|
|
12865
|
+
};
|
|
12845
12866
|
return React$2.createElement('div', {
|
|
12846
12867
|
className: classNames(classes.main, className, 'multiple-choice'),
|
|
12847
12868
|
__self: this,
|
|
12848
12869
|
__source: {
|
|
12849
12870
|
fileName: _jsxFileName$1,
|
|
12850
|
-
lineNumber:
|
|
12871
|
+
lineNumber: 268
|
|
12851
12872
|
}
|
|
12852
12873
|
}, partLabel && React$2.createElement('h3', {
|
|
12853
12874
|
className: classes.partLabel,
|
|
12854
12875
|
__self: this,
|
|
12855
12876
|
__source: {
|
|
12856
12877
|
fileName: _jsxFileName$1,
|
|
12857
|
-
lineNumber:
|
|
12878
|
+
lineNumber: 269
|
|
12858
12879
|
}
|
|
12859
12880
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12860
12881
|
className: classes.teacherInstructions,
|
|
12861
12882
|
__self: this,
|
|
12862
12883
|
__source: {
|
|
12863
12884
|
fileName: _jsxFileName$1,
|
|
12864
|
-
lineNumber:
|
|
12885
|
+
lineNumber: 274
|
|
12865
12886
|
}
|
|
12866
12887
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12867
12888
|
labels: {
|
|
@@ -12871,14 +12892,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12871
12892
|
__self: this,
|
|
12872
12893
|
__source: {
|
|
12873
12894
|
fileName: _jsxFileName$1,
|
|
12874
|
-
lineNumber:
|
|
12895
|
+
lineNumber: 276
|
|
12875
12896
|
}
|
|
12876
12897
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12877
12898
|
className: classes.fieldset,
|
|
12878
12899
|
__self: this,
|
|
12879
12900
|
__source: {
|
|
12880
12901
|
fileName: _jsxFileName$1,
|
|
12881
|
-
lineNumber:
|
|
12902
|
+
lineNumber: 290
|
|
12882
12903
|
}
|
|
12883
12904
|
}, React$2.createElement(PreviewPrompt, {
|
|
12884
12905
|
className: "prompt",
|
|
@@ -12889,7 +12910,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12889
12910
|
__self: this,
|
|
12890
12911
|
__source: {
|
|
12891
12912
|
fileName: _jsxFileName$1,
|
|
12892
|
-
lineNumber:
|
|
12913
|
+
lineNumber: 291
|
|
12893
12914
|
}
|
|
12894
12915
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12895
12916
|
show: showCorrectAnswerToggle,
|
|
@@ -12899,7 +12920,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12899
12920
|
__self: this,
|
|
12900
12921
|
__source: {
|
|
12901
12922
|
fileName: _jsxFileName$1,
|
|
12902
|
-
lineNumber:
|
|
12923
|
+
lineNumber: 300
|
|
12903
12924
|
}
|
|
12904
12925
|
}), React$2.createElement('div', {
|
|
12905
12926
|
className: classNames({
|
|
@@ -12910,7 +12931,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12910
12931
|
__self: this,
|
|
12911
12932
|
__source: {
|
|
12912
12933
|
fileName: _jsxFileName$1,
|
|
12913
|
-
lineNumber:
|
|
12934
|
+
lineNumber: 308
|
|
12914
12935
|
}
|
|
12915
12936
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12916
12937
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12933,24 +12954,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12933
12954
|
__self: this,
|
|
12934
12955
|
__source: {
|
|
12935
12956
|
fileName: _jsxFileName$1,
|
|
12936
|
-
lineNumber:
|
|
12957
|
+
lineNumber: 316
|
|
12937
12958
|
}
|
|
12938
12959
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12939
12960
|
className: classes.errorText,
|
|
12940
12961
|
__self: this,
|
|
12941
12962
|
__source: {
|
|
12942
12963
|
fileName: _jsxFileName$1,
|
|
12943
|
-
lineNumber:
|
|
12964
|
+
lineNumber: 340
|
|
12944
12965
|
}
|
|
12945
|
-
},
|
|
12946
|
-
lng: language,
|
|
12947
|
-
minSelections
|
|
12948
|
-
})), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12966
|
+
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12949
12967
|
className: classes.errorText,
|
|
12950
12968
|
__self: this,
|
|
12951
12969
|
__source: {
|
|
12952
12970
|
fileName: _jsxFileName$1,
|
|
12953
|
-
lineNumber:
|
|
12971
|
+
lineNumber: 345
|
|
12954
12972
|
}
|
|
12955
12973
|
}, translator.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12956
12974
|
lng: language,
|
|
@@ -13069,7 +13087,8 @@ const debug$1 = _dll_debug;
|
|
|
13069
13087
|
const {renderMath: renderMath} = _dll_pie_lib__pie_toolbox_math_rendering;
|
|
13070
13088
|
const log$1 = debug$1('pie-ui:multiple-choice');
|
|
13071
13089
|
const isComplete = (session, model, audioComplete) => {
|
|
13072
|
-
|
|
13090
|
+
const {autoplayAudioEnabled, completeAudioEnabled} = model || ({});
|
|
13091
|
+
if (autoplayAudioEnabled && completeAudioEnabled && !audioComplete) {
|
|
13073
13092
|
return false;
|
|
13074
13093
|
}
|
|
13075
13094
|
if (!session || !session.value) {
|
|
@@ -13185,12 +13204,12 @@ class MultipleChoice extends HTMLElement {
|
|
|
13185
13204
|
}
|
|
13186
13205
|
document.removeEventListener('click', enableAudio);
|
|
13187
13206
|
};
|
|
13188
|
-
|
|
13189
|
-
this.
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
}
|
|
13207
|
+
setTimeout(() => {
|
|
13208
|
+
if (audio.paused && !this.querySelector('#play-audio-info')) {
|
|
13209
|
+
this.appendChild(info);
|
|
13210
|
+
document.addEventListener('click', enableAudio);
|
|
13211
|
+
}
|
|
13212
|
+
}, 500);
|
|
13194
13213
|
const handlePlaying = () => {
|
|
13195
13214
|
const info = this.querySelector('#play-audio-info');
|
|
13196
13215
|
if (info) {
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.2.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.9.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -8457,10 +8457,11 @@ var en = {};
|
|
|
8457
8457
|
primaryCorrectWithAlternates: 'Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.'
|
|
8458
8458
|
},
|
|
8459
8459
|
multipleChoice: {
|
|
8460
|
-
|
|
8461
|
-
minSelections_other: 'This question requires at least {{minSelections}} answers.',
|
|
8460
|
+
minSelections: 'Select at least {{minSelections}}.',
|
|
8462
8461
|
maxSelections_one: 'Only {{maxSelections}} answer is allowed.',
|
|
8463
|
-
maxSelections_other: 'Only {{maxSelections}} answers are allowed.'
|
|
8462
|
+
maxSelections_other: 'Only {{maxSelections}} answers are allowed.',
|
|
8463
|
+
minmaxSelections_equal: 'Select {{minSelections}}.',
|
|
8464
|
+
minmaxSelections_range: 'Select between {{minSelections}} and {{maxSelections}}.'
|
|
8464
8465
|
},
|
|
8465
8466
|
selectText: {
|
|
8466
8467
|
correctAnswerSelected: 'Correct answer selected',
|
|
@@ -8550,10 +8551,11 @@ var es = {};
|
|
|
8550
8551
|
primaryCorrectWithAlternates: 'Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.'
|
|
8551
8552
|
},
|
|
8552
8553
|
multipleChoice: {
|
|
8553
|
-
|
|
8554
|
-
minSelections_other: 'Esta pregunta requiere al menos {{minSelections}} respuestas.',
|
|
8554
|
+
minSelections: 'Seleccione al menos {{minSelections}}.',
|
|
8555
8555
|
maxSelections_one: 'Sólo se permite {{maxSelections}} respuesta.',
|
|
8556
|
-
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.'
|
|
8556
|
+
maxSelections_other: 'Sólo se permiten {{maxSelections}} respuestas.',
|
|
8557
|
+
minmaxSelections_equal: 'Seleccione {{minSelections}}.',
|
|
8558
|
+
minmaxSelections_range: 'Seleccione entre {{minSelections}} y {{maxSelections}}.'
|
|
8557
8559
|
},
|
|
8558
8560
|
selectText: {
|
|
8559
8561
|
correctAnswerSelected: 'Respuesta correcta seleccionada',
|
|
@@ -12805,26 +12807,45 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12805
12807
|
lineNumber: 245
|
|
12806
12808
|
}
|
|
12807
12809
|
});
|
|
12810
|
+
const getMultipleChoiceMinSelectionErrorMessage = () => {
|
|
12811
|
+
if (minSelections && maxSelections) {
|
|
12812
|
+
return minSelections === maxSelections ? translator$1.t('translation:multipleChoice:minmaxSelections_equal', {
|
|
12813
|
+
lng: language,
|
|
12814
|
+
minSelections
|
|
12815
|
+
}) : translator$1.t('translation:multipleChoice:minmaxSelections_range', {
|
|
12816
|
+
lng: language,
|
|
12817
|
+
minSelections,
|
|
12818
|
+
maxSelections
|
|
12819
|
+
});
|
|
12820
|
+
}
|
|
12821
|
+
if (minSelections) {
|
|
12822
|
+
return translator$1.t('translation:multipleChoice:minSelections', {
|
|
12823
|
+
lng: language,
|
|
12824
|
+
minSelections
|
|
12825
|
+
});
|
|
12826
|
+
}
|
|
12827
|
+
return '';
|
|
12828
|
+
};
|
|
12808
12829
|
return React$2.createElement('div', {
|
|
12809
12830
|
className: classNames(classes.main, className, 'multiple-choice'),
|
|
12810
12831
|
__self: this,
|
|
12811
12832
|
__source: {
|
|
12812
12833
|
fileName: _jsxFileName$1,
|
|
12813
|
-
lineNumber:
|
|
12834
|
+
lineNumber: 268
|
|
12814
12835
|
}
|
|
12815
12836
|
}, partLabel && React$2.createElement('h3', {
|
|
12816
12837
|
className: classes.partLabel,
|
|
12817
12838
|
__self: this,
|
|
12818
12839
|
__source: {
|
|
12819
12840
|
fileName: _jsxFileName$1,
|
|
12820
|
-
lineNumber:
|
|
12841
|
+
lineNumber: 269
|
|
12821
12842
|
}
|
|
12822
12843
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
12823
12844
|
className: classes.teacherInstructions,
|
|
12824
12845
|
__self: this,
|
|
12825
12846
|
__source: {
|
|
12826
12847
|
fileName: _jsxFileName$1,
|
|
12827
|
-
lineNumber:
|
|
12848
|
+
lineNumber: 274
|
|
12828
12849
|
}
|
|
12829
12850
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
12830
12851
|
labels: {
|
|
@@ -12834,14 +12855,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12834
12855
|
__self: this,
|
|
12835
12856
|
__source: {
|
|
12836
12857
|
fileName: _jsxFileName$1,
|
|
12837
|
-
lineNumber:
|
|
12858
|
+
lineNumber: 276
|
|
12838
12859
|
}
|
|
12839
12860
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
12840
12861
|
className: classes.fieldset,
|
|
12841
12862
|
__self: this,
|
|
12842
12863
|
__source: {
|
|
12843
12864
|
fileName: _jsxFileName$1,
|
|
12844
|
-
lineNumber:
|
|
12865
|
+
lineNumber: 290
|
|
12845
12866
|
}
|
|
12846
12867
|
}, React$2.createElement(PreviewPrompt, {
|
|
12847
12868
|
className: "prompt",
|
|
@@ -12852,7 +12873,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12852
12873
|
__self: this,
|
|
12853
12874
|
__source: {
|
|
12854
12875
|
fileName: _jsxFileName$1,
|
|
12855
|
-
lineNumber:
|
|
12876
|
+
lineNumber: 291
|
|
12856
12877
|
}
|
|
12857
12878
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
12858
12879
|
show: showCorrectAnswerToggle,
|
|
@@ -12862,7 +12883,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12862
12883
|
__self: this,
|
|
12863
12884
|
__source: {
|
|
12864
12885
|
fileName: _jsxFileName$1,
|
|
12865
|
-
lineNumber:
|
|
12886
|
+
lineNumber: 300
|
|
12866
12887
|
}
|
|
12867
12888
|
}), React$2.createElement('div', {
|
|
12868
12889
|
className: classNames({
|
|
@@ -12873,7 +12894,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12873
12894
|
__self: this,
|
|
12874
12895
|
__source: {
|
|
12875
12896
|
fileName: _jsxFileName$1,
|
|
12876
|
-
lineNumber:
|
|
12897
|
+
lineNumber: 308
|
|
12877
12898
|
}
|
|
12878
12899
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
12879
12900
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -12896,24 +12917,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
12896
12917
|
__self: this,
|
|
12897
12918
|
__source: {
|
|
12898
12919
|
fileName: _jsxFileName$1,
|
|
12899
|
-
lineNumber:
|
|
12920
|
+
lineNumber: 316
|
|
12900
12921
|
}
|
|
12901
12922
|
})))), choiceMode === 'checkbox' && selections < minSelections && React$2.createElement('div', {
|
|
12902
12923
|
className: classes.errorText,
|
|
12903
12924
|
__self: this,
|
|
12904
12925
|
__source: {
|
|
12905
12926
|
fileName: _jsxFileName$1,
|
|
12906
|
-
lineNumber:
|
|
12927
|
+
lineNumber: 340
|
|
12907
12928
|
}
|
|
12908
|
-
},
|
|
12909
|
-
lng: language,
|
|
12910
|
-
minSelections
|
|
12911
|
-
})), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12929
|
+
}, getMultipleChoiceMinSelectionErrorMessage()), choiceMode === 'checkbox' && maxSelectionsErrorState && React$2.createElement('div', {
|
|
12912
12930
|
className: classes.errorText,
|
|
12913
12931
|
__self: this,
|
|
12914
12932
|
__source: {
|
|
12915
12933
|
fileName: _jsxFileName$1,
|
|
12916
|
-
lineNumber:
|
|
12934
|
+
lineNumber: 345
|
|
12917
12935
|
}
|
|
12918
12936
|
}, translator$1.t(`translation:multipleChoice:maxSelections_${maxSelections === 1 ? 'one' : 'other'}`, {
|
|
12919
12937
|
lng: language,
|
|
@@ -13069,7 +13087,8 @@ const debug$1 = _dll_debug;
|
|
|
13069
13087
|
const {renderMath: renderMath} = _dll_pie_lib__pie_toolbox_math_rendering;
|
|
13070
13088
|
const log$1 = debug$1('pie-ui:multiple-choice');
|
|
13071
13089
|
const isComplete = (session, model, audioComplete) => {
|
|
13072
|
-
|
|
13090
|
+
const {autoplayAudioEnabled, completeAudioEnabled} = model || ({});
|
|
13091
|
+
if (autoplayAudioEnabled && completeAudioEnabled && !audioComplete) {
|
|
13073
13092
|
return false;
|
|
13074
13093
|
}
|
|
13075
13094
|
if (!session || !session.value) {
|
|
@@ -13185,12 +13204,12 @@ class MultipleChoice extends HTMLElement {
|
|
|
13185
13204
|
}
|
|
13186
13205
|
document.removeEventListener('click', enableAudio);
|
|
13187
13206
|
};
|
|
13188
|
-
|
|
13189
|
-
this.
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
}
|
|
13207
|
+
setTimeout(() => {
|
|
13208
|
+
if (audio.paused && !this.querySelector('#play-audio-info')) {
|
|
13209
|
+
this.appendChild(info);
|
|
13210
|
+
document.addEventListener('click', enableAudio);
|
|
13211
|
+
}
|
|
13212
|
+
}, 500);
|
|
13194
13213
|
const handlePlaying = () => {
|
|
13195
13214
|
const info = this.querySelector('#play-audio-info');
|
|
13196
13215
|
if (info) {
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr",
|
|
3
|
-
"version": "10.3.3-next.
|
|
3
|
+
"version": "10.3.3-next.12+87b282e00",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "pie-framework/pie-elements",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pie-element/multiple-choice": "^9.9.2-next.
|
|
10
|
+
"@pie-element/multiple-choice": "^9.9.2-next.12+87b282e00",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
|
-
"@pie-lib/pie-toolbox": "2.
|
|
12
|
+
"@pie-lib/pie-toolbox": "2.9.0",
|
|
13
13
|
"classnames": "^2.2.5",
|
|
14
14
|
"debug": "^4.1.1",
|
|
15
15
|
"lodash": "^4.17.11"
|
|
16
16
|
},
|
|
17
17
|
"author": "pie framework developers",
|
|
18
18
|
"license": "ISC",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "87b282e0032de66385a8d361264a31d2b18a72ae",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|