@pie-element/ebsr 9.18.4-next.3 → 9.18.4-next.33
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 +1 -1
- package/module/element.js +46 -30
- package/module/manifest.json +1 -1
- package/module/print.js +46 -30
- package/package.json +3 -3
package/configure/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
11
|
"@pie-element/multiple-choice": "^8.21.3",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
13
|
-
"@pie-lib/pie-toolbox": "1.
|
|
13
|
+
"@pie-lib/pie-toolbox": "1.26.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,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_lodash, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import MultipleChoiceConfigure from '@pie-element/multiple-choice/configure/lib';
|
|
3
3
|
import {_dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@4.12.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) {
|
|
@@ -9376,7 +9376,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9376
9376
|
gridColumns: PropTypes$1.string,
|
|
9377
9377
|
alwaysShowCorrect: PropTypes$1.bool,
|
|
9378
9378
|
animationsDisabled: PropTypes$1.bool,
|
|
9379
|
-
language: PropTypes$1.string
|
|
9379
|
+
language: PropTypes$1.string,
|
|
9380
|
+
onShowCorrectToggle: PropTypes$1.func
|
|
9380
9381
|
};
|
|
9381
9382
|
}
|
|
9382
9383
|
constructor(props) {
|
|
@@ -9384,6 +9385,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9384
9385
|
MultipleChoice$1.prototype.__init.call(this);
|
|
9385
9386
|
MultipleChoice$1.prototype.__init2.call(this);
|
|
9386
9387
|
MultipleChoice$1.prototype.__init3.call(this);
|
|
9388
|
+
MultipleChoice$1.prototype.__init4.call(this);
|
|
9387
9389
|
this.state = {
|
|
9388
9390
|
selectedValue: null,
|
|
9389
9391
|
selectedValues: [],
|
|
@@ -9419,22 +9421,30 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9419
9421
|
});
|
|
9420
9422
|
};
|
|
9421
9423
|
}
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
this.
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9424
|
+
__init3() {
|
|
9425
|
+
this.onToggle = () => {
|
|
9426
|
+
if (this.props.mode === 'evaluate') {
|
|
9427
|
+
this.setState({
|
|
9428
|
+
showCorrect: !this.state.showCorrect
|
|
9429
|
+
}, () => {
|
|
9430
|
+
this.props.onShowCorrectToggle();
|
|
9431
|
+
});
|
|
9432
|
+
}
|
|
9433
|
+
};
|
|
9428
9434
|
}
|
|
9429
9435
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
9430
|
-
if (!nextProps.correctResponse) {
|
|
9436
|
+
if (!nextProps.correctResponse && this.state.showCorrect !== false) {
|
|
9431
9437
|
this.setState({
|
|
9432
9438
|
showCorrect: false
|
|
9439
|
+
}, () => {
|
|
9440
|
+
this.props.onShowCorrectToggle();
|
|
9433
9441
|
});
|
|
9434
9442
|
}
|
|
9435
|
-
if (nextProps.alwaysShowCorrect) {
|
|
9443
|
+
if (nextProps.alwaysShowCorrect && this.state.showCorrect !== true) {
|
|
9436
9444
|
this.setState({
|
|
9437
9445
|
showCorrect: true
|
|
9446
|
+
}, () => {
|
|
9447
|
+
this.props.onShowCorrectToggle();
|
|
9438
9448
|
});
|
|
9439
9449
|
}
|
|
9440
9450
|
}
|
|
@@ -9447,7 +9457,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9447
9457
|
}
|
|
9448
9458
|
return '';
|
|
9449
9459
|
}
|
|
9450
|
-
|
|
9460
|
+
__init4() {
|
|
9451
9461
|
this.getCorrectness = (choice = {}) => {
|
|
9452
9462
|
const isCorrect = choice.correct;
|
|
9453
9463
|
const isChecked = this.isSelected(choice.value);
|
|
@@ -9488,14 +9498,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9488
9498
|
__self: this,
|
|
9489
9499
|
__source: {
|
|
9490
9500
|
fileName: _jsxFileName$1,
|
|
9491
|
-
lineNumber:
|
|
9501
|
+
lineNumber: 202
|
|
9492
9502
|
}
|
|
9493
9503
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
9494
9504
|
className: classes.srOnly,
|
|
9495
9505
|
__self: this,
|
|
9496
9506
|
__source: {
|
|
9497
9507
|
fileName: _jsxFileName$1,
|
|
9498
|
-
lineNumber:
|
|
9508
|
+
lineNumber: 204
|
|
9499
9509
|
}
|
|
9500
9510
|
}, "Multiple Select Question");
|
|
9501
9511
|
}
|
|
@@ -9515,7 +9525,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9515
9525
|
__self: this,
|
|
9516
9526
|
__source: {
|
|
9517
9527
|
fileName: _jsxFileName$1,
|
|
9518
|
-
lineNumber:
|
|
9528
|
+
lineNumber: 232
|
|
9519
9529
|
}
|
|
9520
9530
|
});
|
|
9521
9531
|
return React$2.createElement('div', {
|
|
@@ -9523,21 +9533,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9523
9533
|
__self: this,
|
|
9524
9534
|
__source: {
|
|
9525
9535
|
fileName: _jsxFileName$1,
|
|
9526
|
-
lineNumber:
|
|
9536
|
+
lineNumber: 241
|
|
9527
9537
|
}
|
|
9528
9538
|
}, partLabel && React$2.createElement('h3', {
|
|
9529
9539
|
className: classes.partLabel,
|
|
9530
9540
|
__self: this,
|
|
9531
9541
|
__source: {
|
|
9532
9542
|
fileName: _jsxFileName$1,
|
|
9533
|
-
lineNumber:
|
|
9543
|
+
lineNumber: 242
|
|
9534
9544
|
}
|
|
9535
9545
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
9536
9546
|
className: classes.teacherInstructions,
|
|
9537
9547
|
__self: this,
|
|
9538
9548
|
__source: {
|
|
9539
9549
|
fileName: _jsxFileName$1,
|
|
9540
|
-
lineNumber:
|
|
9550
|
+
lineNumber: 247
|
|
9541
9551
|
}
|
|
9542
9552
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
9543
9553
|
labels: {
|
|
@@ -9547,14 +9557,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9547
9557
|
__self: this,
|
|
9548
9558
|
__source: {
|
|
9549
9559
|
fileName: _jsxFileName$1,
|
|
9550
|
-
lineNumber:
|
|
9560
|
+
lineNumber: 249
|
|
9551
9561
|
}
|
|
9552
9562
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
9553
9563
|
className: classes.fieldset,
|
|
9554
9564
|
__self: this,
|
|
9555
9565
|
__source: {
|
|
9556
9566
|
fileName: _jsxFileName$1,
|
|
9557
|
-
lineNumber:
|
|
9567
|
+
lineNumber: 263
|
|
9558
9568
|
}
|
|
9559
9569
|
}, React$2.createElement(PreviewPrompt, {
|
|
9560
9570
|
className: "prompt",
|
|
@@ -9564,7 +9574,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9564
9574
|
__self: this,
|
|
9565
9575
|
__source: {
|
|
9566
9576
|
fileName: _jsxFileName$1,
|
|
9567
|
-
lineNumber:
|
|
9577
|
+
lineNumber: 264
|
|
9568
9578
|
}
|
|
9569
9579
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
9570
9580
|
show: showCorrectAnswerToggle,
|
|
@@ -9574,7 +9584,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9574
9584
|
__self: this,
|
|
9575
9585
|
__source: {
|
|
9576
9586
|
fileName: _jsxFileName$1,
|
|
9577
|
-
lineNumber:
|
|
9587
|
+
lineNumber: 267
|
|
9578
9588
|
}
|
|
9579
9589
|
}), React$2.createElement('div', {
|
|
9580
9590
|
className: classNames({
|
|
@@ -9585,7 +9595,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9585
9595
|
__self: this,
|
|
9586
9596
|
__source: {
|
|
9587
9597
|
fileName: _jsxFileName$1,
|
|
9588
|
-
lineNumber:
|
|
9598
|
+
lineNumber: 275
|
|
9589
9599
|
}
|
|
9590
9600
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
9591
9601
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -9607,7 +9617,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9607
9617
|
__self: this,
|
|
9608
9618
|
__source: {
|
|
9609
9619
|
fileName: _jsxFileName$1,
|
|
9610
|
-
lineNumber:
|
|
9620
|
+
lineNumber: 283
|
|
9611
9621
|
}
|
|
9612
9622
|
})))));
|
|
9613
9623
|
}
|
|
@@ -9630,7 +9640,8 @@ class Main extends React$1.Component {
|
|
|
9630
9640
|
model: PropTypes.object,
|
|
9631
9641
|
session: PropTypes.object,
|
|
9632
9642
|
onChoiceChanged: PropTypes.func,
|
|
9633
|
-
classes: PropTypes.object.isRequired
|
|
9643
|
+
classes: PropTypes.object.isRequired,
|
|
9644
|
+
onShowCorrectToggle: PropTypes.func
|
|
9634
9645
|
};
|
|
9635
9646
|
}
|
|
9636
9647
|
static __initStatic2() {
|
|
@@ -9643,21 +9654,22 @@ class Main extends React$1.Component {
|
|
|
9643
9654
|
super(props);
|
|
9644
9655
|
}
|
|
9645
9656
|
render() {
|
|
9646
|
-
const {model, onChoiceChanged, session} = this.props;
|
|
9657
|
+
const {model, onChoiceChanged, session, onShowCorrectToggle} = this.props;
|
|
9647
9658
|
return React$1.createElement(PreviewLayout, {
|
|
9648
9659
|
__self: this,
|
|
9649
9660
|
__source: {
|
|
9650
9661
|
fileName: _jsxFileName,
|
|
9651
|
-
lineNumber:
|
|
9662
|
+
lineNumber: 32
|
|
9652
9663
|
}
|
|
9653
9664
|
}, React$1.createElement(MultipleChoice$2, {
|
|
9654
9665
|
...model,
|
|
9655
9666
|
session: session,
|
|
9656
9667
|
onChoiceChanged: onChoiceChanged,
|
|
9668
|
+
onShowCorrectToggle: onShowCorrectToggle,
|
|
9657
9669
|
__self: this,
|
|
9658
9670
|
__source: {
|
|
9659
9671
|
fileName: _jsxFileName,
|
|
9660
|
-
lineNumber:
|
|
9672
|
+
lineNumber: 33
|
|
9661
9673
|
}
|
|
9662
9674
|
}));
|
|
9663
9675
|
}
|
|
@@ -9677,14 +9689,14 @@ const Root = props => React$1.createElement(styles$b.MuiThemeProvider, {
|
|
|
9677
9689
|
__self: undefined,
|
|
9678
9690
|
__source: {
|
|
9679
9691
|
fileName: _jsxFileName,
|
|
9680
|
-
lineNumber:
|
|
9692
|
+
lineNumber: 53
|
|
9681
9693
|
}
|
|
9682
9694
|
}, React$1.createElement(Styled, {
|
|
9683
9695
|
...props,
|
|
9684
9696
|
__self: undefined,
|
|
9685
9697
|
__source: {
|
|
9686
9698
|
fileName: _jsxFileName,
|
|
9687
|
-
lineNumber:
|
|
9699
|
+
lineNumber: 54
|
|
9688
9700
|
}
|
|
9689
9701
|
}));
|
|
9690
9702
|
const {concat: concat} = _dll_lodash;
|
|
@@ -9724,7 +9736,8 @@ class MultipleChoice extends HTMLElement {
|
|
|
9724
9736
|
var element = React.createElement(Root, {
|
|
9725
9737
|
model: this._model,
|
|
9726
9738
|
session: this._session,
|
|
9727
|
-
onChoiceChanged: this._onChange.bind(this)
|
|
9739
|
+
onChoiceChanged: this._onChange.bind(this),
|
|
9740
|
+
onShowCorrectToggle: this.onShowCorrectToggle.bind(this)
|
|
9728
9741
|
});
|
|
9729
9742
|
this.setAttribute('aria-label', this._model.choiceMode === 'radio' ? 'Multiple Choice Question' : 'Multiple Correct Answer Question');
|
|
9730
9743
|
this.setAttribute('role', 'region');
|
|
@@ -9766,6 +9779,9 @@ class MultipleChoice extends HTMLElement {
|
|
|
9766
9779
|
trailing: true
|
|
9767
9780
|
});
|
|
9768
9781
|
}
|
|
9782
|
+
onShowCorrectToggle() {
|
|
9783
|
+
renderMath(this);
|
|
9784
|
+
}
|
|
9769
9785
|
setLangAttribute() {
|
|
9770
9786
|
const language = this._model && typeof this._model.language ? this._model.language : '';
|
|
9771
9787
|
const lang = language ? language.slice(0, 2) : 'en';
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@4.12.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) {
|
|
@@ -9339,7 +9339,8 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9339
9339
|
gridColumns: PropTypes$1.string,
|
|
9340
9340
|
alwaysShowCorrect: PropTypes$1.bool,
|
|
9341
9341
|
animationsDisabled: PropTypes$1.bool,
|
|
9342
|
-
language: PropTypes$1.string
|
|
9342
|
+
language: PropTypes$1.string,
|
|
9343
|
+
onShowCorrectToggle: PropTypes$1.func
|
|
9343
9344
|
};
|
|
9344
9345
|
}
|
|
9345
9346
|
constructor(props) {
|
|
@@ -9347,6 +9348,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9347
9348
|
MultipleChoice$1.prototype.__init.call(this);
|
|
9348
9349
|
MultipleChoice$1.prototype.__init2.call(this);
|
|
9349
9350
|
MultipleChoice$1.prototype.__init3.call(this);
|
|
9351
|
+
MultipleChoice$1.prototype.__init4.call(this);
|
|
9350
9352
|
this.state = {
|
|
9351
9353
|
selectedValue: null,
|
|
9352
9354
|
selectedValues: [],
|
|
@@ -9382,22 +9384,30 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9382
9384
|
});
|
|
9383
9385
|
};
|
|
9384
9386
|
}
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
this.
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9387
|
+
__init3() {
|
|
9388
|
+
this.onToggle = () => {
|
|
9389
|
+
if (this.props.mode === 'evaluate') {
|
|
9390
|
+
this.setState({
|
|
9391
|
+
showCorrect: !this.state.showCorrect
|
|
9392
|
+
}, () => {
|
|
9393
|
+
this.props.onShowCorrectToggle();
|
|
9394
|
+
});
|
|
9395
|
+
}
|
|
9396
|
+
};
|
|
9391
9397
|
}
|
|
9392
9398
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
9393
|
-
if (!nextProps.correctResponse) {
|
|
9399
|
+
if (!nextProps.correctResponse && this.state.showCorrect !== false) {
|
|
9394
9400
|
this.setState({
|
|
9395
9401
|
showCorrect: false
|
|
9402
|
+
}, () => {
|
|
9403
|
+
this.props.onShowCorrectToggle();
|
|
9396
9404
|
});
|
|
9397
9405
|
}
|
|
9398
|
-
if (nextProps.alwaysShowCorrect) {
|
|
9406
|
+
if (nextProps.alwaysShowCorrect && this.state.showCorrect !== true) {
|
|
9399
9407
|
this.setState({
|
|
9400
9408
|
showCorrect: true
|
|
9409
|
+
}, () => {
|
|
9410
|
+
this.props.onShowCorrectToggle();
|
|
9401
9411
|
});
|
|
9402
9412
|
}
|
|
9403
9413
|
}
|
|
@@ -9410,7 +9420,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9410
9420
|
}
|
|
9411
9421
|
return '';
|
|
9412
9422
|
}
|
|
9413
|
-
|
|
9423
|
+
__init4() {
|
|
9414
9424
|
this.getCorrectness = (choice = {}) => {
|
|
9415
9425
|
const isCorrect = choice.correct;
|
|
9416
9426
|
const isChecked = this.isSelected(choice.value);
|
|
@@ -9451,14 +9461,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9451
9461
|
__self: this,
|
|
9452
9462
|
__source: {
|
|
9453
9463
|
fileName: _jsxFileName$1,
|
|
9454
|
-
lineNumber:
|
|
9464
|
+
lineNumber: 202
|
|
9455
9465
|
}
|
|
9456
9466
|
}, "Multiple Choice Question") : React$2.createElement('h2', {
|
|
9457
9467
|
className: classes.srOnly,
|
|
9458
9468
|
__self: this,
|
|
9459
9469
|
__source: {
|
|
9460
9470
|
fileName: _jsxFileName$1,
|
|
9461
|
-
lineNumber:
|
|
9471
|
+
lineNumber: 204
|
|
9462
9472
|
}
|
|
9463
9473
|
}, "Multiple Select Question");
|
|
9464
9474
|
}
|
|
@@ -9478,7 +9488,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9478
9488
|
__self: this,
|
|
9479
9489
|
__source: {
|
|
9480
9490
|
fileName: _jsxFileName$1,
|
|
9481
|
-
lineNumber:
|
|
9491
|
+
lineNumber: 232
|
|
9482
9492
|
}
|
|
9483
9493
|
});
|
|
9484
9494
|
return React$2.createElement('div', {
|
|
@@ -9486,21 +9496,21 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9486
9496
|
__self: this,
|
|
9487
9497
|
__source: {
|
|
9488
9498
|
fileName: _jsxFileName$1,
|
|
9489
|
-
lineNumber:
|
|
9499
|
+
lineNumber: 241
|
|
9490
9500
|
}
|
|
9491
9501
|
}, partLabel && React$2.createElement('h3', {
|
|
9492
9502
|
className: classes.partLabel,
|
|
9493
9503
|
__self: this,
|
|
9494
9504
|
__source: {
|
|
9495
9505
|
fileName: _jsxFileName$1,
|
|
9496
|
-
lineNumber:
|
|
9506
|
+
lineNumber: 242
|
|
9497
9507
|
}
|
|
9498
9508
|
}, partLabel), this.renderHeading(), teacherInstructions && React$2.createElement('div', {
|
|
9499
9509
|
className: classes.teacherInstructions,
|
|
9500
9510
|
__self: this,
|
|
9501
9511
|
__source: {
|
|
9502
9512
|
fileName: _jsxFileName$1,
|
|
9503
|
-
lineNumber:
|
|
9513
|
+
lineNumber: 247
|
|
9504
9514
|
}
|
|
9505
9515
|
}, !animationsDisabled ? React$2.createElement(Collapsible, {
|
|
9506
9516
|
labels: {
|
|
@@ -9510,14 +9520,14 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9510
9520
|
__self: this,
|
|
9511
9521
|
__source: {
|
|
9512
9522
|
fileName: _jsxFileName$1,
|
|
9513
|
-
lineNumber:
|
|
9523
|
+
lineNumber: 249
|
|
9514
9524
|
}
|
|
9515
9525
|
}, teacherInstructionsDiv) : teacherInstructionsDiv), React$2.createElement('fieldset', {
|
|
9516
9526
|
className: classes.fieldset,
|
|
9517
9527
|
__self: this,
|
|
9518
9528
|
__source: {
|
|
9519
9529
|
fileName: _jsxFileName$1,
|
|
9520
|
-
lineNumber:
|
|
9530
|
+
lineNumber: 263
|
|
9521
9531
|
}
|
|
9522
9532
|
}, React$2.createElement(PreviewPrompt, {
|
|
9523
9533
|
className: "prompt",
|
|
@@ -9527,7 +9537,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9527
9537
|
__self: this,
|
|
9528
9538
|
__source: {
|
|
9529
9539
|
fileName: _jsxFileName$1,
|
|
9530
|
-
lineNumber:
|
|
9540
|
+
lineNumber: 264
|
|
9531
9541
|
}
|
|
9532
9542
|
}), !alwaysShowCorrect && React$2.createElement(CorrectAnswerToggle, {
|
|
9533
9543
|
show: showCorrectAnswerToggle,
|
|
@@ -9537,7 +9547,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9537
9547
|
__self: this,
|
|
9538
9548
|
__source: {
|
|
9539
9549
|
fileName: _jsxFileName$1,
|
|
9540
|
-
lineNumber:
|
|
9550
|
+
lineNumber: 267
|
|
9541
9551
|
}
|
|
9542
9552
|
}), React$2.createElement('div', {
|
|
9543
9553
|
className: classNames({
|
|
@@ -9548,7 +9558,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9548
9558
|
__self: this,
|
|
9549
9559
|
__source: {
|
|
9550
9560
|
fileName: _jsxFileName$1,
|
|
9551
|
-
lineNumber:
|
|
9561
|
+
lineNumber: 275
|
|
9552
9562
|
}
|
|
9553
9563
|
}, choices.map((choice, index) => React$2.createElement(StyledChoice, {
|
|
9554
9564
|
choicesLayout: this.props.choicesLayout,
|
|
@@ -9570,7 +9580,7 @@ class MultipleChoice$1 extends React$2.Component {
|
|
|
9570
9580
|
__self: this,
|
|
9571
9581
|
__source: {
|
|
9572
9582
|
fileName: _jsxFileName$1,
|
|
9573
|
-
lineNumber:
|
|
9583
|
+
lineNumber: 283
|
|
9574
9584
|
}
|
|
9575
9585
|
})))));
|
|
9576
9586
|
}
|
|
@@ -9593,7 +9603,8 @@ class Main extends React$1.Component {
|
|
|
9593
9603
|
model: PropTypes.object,
|
|
9594
9604
|
session: PropTypes.object,
|
|
9595
9605
|
onChoiceChanged: PropTypes.func,
|
|
9596
|
-
classes: PropTypes.object.isRequired
|
|
9606
|
+
classes: PropTypes.object.isRequired,
|
|
9607
|
+
onShowCorrectToggle: PropTypes.func
|
|
9597
9608
|
};
|
|
9598
9609
|
}
|
|
9599
9610
|
static __initStatic2() {
|
|
@@ -9606,21 +9617,22 @@ class Main extends React$1.Component {
|
|
|
9606
9617
|
super(props);
|
|
9607
9618
|
}
|
|
9608
9619
|
render() {
|
|
9609
|
-
const {model, onChoiceChanged, session} = this.props;
|
|
9620
|
+
const {model, onChoiceChanged, session, onShowCorrectToggle} = this.props;
|
|
9610
9621
|
return React$1.createElement(PreviewLayout, {
|
|
9611
9622
|
__self: this,
|
|
9612
9623
|
__source: {
|
|
9613
9624
|
fileName: _jsxFileName,
|
|
9614
|
-
lineNumber:
|
|
9625
|
+
lineNumber: 32
|
|
9615
9626
|
}
|
|
9616
9627
|
}, React$1.createElement(MultipleChoice$2, {
|
|
9617
9628
|
...model,
|
|
9618
9629
|
session: session,
|
|
9619
9630
|
onChoiceChanged: onChoiceChanged,
|
|
9631
|
+
onShowCorrectToggle: onShowCorrectToggle,
|
|
9620
9632
|
__self: this,
|
|
9621
9633
|
__source: {
|
|
9622
9634
|
fileName: _jsxFileName,
|
|
9623
|
-
lineNumber:
|
|
9635
|
+
lineNumber: 33
|
|
9624
9636
|
}
|
|
9625
9637
|
}));
|
|
9626
9638
|
}
|
|
@@ -9640,14 +9652,14 @@ const Root = props => React$1.createElement(styles$b.MuiThemeProvider, {
|
|
|
9640
9652
|
__self: undefined,
|
|
9641
9653
|
__source: {
|
|
9642
9654
|
fileName: _jsxFileName,
|
|
9643
|
-
lineNumber:
|
|
9655
|
+
lineNumber: 53
|
|
9644
9656
|
}
|
|
9645
9657
|
}, React$1.createElement(Styled, {
|
|
9646
9658
|
...props,
|
|
9647
9659
|
__self: undefined,
|
|
9648
9660
|
__source: {
|
|
9649
9661
|
fileName: _jsxFileName,
|
|
9650
|
-
lineNumber:
|
|
9662
|
+
lineNumber: 54
|
|
9651
9663
|
}
|
|
9652
9664
|
}));
|
|
9653
9665
|
const {concat: concat} = _dll_lodash;
|
|
@@ -9687,7 +9699,8 @@ class MultipleChoice extends HTMLElement {
|
|
|
9687
9699
|
var element = React.createElement(Root, {
|
|
9688
9700
|
model: this._model,
|
|
9689
9701
|
session: this._session,
|
|
9690
|
-
onChoiceChanged: this._onChange.bind(this)
|
|
9702
|
+
onChoiceChanged: this._onChange.bind(this),
|
|
9703
|
+
onShowCorrectToggle: this.onShowCorrectToggle.bind(this)
|
|
9691
9704
|
});
|
|
9692
9705
|
this.setAttribute('aria-label', this._model.choiceMode === 'radio' ? 'Multiple Choice Question' : 'Multiple Correct Answer Question');
|
|
9693
9706
|
this.setAttribute('role', 'region');
|
|
@@ -9729,6 +9742,9 @@ class MultipleChoice extends HTMLElement {
|
|
|
9729
9742
|
trailing: true
|
|
9730
9743
|
});
|
|
9731
9744
|
}
|
|
9745
|
+
onShowCorrectToggle() {
|
|
9746
|
+
renderMath(this);
|
|
9747
|
+
}
|
|
9732
9748
|
setLangAttribute() {
|
|
9733
9749
|
const language = this._model && typeof this._model.language ? this._model.language : '';
|
|
9734
9750
|
const lang = language ? language.slice(0, 2) : 'en';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/ebsr",
|
|
3
|
-
"version": "9.18.4-next.
|
|
3
|
+
"version": "9.18.4-next.33+30ae254b0",
|
|
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": "^8.21.4-next.
|
|
10
|
+
"@pie-element/multiple-choice": "^8.21.4-next.33+30ae254b0",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"debug": "^4.1.1",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"author": "pie framework developers",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "30ae254b0e3021389a52c7ab6cbf78a9868be728",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postpublish": "../../scripts/postpublish"
|
|
21
21
|
},
|