@pie-element/multiple-choice 5.9.3-next.775 → 5.9.3-next.804
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/CHANGELOG.md +79 -0
- package/configure/CHANGELOG.md +73 -0
- package/configure/lib/main.js +42 -45
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/utils.js +18 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +4 -4
- package/controller/lib/index.js +1 -1
- package/controller/lib/index.js.map +1 -1
- package/module/configure.js +100 -64
- package/module/controller.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,85 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.5...@pie-element/multiple-choice@6.2.6) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.4...@pie-element/multiple-choice@6.2.5) (2022-03-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [6.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.3...@pie-element/multiple-choice@6.2.4) (2022-03-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [6.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.2...@pie-element/multiple-choice@6.2.3) (2022-03-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [6.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.1...@pie-element/multiple-choice@6.2.2) (2022-02-21)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [6.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.2.0...@pie-element/multiple-choice@6.2.1) (2022-02-04)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [6.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.1.11...@pie-element/multiple-choice@6.2.0) (2022-01-24)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* check if limitChoicesNumber is defined when adding a choice ([6f32cf0](https://github.com/pie-framework/pie-elements/commit/6f32cf05a1095b2be28864f2bb697080d05744f8))
|
|
60
|
+
* **multiple-choice:** fix colors for evaluate and view PD-1433 ([7050109](https://github.com/pie-framework/pie-elements/commit/705010946a1b0175fe19566d9daa86846fc55ca7))
|
|
61
|
+
* **multiple-choice:** limit choice number to 9 if it's defined ([4fa374c](https://github.com/pie-framework/pie-elements/commit/4fa374c77ca625522549ce68e1062ca4a5145b8b))
|
|
62
|
+
* **multiple-choice:** show choice prefix in print DNA-13066 ([52bd9bf](https://github.com/pie-framework/pie-elements/commit/52bd9bf862ad7adaf5ff0067a6738ad944b6d32d))
|
|
63
|
+
* **multiple-choice-print:** remove feedback ([25cbac5](https://github.com/pie-framework/pie-elements/commit/25cbac5647afe8864bedd9c50cd98abe6b31ddb0))
|
|
64
|
+
* **multiple-choice-print, ecr-print:** fix toggle issue, change options.mode to options.role ([0b3f534](https://github.com/pie-framework/pie-elements/commit/0b3f534bb4d2f969e21528e74516345e84f18d72))
|
|
65
|
+
* **multiple-choice, explicit-constructed-response, extended-text-entry:** print do not show teacher instructions, rationale or prompt if they are diabled DNA-13089 ([06b9555](https://github.com/pie-framework/pie-elements/commit/06b9555b25e094e0b2bce0e6a852a206c6d2c17d))
|
|
66
|
+
* show tick if available only in evaluate mode ([dddca13](https://github.com/pie-framework/pie-elements/commit/dddca137875221d3b52b17151163610f5eb1ea98))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* **multiple-choice:** set min and max number of choices. BREAKING CHANGE: removed limitChoicesNumber from config and added minAnswerChoices and maxAnswerChoices ([a467f8f](https://github.com/pie-framework/pie-elements/commit/a467f8f4827c032c88de480b25eb49efcf1486aa))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## [6.1.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.1.10...@pie-element/multiple-choice@6.1.11) (2022-01-11)
|
|
78
|
+
|
|
79
|
+
**Note:** Version bump only for package @pie-element/multiple-choice
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
6
85
|
## [6.1.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice@6.1.9...@pie-element/multiple-choice@6.1.10) (2022-01-10)
|
|
7
86
|
|
|
8
87
|
**Note:** Version bump only for package @pie-element/multiple-choice
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,79 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.5...@pie-element/multiple-choice-configure@4.1.6) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.4...@pie-element/multiple-choice-configure@4.1.5) (2022-03-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [4.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.3...@pie-element/multiple-choice-configure@4.1.4) (2022-03-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [4.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.2...@pie-element/multiple-choice-configure@4.1.3) (2022-03-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [4.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.1...@pie-element/multiple-choice-configure@4.1.2) (2022-02-21)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [4.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.0...@pie-element/multiple-choice-configure@4.1.1) (2022-02-04)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [4.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.11...@pie-element/multiple-choice-configure@4.1.0) (2022-01-24)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* check if limitChoicesNumber is defined when adding a choice ([6f32cf0](https://github.com/pie-framework/pie-elements/commit/6f32cf05a1095b2be28864f2bb697080d05744f8))
|
|
60
|
+
* **multiple-choice:** limit choice number to 9 if it's defined ([4fa374c](https://github.com/pie-framework/pie-elements/commit/4fa374c77ca625522549ce68e1062ca4a5145b8b))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* **multiple-choice:** set min and max number of choices. BREAKING CHANGE: removed limitChoicesNumber from config and added minAnswerChoices and maxAnswerChoices ([a467f8f](https://github.com/pie-framework/pie-elements/commit/a467f8f4827c032c88de480b25eb49efcf1486aa))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [4.0.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.10...@pie-element/multiple-choice-configure@4.0.11) (2022-01-11)
|
|
72
|
+
|
|
73
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
6
79
|
## [4.0.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.9...@pie-element/multiple-choice-configure@4.0.10) (2022-01-10)
|
|
7
80
|
|
|
8
81
|
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
package/configure/lib/main.js
CHANGED
|
@@ -51,6 +51,8 @@ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")
|
|
|
51
51
|
|
|
52
52
|
var _Info = _interopRequireDefault(require("@material-ui/icons/Info"));
|
|
53
53
|
|
|
54
|
+
var _utils = require("./utils");
|
|
55
|
+
|
|
54
56
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
55
57
|
|
|
56
58
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -121,15 +123,15 @@ var styles = function styles(theme) {
|
|
|
121
123
|
},
|
|
122
124
|
flexContainer: {
|
|
123
125
|
display: 'flex',
|
|
124
|
-
alignItems: 'center'
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
marginBottom: '5px'
|
|
125
128
|
},
|
|
126
129
|
titleText: {
|
|
127
130
|
fontFamily: 'Cerebri Sans',
|
|
128
131
|
fontSize: '18px',
|
|
129
132
|
lineHeight: '19px',
|
|
130
133
|
color: '#495B8F',
|
|
131
|
-
marginRight: '5px'
|
|
132
|
-
marginBottom: '5px'
|
|
134
|
+
marginRight: '5px'
|
|
133
135
|
},
|
|
134
136
|
tooltip: {
|
|
135
137
|
fontSize: '12px',
|
|
@@ -236,6 +238,8 @@ var Design = (0, _styles.withStyles)(styles)(function (props) {
|
|
|
236
238
|
maxAnswerChoices = MAX_CHOICES;
|
|
237
239
|
}
|
|
238
240
|
|
|
241
|
+
var validationMessage = (0, _utils.generateValidationMessage)(configuration);
|
|
242
|
+
|
|
239
243
|
var Content = /*#__PURE__*/_react["default"].createElement("div", null, teacherInstructionsEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
|
|
240
244
|
label: teacherInstructions.label,
|
|
241
245
|
className: classes.promptHolder
|
|
@@ -259,7 +263,26 @@ var Design = (0, _styles.withStyles)(styles)(function (props) {
|
|
|
259
263
|
disableUnderline: true,
|
|
260
264
|
toolbarOpts: toolbarOpts,
|
|
261
265
|
spellCheck: spellCheckEnabled
|
|
262
|
-
})),
|
|
266
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
267
|
+
className: classes.flexContainer
|
|
268
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
269
|
+
className: classes.titleText
|
|
270
|
+
}, "Choices"), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
271
|
+
classes: {
|
|
272
|
+
tooltip: classes.tooltip
|
|
273
|
+
},
|
|
274
|
+
disableFocusListener: true,
|
|
275
|
+
disableTouchListener: true,
|
|
276
|
+
placement: 'right',
|
|
277
|
+
title: validationMessage
|
|
278
|
+
}, /*#__PURE__*/_react["default"].createElement(_Info["default"], {
|
|
279
|
+
fontSize: 'small',
|
|
280
|
+
color: 'primary'
|
|
281
|
+
}))), correctResponseError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
282
|
+
className: classes.errorText
|
|
283
|
+
}, correctResponseError), answerChoicesError && /*#__PURE__*/_react["default"].createElement("div", {
|
|
284
|
+
className: classes.errorText
|
|
285
|
+
}, answerChoicesError), choices.map(function (choice, index) {
|
|
263
286
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
264
287
|
key: "choice-".concat(index),
|
|
265
288
|
className: classes.choiceConfigurationHolder
|
|
@@ -324,7 +347,7 @@ var Design = (0, _styles.withStyles)(styles)(function (props) {
|
|
|
324
347
|
}
|
|
325
348
|
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
326
349
|
classes: {
|
|
327
|
-
root: maxAnswerChoices && model.choices.length >= maxAnswerChoices
|
|
350
|
+
root: maxAnswerChoices && model.choices.length >= maxAnswerChoices && classes.disableButton
|
|
328
351
|
},
|
|
329
352
|
className: classes.addButton,
|
|
330
353
|
variant: "contained",
|
|
@@ -428,13 +451,6 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
428
451
|
open: false
|
|
429
452
|
}
|
|
430
453
|
});
|
|
431
|
-
},
|
|
432
|
-
onCancel: function onCancel() {
|
|
433
|
-
return _this.setState({
|
|
434
|
-
dialog: {
|
|
435
|
-
open: false
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
454
|
}
|
|
439
455
|
}
|
|
440
456
|
});
|
|
@@ -460,40 +476,21 @@ var Main = /*#__PURE__*/function (_React$Component) {
|
|
|
460
476
|
maxAnswerChoices = MAX_CHOICES;
|
|
461
477
|
}
|
|
462
478
|
|
|
463
|
-
if (maxAnswerChoices && model.choices.length
|
|
464
|
-
|
|
465
|
-
dialog: {
|
|
466
|
-
open: true,
|
|
467
|
-
message: "There can't be more than ".concat(maxAnswerChoices, " choices."),
|
|
468
|
-
onOk: function onOk() {
|
|
469
|
-
_this.setState({
|
|
470
|
-
dialog: {
|
|
471
|
-
open: false
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
},
|
|
475
|
-
onCancel: function onCancel() {
|
|
476
|
-
return _this.setState({
|
|
477
|
-
dialog: {
|
|
478
|
-
open: false
|
|
479
|
-
}
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
} else {
|
|
485
|
-
model.choices.push({
|
|
486
|
-
label: '',
|
|
487
|
-
value: _configUi.choiceUtils.firstAvailableIndex(model.choices.map(function (c) {
|
|
488
|
-
return c.value;
|
|
489
|
-
}), 0),
|
|
490
|
-
feedback: {
|
|
491
|
-
type: 'none'
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
_this.props.onModelChanged(model);
|
|
479
|
+
if (maxAnswerChoices && model.choices.length >= maxAnswerChoices) {
|
|
480
|
+
return;
|
|
496
481
|
}
|
|
482
|
+
|
|
483
|
+
model.choices.push({
|
|
484
|
+
label: '',
|
|
485
|
+
value: _configUi.choiceUtils.firstAvailableIndex(model.choices.map(function (c) {
|
|
486
|
+
return c.value;
|
|
487
|
+
}), 0),
|
|
488
|
+
feedback: {
|
|
489
|
+
type: 'none'
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
_this.props.onModelChanged(model);
|
|
497
494
|
});
|
|
498
495
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChoiceChanged", function (index, choice) {
|
|
499
496
|
var model = _this.props.model;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","radio","dropdown","MAX_CHOICES","styles","theme","promptHolder","width","paddingBottom","spacing","unit","marginBottom","prompt","paddingTop","rationaleHolder","accessibilityHolder","rationale","accessibility","design","choiceConfigurationHolder","display","flexDirection","alignItems","choiceConfiguration","switchElement","justifyContent","margin","addButton","disableButton","cursor","pointerEvents","backgroundColor","color","disabled","flexContainer","titleText","fontFamily","fontSize","lineHeight","marginRight","tooltip","whiteSpace","maxWidth","errorText","Design","props","classes","model","configuration","onPromptChanged","onChoiceChanged","onRemoveChoice","onAddChoice","imageSupport","onChangeModel","onConfigurationChanged","onTeacherInstructionsChanged","addChoiceButton","feedback","deleteChoice","choiceMode","choicePrefix","partialScoring","lockChoiceOrder","teacherInstructions","studentInstructions","scoringType","sequentialChoiceLabels","settingsPanelDisabled","choicesLayout","spellCheck","gridColumns","maxAnswerChoices","limitChoicesNumber","teacherInstructionsEnabled","rationaleEnabled","accessibilityLabelsEnabled","feedbackEnabled","promptEnabled","spellCheckEnabled","choices","nrOfColumnsAvailable","length","Array","from","_","i","labelPlugins","audio","video","toolbarOpts","toolbarEditorPosition","position","Content","label","map","choice","index","c","root","undefined","settingsInPanel","Settings","Properties","studentInstructionsEnabled","InfoDialog","open","onCancel","onOk","title","propTypes","PropTypes","bool","func","string","Main","dialog","minAnswerChoices","setState","message","splice","onModelChanged","push","value","utils","firstAvailableIndex","type","correct","key","correctFound","state","React","Component","object","isRequired","disableSidePanel","shape","add","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA2CC,kBAA3C,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA2CD,kBAA3C,CAAeC,MAAf;AAAA,IAAuBC,KAAvB,GAA2CF,kBAA3C,CAAuBE,KAAvB;AAAA,IAA8BC,QAA9B,GAA2CH,kBAA3C,CAA8BG,QAA9B;AAEA,IAAMC,WAAW,GAAG,CAApB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,aAAa,EAAEH,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB,CAFxB;AAGZC,MAAAA,YAAY,EAAEN,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB;AAHvB,KADW;AAMzBE,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAER,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB,CAD3B;AAENH,MAAAA,KAAK,EAAE;AAFD,KANiB;AAUzBO,IAAAA,eAAe,EAAE;AACfP,MAAAA,KAAK,EAAE;AADQ,KAVQ;AAazBQ,IAAAA,mBAAmB,EAAE;AACnBR,MAAAA,KAAK,EAAE;AADY,KAbI;AAgBzBS,IAAAA,SAAS,EAAE;AACTH,MAAAA,UAAU,EAAER,KAAK,CAACI,OAAN,CAAcC,IAAd,GAAqB;AADxB,KAhBc;AAmBzBO,IAAAA,aA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AAA,IAAI,EAAES,MAAM,CAACR;AAJf,QADF,eAOE,gCAAC,MAAD,gCACM,KAAK/D,KADX;AAEE,QAAA,aAAa,EAAE,KAAK4E,cAFtB;AAGE,QAAA,cAAc,EAAE,KAAKtE,cAHvB;AAIE,QAAA,eAAe,EAAE,KAAKD,eAJxB;AAKE,QAAA,WAAW,EAAE,KAAKE,WALpB;AAME,QAAA,eAAe,EAAE,KAAKH,eANxB;AAOE,QAAA,4BAA4B,EAAE,KAAKO;AAPrC,SAPF,CADF;AAmBD;;;EAhLuB2E,kBAAMC,S;;;iCAAnBjB,I,eACQ;AACjBpE,EAAAA,KAAK,EAAEgE,sBAAUsB,MAAV,CAAiBC,UADP;AAEjBtF,EAAAA,aAAa,EAAE+D,sBAAUsB,MAAV,CAAiBC,UAFf;AAGjBC,EAAAA,gBAAgB,EAAExB,sBAAUC,IAHX;AAIjBS,EAAAA,cAAc,EAAEV,sBAAUE,IAAV,CAAeqB,UAJd;AAKjB/E,EAAAA,sBAAsB,EAAEwD,sBAAUE,IAAV,CAAeqB,UALtB;AAMjBxF,EAAAA,OAAO,EAAEiE,sBAAUsB,MAAV,CAAiBC,UANT;AAOjBjF,EAAAA,YAAY,EAAE0D,sBAAUyB,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAE1B,sBAAUE,IAAV,CAAeqB,UADQ;AAE5B,cAAQvB,sBAAUE,IAAV,CAAeqB;AAFK,GAAhB;AAPG,C;AAkLrB,IAAMI,MAAM,GAAG,wBAAWtI,MAAX,EAAmB+G,IAAnB,CAAf;eAEeuB,M","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html';\nimport {\n InputContainer,\n ChoiceConfiguration,\n settings,\n layout,\n choiceUtils as utils,\n} from '@pie-lib/config-ui';\nimport { color } from '@pie-lib/render-ui';\nimport { withStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport merge from 'lodash/merge';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\n\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst MAX_CHOICES = 9;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingBottom: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n rationaleHolder: {\n width: '70%',\n },\n accessibilityHolder: {\n width: '70%',\n },\n rationale: {\n paddingTop: theme.spacing.unit * 2,\n },\n accessibility: {\n paddingTop: theme.spacing.unit * 2,\n },\n design: {\n paddingTop: theme.spacing.unit * 3,\n },\n choiceConfigurationHolder: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n choiceConfiguration: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n switchElement: {\n justifyContent: 'space-between',\n margin: 0,\n },\n addButton: {\n float: 'right',\n },\n disableButton: {\n cursor: 'not-allowed',\n pointerEvents: 'all',\n backgroundColor: color.disabled(),\n '&:hover': {\n backgroundColor: color.disabled(),\n },\n '&:focus': {\n backgroundColor: color.disabled(),\n },\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n titleText: {\n fontFamily: 'Cerebri Sans',\n fontSize: '18px',\n lineHeight: '19px',\n color: '#495B8F',\n marginRight: '5px',\n marginBottom: '5px'\n },\n tooltip: {\n fontSize: '12px',\n whiteSpace: 'pre',\n maxWidth: '500px'\n },\n errorText: {\n fontSize: '12px',\n color: 'red',\n paddingTop: '5px'\n }\n});\n\nconst Design = withStyles(styles)((props) => {\n const {\n classes,\n model,\n configuration,\n onPromptChanged,\n onChoiceChanged,\n onRemoveChoice,\n onAddChoice,\n imageSupport,\n onChangeModel,\n onConfigurationChanged,\n onTeacherInstructionsChanged,\n } = props;\n const {\n prompt = {},\n addChoiceButton = {},\n feedback = {},\n deleteChoice = {},\n choiceMode = {},\n choicePrefix = {},\n partialScoring = {},\n lockChoiceOrder = {},\n teacherInstructions = {},\n studentInstructions = {},\n rationale = {},\n accessibility = {},\n scoringType = {},\n sequentialChoiceLabels = {},\n settingsPanelDisabled,\n choicesLayout,\n spellCheck = {},\n gridColumns,\n } = configuration || {};\n let { maxAnswerChoices } = configuration || {};\n const {\n limitChoicesNumber,\n teacherInstructionsEnabled,\n rationaleEnabled,\n accessibilityLabelsEnabled,\n feedbackEnabled,\n promptEnabled,\n spellCheckEnabled,\n choices,\n // errors\n } = model || {};\n\n // const { choicesErrors, correctResponseError, answerChoicesError } = errors || {};\n const nrOfColumnsAvailable =\n choices && choices.length\n ? Array.from({ length: choices.length }, (_, i) => `${i + 1}`)\n : [];\n\n const labelPlugins = {\n audio: { disabled: true },\n video: { disabled: true },\n };\n\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n // if old property is used, set maxAnswerChoices to 9\n if (limitChoicesNumber) {\n maxAnswerChoices = MAX_CHOICES;\n }\n\n const Content = (\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n {/*<div className={classes.flexContainer}>*/}\n {/* <Typography className={classes.titleText}>Choices</Typography>*/}\n {/*<Tooltip*/}\n {/* classes={{tooltip: classes.tooltip}}*/}\n {/* disableFocusListener*/}\n {/* disableTouchListener*/}\n {/* placement={'right'}*/}\n {/* title={'Validation requirements:\\nThere should at least two answer choices, non-blank and unique.\\nA correct answer must be defined.'}*/}\n {/*>*/}\n {/* <Info fontSize={'small'} color={'primary'}/>*/}\n {/*</Tooltip>*/}\n {/*</div>*/}\n {/*{correctResponseError && <div className={classes.errorText}>{correctResponseError}</div>}*/}\n {/*{answerChoicesError && <div className={classes.errorText}>{answerChoicesError}</div>}*/}\n {choices.map((choice, index) => (\n <div\n key={`choice-${index}`}\n className={classes.choiceConfigurationHolder}\n >\n <ChoiceConfiguration\n key={index}\n index={index + 1}\n useLetterOrdering={model.choicePrefix === 'letters'}\n className={classes.choiceConfiguration}\n mode={model.choiceMode}\n data={choice}\n defaultFeedback={{}}\n imageSupport={imageSupport}\n onDelete={() => onRemoveChoice(index)}\n onChange={(c) => onChoiceChanged(index, c)}\n allowFeedBack={feedbackEnabled}\n allowDelete={deleteChoice.settings}\n noLabels\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n // error={choicesErrors && choicesErrors[choice.value] ? choicesErrors[choice.value] : null}\n // noCorrectAnswerError={correctResponseError}\n />\n {rationaleEnabled && (\n <InputContainer\n key={`rationale-${index}`}\n label={rationale.label}\n className={classes.rationaleHolder}\n >\n <EditableHtml\n className={classes.rationale}\n markup={choice.rationale || ''}\n onChange={(c) =>\n onChoiceChanged(index, {\n ...choice,\n rationale: c,\n })\n }\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n pluginProps={labelPlugins}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n {accessibilityLabelsEnabled && (\n <InputContainer\n key={`accessibility-${index}`}\n label={accessibility.label}\n className={classes.accessibilityHolder}\n >\n <EditableHtml\n className={classes.accessibility}\n markup={choice.accessibility || ''}\n onChange={(c) =>\n onChoiceChanged(index, {\n ...choice,\n accessibility: c,\n })\n }\n imageSupport={imageSupport}\n pluginProps={labelPlugins}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n </div>\n ))}\n <br />\n {addChoiceButton.settings && (\n <Tooltip\n title={\n maxAnswerChoices && model.choices.length >= maxAnswerChoices\n ? `Only ${maxAnswerChoices} allowed maximum`\n : ''\n }\n classes={{ tooltip: classes.tooltip }}\n >\n <Button\n classes={{\n root:\n maxAnswerChoices && model.choices.length >= maxAnswerChoices\n ? classes.disableButton\n : undefined,\n }}\n className={classes.addButton}\n variant=\"contained\"\n color=\"primary\"\n onClick={onAddChoice}\n >\n {addChoiceButton.label}\n </Button>\n </Tooltip>\n )}\n </div>\n );\n\n const settingsInPanel = {\n choiceMode:\n choiceMode.settings && radio(choiceMode.label, ['checkbox', 'radio']),\n 'sequentialChoiceLabels.enabled':\n sequentialChoiceLabels.settings &&\n toggle(sequentialChoiceLabels.label, true),\n choicePrefix:\n choicePrefix.settings &&\n radio(choicePrefix.label, ['numbers', 'letters']),\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n choicesLayout:\n choicesLayout.settings &&\n dropdown(choicesLayout.label, ['vertical', 'grid', 'horizontal']),\n gridColumns:\n choicesLayout.settings &&\n model.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.length > 0 &&\n dropdown(gridColumns.label, nrOfColumnsAvailable),\n };\n\n return (\n <div className={classes.design}>\n {settingsPanelDisabled ? (\n Content\n ) : (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onChangeModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: settingsInPanel,\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n rationaleEnabled:\n rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n accessibilityLabelsEnabled:\n accessibility.settings && toggle(accessibility.label),\n scoringType:\n scoringType.settings &&\n radio(scoringType.label, ['auto', 'rubric']),\n },\n }}\n />\n }\n >\n {Content}\n </layout.ConfigLayout>\n )}\n </div>\n );\n});\n\nconst InfoDialog = ({ open, onCancel, onOk, title }) => (\n <Dialog open={open}>\n <DialogTitle>{title}</DialogTitle>\n <DialogActions>\n {onOk && (\n <Button onClick={onOk} color=\"primary\">\n OK\n </Button>\n )}\n {onCancel && (\n <Button onClick={onCancel} color=\"primary\">\n Cancel\n </Button>\n )}\n </DialogActions>\n </Dialog>\n);\n\nInfoDialog.propTypes = {\n open: PropTypes.bool,\n onCancel: PropTypes.func,\n onOk: PropTypes.func,\n title: PropTypes.string,\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n state = {\n dialog: {\n open: false,\n },\n };\n\n onRemoveChoice = (index) => {\n const { model, configuration } = this.props;\n const { minAnswerChoices } = configuration || {};\n\n if (minAnswerChoices && model.choices.length === minAnswerChoices) {\n this.setState({\n dialog: {\n open: true,\n message: `There can't be less than ${minAnswerChoices} choices.`,\n onOk: () => {\n this.setState({\n dialog: {\n open: false,\n },\n });\n },\n onCancel: () =>\n this.setState({\n dialog: {\n open: false,\n },\n }),\n },\n });\n } else {\n model.choices.splice(index, 1);\n this.props.onModelChanged(model);\n }\n };\n\n onAddChoice = () => {\n const { model, configuration } = this.props;\n let { maxAnswerChoices } = configuration || {};\n const { limitChoicesNumber } = model || {};\n\n // if old property is used, set maxAnswerChoices to 9\n if (limitChoicesNumber) {\n maxAnswerChoices = MAX_CHOICES;\n }\n\n if (maxAnswerChoices && model.choices.length === maxAnswerChoices) {\n this.setState({\n dialog: {\n open: true,\n message: `There can't be more than ${maxAnswerChoices} choices.`,\n onOk: () => {\n this.setState({\n dialog: {\n open: false,\n },\n });\n },\n onCancel: () =>\n this.setState({\n dialog: {\n open: false,\n },\n }),\n },\n });\n } else {\n model.choices.push({\n label: '',\n value: utils.firstAvailableIndex(\n model.choices.map((c) => c.value),\n 0\n ),\n feedback: {\n type: 'none',\n },\n });\n\n this.props.onModelChanged(model);\n }\n };\n\n onChoiceChanged = (index, choice) => {\n const { model } = this.props;\n\n if (choice.correct && model.choiceMode === 'radio') {\n model.choices = model.choices.map((c) => {\n return merge({}, c, { correct: false });\n });\n }\n\n model.choices.splice(index, 1, choice);\n this.props.onModelChanged(model);\n };\n\n onPromptChanged = (prompt) => {\n this.props.onModelChanged({\n ...this.props.model,\n prompt,\n });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n onModelChanged = (model, key) => {\n const { onModelChanged } = this.props;\n\n switch (key) {\n case 'choiceMode': {\n let value = model.choiceMode;\n\n if (value === 'radio') {\n let correctFound = false;\n\n model.choices = model.choices.map((c) => {\n if (correctFound) {\n c.correct = false;\n return c;\n }\n\n if (c.correct) {\n correctFound = true;\n }\n return c;\n });\n }\n onModelChanged(model, true);\n break;\n }\n default:\n onModelChanged(model);\n break;\n }\n };\n\n render() {\n const { dialog } = this.state;\n\n return (\n <>\n <InfoDialog\n open={dialog.open}\n title={dialog.message}\n onCancel={dialog.onCancel}\n onOk={dialog.onOk}\n />\n <Design\n {...this.props}\n onChangeModel={this.onModelChanged}\n onRemoveChoice={this.onRemoveChoice}\n onChoiceChanged={this.onChoiceChanged}\n onAddChoice={this.onAddChoice}\n onPromptChanged={this.onPromptChanged}\n onTeacherInstructionsChanged={this.onTeacherInstructionsChanged}\n />\n </>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|
|
1
|
+
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","radio","dropdown","MAX_CHOICES","styles","theme","promptHolder","width","paddingBottom","spacing","unit","marginBottom","prompt","paddingTop","rationaleHolder","accessibilityHolder","rationale","accessibility","design","choiceConfigurationHolder","display","flexDirection","alignItems","choiceConfiguration","switchElement","justifyContent","margin","addButton","disableButton","cursor","pointerEvents","backgroundColor","color","disabled","flexContainer","titleText","fontFamily","fontSize","lineHeight","marginRight","tooltip","whiteSpace","maxWidth","errorText","Design","props","classes","model","configuration","onPromptChanged","onChoiceChanged","onRemoveChoice","onAddChoice","imageSupport","onChangeModel","onConfigurationChanged","onTeacherInstructionsChanged","addChoiceButton","feedback","deleteChoice","choiceMode","choicePrefix","partialScoring","lockChoiceOrder","teacherInstructions","studentInstructions","scoringType","sequentialChoiceLabels","settingsPanelDisabled","choicesLayout","spellCheck","gridColumns","maxAnswerChoices","limitChoicesNumber","teacherInstructionsEnabled","rationaleEnabled","accessibilityLabelsEnabled","feedbackEnabled","promptEnabled","spellCheckEnabled","choices","nrOfColumnsAvailable","length","Array","from","_","i","labelPlugins","audio","video","toolbarOpts","toolbarEditorPosition","position","validationMessage","Content","label","correctResponseError","answerChoicesError","map","choice","index","c","root","settingsInPanel","Settings","Properties","studentInstructionsEnabled","InfoDialog","open","onCancel","onOk","title","propTypes","PropTypes","bool","func","string","Main","dialog","minAnswerChoices","setState","message","splice","onModelChanged","push","value","utils","firstAvailableIndex","type","correct","key","correctFound","state","React","Component","object","isRequired","disableSidePanel","shape","add","Styled"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;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,WAAW,EAAE,KAAKE,WALpB;AAME,QAAA,eAAe,EAAE,KAAKH,eANxB;AAOE,QAAA,4BAA4B,EAAE,KAAKO;AAPrC,SAPF,CADF;AAmBD;;;EAtJuB6E,kBAAMC,S;;;iCAAnBjB,I,eACQ;AACjBtE,EAAAA,KAAK,EAAEkE,sBAAUsB,MAAV,CAAiBC,UADP;AAEjBxF,EAAAA,aAAa,EAAEiE,sBAAUsB,MAAV,CAAiBC,UAFf;AAGjBC,EAAAA,gBAAgB,EAAExB,sBAAUC,IAHX;AAIjBS,EAAAA,cAAc,EAAEV,sBAAUE,IAAV,CAAeqB,UAJd;AAKjBjF,EAAAA,sBAAsB,EAAE0D,sBAAUE,IAAV,CAAeqB,UALtB;AAMjB1F,EAAAA,OAAO,EAAEmE,sBAAUsB,MAAV,CAAiBC,UANT;AAOjBnF,EAAAA,YAAY,EAAE4D,sBAAUyB,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAE1B,sBAAUE,IAAV,CAAeqB,UADQ;AAE5B,cAAQvB,sBAAUE,IAAV,CAAeqB;AAFK,GAAhB;AAPG,C;AAwJrB,IAAMI,MAAM,GAAG,wBAAWxI,MAAX,EAAmBiH,IAAnB,CAAf;eAEeuB,M","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport EditableHtml from '@pie-lib/editable-html';\nimport {\n InputContainer,\n ChoiceConfiguration,\n settings,\n layout,\n choiceUtils as utils,\n} from '@pie-lib/config-ui';\nimport { color } from '@pie-lib/render-ui';\nimport { withStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport merge from 'lodash/merge';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport { generateValidationMessage } from './utils';\n\nconst { Panel, toggle, radio, dropdown } = settings;\n\nconst MAX_CHOICES = 9;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingBottom: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n rationaleHolder: {\n width: '70%',\n },\n accessibilityHolder: {\n width: '70%',\n },\n rationale: {\n paddingTop: theme.spacing.unit * 2,\n },\n accessibility: {\n paddingTop: theme.spacing.unit * 2,\n },\n design: {\n paddingTop: theme.spacing.unit * 3,\n },\n choiceConfigurationHolder: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n choiceConfiguration: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n switchElement: {\n justifyContent: 'space-between',\n margin: 0,\n },\n addButton: {\n float: 'right',\n },\n disableButton: {\n cursor: 'not-allowed',\n pointerEvents: 'all',\n backgroundColor: color.disabled(),\n '&:hover': {\n backgroundColor: color.disabled(),\n },\n '&:focus': {\n backgroundColor: color.disabled(),\n },\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: '5px'\n },\n titleText: {\n fontFamily: 'Cerebri Sans',\n fontSize: '18px',\n lineHeight: '19px',\n color: '#495B8F',\n marginRight: '5px'\n },\n tooltip: {\n fontSize: '12px',\n whiteSpace: 'pre',\n maxWidth: '500px'\n },\n errorText: {\n fontSize: '12px',\n color: 'red',\n paddingTop: '5px'\n }\n});\n\nconst Design = withStyles(styles)((props) => {\n const {\n classes,\n model,\n configuration,\n onPromptChanged,\n onChoiceChanged,\n onRemoveChoice,\n onAddChoice,\n imageSupport,\n onChangeModel,\n onConfigurationChanged,\n onTeacherInstructionsChanged,\n } = props;\n const {\n prompt = {},\n addChoiceButton = {},\n feedback = {},\n deleteChoice = {},\n choiceMode = {},\n choicePrefix = {},\n partialScoring = {},\n lockChoiceOrder = {},\n teacherInstructions = {},\n studentInstructions = {},\n rationale = {},\n accessibility = {},\n scoringType = {},\n sequentialChoiceLabels = {},\n settingsPanelDisabled,\n choicesLayout,\n spellCheck = {},\n gridColumns\n } = configuration || {};\n let { maxAnswerChoices } = configuration || {};\n const {\n limitChoicesNumber,\n teacherInstructionsEnabled,\n rationaleEnabled,\n accessibilityLabelsEnabled,\n feedbackEnabled,\n promptEnabled,\n spellCheckEnabled,\n choices,\n // errors\n } = model || {};\n\n // const { choicesErrors, correctResponseError, answerChoicesError } = errors || {};\n const nrOfColumnsAvailable =\n choices && choices.length\n ? Array.from({ length: choices.length }, (_, i) => `${i + 1}`)\n : [];\n\n const labelPlugins = {\n audio: { disabled: true },\n video: { disabled: true },\n };\n\n const toolbarOpts = {};\n\n switch (model.toolbarEditorPosition) {\n case 'top':\n toolbarOpts.position = 'top';\n break;\n default:\n toolbarOpts.position = 'bottom';\n break;\n }\n\n // if old property is used, set maxAnswerChoices to 9\n if (limitChoicesNumber) {\n maxAnswerChoices = MAX_CHOICES;\n }\n\n const validationMessage = generateValidationMessage(configuration);\n\n const Content = (\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n <div className={classes.flexContainer}>\n <Typography className={classes.titleText}>Choices</Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'}/>\n </Tooltip>\n </div>\n {correctResponseError && <div className={classes.errorText}>{correctResponseError}</div>}\n {answerChoicesError && <div className={classes.errorText}>{answerChoicesError}</div>}\n {choices.map((choice, index) => (\n <div\n key={`choice-${index}`}\n className={classes.choiceConfigurationHolder}\n >\n <ChoiceConfiguration\n key={index}\n index={index + 1}\n useLetterOrdering={model.choicePrefix === 'letters'}\n className={classes.choiceConfiguration}\n mode={model.choiceMode}\n data={choice}\n defaultFeedback={{}}\n imageSupport={imageSupport}\n onDelete={() => onRemoveChoice(index)}\n onChange={(c) => onChoiceChanged(index, c)}\n allowFeedBack={feedbackEnabled}\n allowDelete={deleteChoice.settings}\n noLabels\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n // error={choicesErrors && choicesErrors[choice.value] ? choicesErrors[choice.value] : null}\n // noCorrectAnswerError={correctResponseError}\n />\n {rationaleEnabled && (\n <InputContainer\n key={`rationale-${index}`}\n label={rationale.label}\n className={classes.rationaleHolder}\n >\n <EditableHtml\n className={classes.rationale}\n markup={choice.rationale || ''}\n onChange={(c) =>\n onChoiceChanged(index, {\n ...choice,\n rationale: c,\n })\n }\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n pluginProps={labelPlugins}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n {accessibilityLabelsEnabled && (\n <InputContainer\n key={`accessibility-${index}`}\n label={accessibility.label}\n className={classes.accessibilityHolder}\n >\n <EditableHtml\n className={classes.accessibility}\n markup={choice.accessibility || ''}\n onChange={(c) =>\n onChoiceChanged(index, {\n ...choice,\n accessibility: c,\n })\n }\n imageSupport={imageSupport}\n pluginProps={labelPlugins}\n spellCheck={spellCheckEnabled}\n />\n </InputContainer>\n )}\n </div>\n ))}\n <br />\n {addChoiceButton.settings && (\n <Tooltip\n title={\n maxAnswerChoices && model.choices.length >= maxAnswerChoices\n ? `Only ${maxAnswerChoices} allowed maximum`\n : ''\n }\n classes={{ tooltip: classes.tooltip }}\n >\n <Button\n classes={{ root: maxAnswerChoices && model.choices.length >= maxAnswerChoices && classes.disableButton }}\n className={classes.addButton}\n variant=\"contained\"\n color=\"primary\"\n onClick={onAddChoice}\n >\n {addChoiceButton.label}\n </Button>\n </Tooltip>\n )}\n </div>\n );\n\n const settingsInPanel = {\n choiceMode:\n choiceMode.settings && radio(choiceMode.label, ['checkbox', 'radio']),\n 'sequentialChoiceLabels.enabled':\n sequentialChoiceLabels.settings &&\n toggle(sequentialChoiceLabels.label, true),\n choicePrefix:\n choicePrefix.settings &&\n radio(choicePrefix.label, ['numbers', 'letters']),\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n choicesLayout:\n choicesLayout.settings &&\n dropdown(choicesLayout.label, ['vertical', 'grid', 'horizontal']),\n gridColumns:\n choicesLayout.settings &&\n model.choicesLayout === 'grid' &&\n nrOfColumnsAvailable.length > 0 &&\n dropdown(gridColumns.label, nrOfColumnsAvailable),\n };\n\n return (\n <div className={classes.design}>\n {settingsPanelDisabled ? (\n Content\n ) : (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n onChangeModel={onChangeModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: settingsInPanel,\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n studentInstructionsEnabled:\n studentInstructions.settings &&\n toggle(studentInstructions.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n rationaleEnabled:\n rationale.settings && toggle(rationale.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n accessibilityLabelsEnabled:\n accessibility.settings && toggle(accessibility.label),\n scoringType:\n scoringType.settings &&\n radio(scoringType.label, ['auto', 'rubric']),\n },\n }}\n />\n }\n >\n {Content}\n </layout.ConfigLayout>\n )}\n </div>\n );\n});\n\nconst InfoDialog = ({ open, onCancel, onOk, title }) => (\n <Dialog open={open}>\n <DialogTitle>{title}</DialogTitle>\n <DialogActions>\n {onOk && (\n <Button onClick={onOk} color=\"primary\">\n OK\n </Button>\n )}\n {onCancel && (\n <Button onClick={onCancel} color=\"primary\">\n Cancel\n </Button>\n )}\n </DialogActions>\n </Dialog>\n);\n\nInfoDialog.propTypes = {\n open: PropTypes.bool,\n onCancel: PropTypes.func,\n onOk: PropTypes.func,\n title: PropTypes.string,\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n state = {\n dialog: {\n open: false,\n },\n };\n\n onRemoveChoice = (index) => {\n const { model, configuration } = this.props;\n const { minAnswerChoices } = configuration || {};\n\n if (minAnswerChoices && model.choices.length === minAnswerChoices) {\n this.setState({\n dialog: {\n open: true,\n message: `There can't be less than ${minAnswerChoices} choices.`,\n onOk: () => {\n this.setState({\n dialog: {\n open: false,\n },\n });\n }\n }\n });\n } else {\n model.choices.splice(index, 1);\n this.props.onModelChanged(model);\n }\n };\n\n onAddChoice = () => {\n const { model, configuration } = this.props;\n let { maxAnswerChoices } = configuration || {};\n const { limitChoicesNumber } = model || {};\n\n // if old property is used, set maxAnswerChoices to 9\n if (limitChoicesNumber) {\n maxAnswerChoices = MAX_CHOICES;\n }\n\n if (maxAnswerChoices && model.choices.length >= maxAnswerChoices) {\n return;\n }\n\n model.choices.push({\n label: '',\n value: utils.firstAvailableIndex(model.choices.map((c) => c.value), 0),\n feedback: { type: 'none' }\n });\n\n this.props.onModelChanged(model);\n };\n\n onChoiceChanged = (index, choice) => {\n const { model } = this.props;\n\n if (choice.correct && model.choiceMode === 'radio') {\n model.choices = model.choices.map((c) => {\n return merge({}, c, { correct: false });\n });\n }\n\n model.choices.splice(index, 1, choice);\n this.props.onModelChanged(model);\n };\n\n onPromptChanged = (prompt) => {\n this.props.onModelChanged({\n ...this.props.model,\n prompt,\n });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n onModelChanged = (model, key) => {\n const { onModelChanged } = this.props;\n\n switch (key) {\n case 'choiceMode': {\n let value = model.choiceMode;\n\n if (value === 'radio') {\n let correctFound = false;\n\n model.choices = model.choices.map((c) => {\n if (correctFound) {\n c.correct = false;\n\n return c;\n }\n\n if (c.correct) {\n correctFound = true;\n }\n\n return c;\n });\n }\n\n onModelChanged(model, true);\n break;\n }\n default:\n onModelChanged(model);\n break;\n }\n };\n\n render() {\n const { dialog } = this.state;\n\n return (\n <>\n <InfoDialog\n open={dialog.open}\n title={dialog.message}\n onCancel={dialog.onCancel}\n onOk={dialog.onOk}\n />\n <Design\n {...this.props}\n onChangeModel={this.onModelChanged}\n onRemoveChoice={this.onRemoveChoice}\n onChoiceChanged={this.onChoiceChanged}\n onAddChoice={this.onAddChoice}\n onPromptChanged={this.onPromptChanged}\n onTeacherInstructionsChanged={this.onTeacherInstructionsChanged}\n />\n </>\n );\n }\n}\n\nconst Styled = withStyles(styles)(Main);\n\nexport default Styled;\n"],"file":"main.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateValidationMessage = void 0;
|
|
7
|
+
|
|
8
|
+
var generateValidationMessage = function generateValidationMessage(config) {
|
|
9
|
+
var minAnswerChoices = config.minAnswerChoices,
|
|
10
|
+
maxAnswerChoices = config.maxAnswerChoices;
|
|
11
|
+
var answerChoicesMessage = "\nThere should be at least ".concat(minAnswerChoices, " ") + (maxAnswerChoices ? "and at most ".concat(maxAnswerChoices, " ") : '') + 'answer choices defined.' + '\nEvery answer choice should be non-blank and unique.';
|
|
12
|
+
var correctAnswerMessage = '\nA correct answer must be defined.';
|
|
13
|
+
var message = 'Validation requirements:' + answerChoicesMessage + correctAnswerMessage;
|
|
14
|
+
return message;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.generateValidationMessage = generateValidationMessage;
|
|
18
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.js"],"names":["generateValidationMessage","config","minAnswerChoices","maxAnswerChoices","answerChoicesMessage","correctAnswerMessage","message"],"mappings":";;;;;;;AAAO,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAAAC,MAAM,EAAI;AACjD,MAAQC,gBAAR,GAA+CD,MAA/C,CAAQC,gBAAR;AAAA,MAA0BC,gBAA1B,GAA+CF,MAA/C,CAA0BE,gBAA1B;AAEA,MAAMC,oBAAoB,GAAG,qCAA8BF,gBAA9B,UAC1BC,gBAAgB,yBAAkBA,gBAAlB,SAAwC,EAD9B,IACoC,yBADpC,GAE3B,uDAFF;AAIA,MAAME,oBAAoB,GAAG,qCAA7B;AAEA,MAAMC,OAAO,GAAG,6BAA6BF,oBAA7B,GAAoDC,oBAApE;AAEA,SAAOC,OAAP;AACD,CAZM","sourcesContent":["export const generateValidationMessage = config => {\n const { minAnswerChoices, maxAnswerChoices } = config;\n\n const answerChoicesMessage = `\\nThere should be at least ${minAnswerChoices} ` +\n (maxAnswerChoices ? `and at most ${maxAnswerChoices} ` : '') + 'answer choices defined.' +\n '\\nEvery answer choice should be non-blank and unique.';\n\n const correctAnswerMessage = '\\nA correct answer must be defined.';\n\n const message = 'Validation requirements:' + answerChoicesMessage + correctAnswerMessage;\n\n return message;\n};\n"],"file":"utils.js"}
|
package/configure/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multiple-choice-configure",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@material-ui/core": "^3.9.2",
|
|
9
9
|
"@material-ui/icons": "^3.0.1",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
11
|
-
"@pie-lib/config-ui": "10.11.0",
|
|
12
|
-
"@pie-lib/editable-html": "7.20.0",
|
|
13
|
-
"@pie-lib/scoring-config": "3.5.154",
|
|
11
|
+
"@pie-lib/config-ui": "^10.11.0",
|
|
12
|
+
"@pie-lib/editable-html": "^7.20.0",
|
|
13
|
+
"@pie-lib/scoring-config": "^3.5.154",
|
|
14
14
|
"debug": "^3.1.0",
|
|
15
15
|
"lodash": "^4.17.15",
|
|
16
16
|
"prop-types": "^15.6.2",
|
package/controller/lib/index.js
CHANGED
|
@@ -285,7 +285,7 @@ var validate = function validate() {
|
|
|
285
285
|
var nbOfChoices = (choices || []).length;
|
|
286
286
|
|
|
287
287
|
if (nbOfChoices < minAnswerChoices) {
|
|
288
|
-
errors.answerChoicesError = "
|
|
288
|
+
errors.answerChoicesError = "There should be at least ".concat(minAnswerChoices, " choices defined.");
|
|
289
289
|
} else if (nbOfChoices > maxAnswerChoices) {
|
|
290
290
|
errors.answerChoicesError = "No more than ".concat(maxAnswerChoices, " choices should be defined.");
|
|
291
291
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","role","mode","out","label","value","accessibilityLabelsEnabled","accessibility","textContent","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","createDefaultModel","Promise","resolve","defaults","normalize","question","verticalMode","choicesLayout","questionProps","session","updateSession","normalizedQuestion","Object","assign","incorrect","choices","map","lockChoiceOrder","disabled","prompt","promptEnabled","gridColumns","choiceMode","keyMode","choicePrefix","responseCorrect","undefined","teacherInstructions","teacherInstructionsEnabled","getScore","config","selectedChoices","correctChoices","filter","ch","score","reduce","acc","selectedChoice","find","length","str","parseFloat","toFixed","outcome","empty","partialScoringEnabled","partialScoring","enabled","createCorrectResponseSession","id","c","validate","minAnswerChoices","maxAnswerChoices","reversedChoices","reverse","choicesErrors","hasCorrectResponse","forEach","index","identicalAnswer","slice","some","errors","nbOfChoices","answerChoicesError","correctResponseError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAQC,GAAR,EAAaC,eAAb;AAAA,SAAiC,UAAAC,MAAM,EAAI;AAC/D,eAAuBF,GAAG,IAAI,EAA9B;AAAA,QAAQG,IAAR,QAAQA,IAAR;AAAA,QAAcC,IAAd,QAAcA,IAAd;;AACA,QAAMC,GAAG,GAAG;AACVC,MAAAA,KAAK,EAAEJ,MAAM,CAACI,KADJ;AAEVC,MAAAA,KAAK,EAAEL,MAAM,CAACK;AAFJ,KAAZ;;AAKA,QAAIR,KAAK,CAACS,0BAAV,EAAsC;AACpCH,MAAAA,GAAG,CAACI,aAAJ,GAAoB,sBAAUP,MAAM,CAACO,aAAjB,EAAgCC,WAAhC,IAA+CR,MAAM,CAACK,KAA1E;AACD;;AAED,QAAIJ,IAAI,KAAK,YAAT,KAA0BC,IAAI,KAAK,MAAT,IAAmBA,IAAI,KAAK,UAAtD,CAAJ,EAAuE;AACrEC,MAAAA,GAAG,CAACM,SAAJ,GAAgBZ,KAAK,CAACa,gBAAN,GAAyBV,MAAM,CAACS,SAAhC,GAA4C,IAA5D;AACD,KAFD,MAEO;AACLN,MAAAA,GAAG,CAACM,SAAJ,GAAgB,IAAhB;AACD;;AAED,QAAIP,IAAI,KAAK,UAAb,EAAyB;AACvBC,MAAAA,GAAG,CAACQ,OAAJ,GAAc,CAAC,CAACX,MAAM,CAACW,OAAvB;;AAEA,UAAId,KAAK,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8BAAvB;AACD,KAFD,MAEO;AACL,UAAMwE,eAAe,GAAGN,eAAe,CAACO,KAAhB,CAAsBF,KAAK,GAAG,CAA9B,EAAiCG,IAAjC,CAAsC,UAAAZ,CAAC;AAAA,eAAIA,CAAC,CAAC/D,KAAF,KAAYA,KAAhB;AAAA,OAAvC,CAAxB;;AAEA,UAAIyE,eAAJ,EAAqB;AACnBJ,QAAAA,aAAa,CAACpE,KAAD,CAAb,GAAuB,2BAAvB;AACD;AACF;AACF,GAhBD;AAkBA,MAAM2E,MAAM,GAAG,EAAf;AACA,MAAMC,WAAW,GAAG,CAAClD,OAAO,IAAI,EAAZ,EAAgByB,MAApC;;AAEA,MAAIyB,WAAW,GAAGZ,gBAAlB,EAAoC;AAClCW,IAAAA,MAAM,CAACE,kBAAP,wCAA0Db,gBAA1D;AACD,GAFD,MAEO,IAAIY,WAAW,GAAGX,gBAAlB,EAAoC;AACzCU,IAAAA,MAAM,CAACE,kBAAP,0BAA4CZ,gBAA5C;AACD;;AAED,MAAI,CAACI,kBAAL,EAAyB;AACvBM,IAAAA,MAAM,CAACG,oBAAP,GAA8B,8BAA9B;AACD;;AAED,MAAI,CAAC,yBAAQV,aAAR,CAAL,EAA6B;AAC3BO,IAAAA,MAAM,CAACP,aAAP,GAAuBA,aAAvB;AACD;;AAED,SAAOO,MAAP;AACD,CA3CM","sourcesContent":["/* eslint-disable no-console */\nimport isEmpty from 'lodash/isEmpty';\nimport { isResponseCorrect, parseHTML } from './utils';\nimport defaults from './defaults';\nimport { lockChoices, partialScoring, getShuffledChoices } from '@pie-lib/controller-utils';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const { role, mode } = env || {};\n const out = {\n label: choice.label,\n value: choice.value,\n };\n\n if (model.accessibilityLabelsEnabled) {\n out.accessibility = parseHTML(choice.accessibility).textContent || choice.value;\n }\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise(resolve => resolve({ ...defaults, ...model }));\n}\n\nexport const normalize = question => {\n const { verticalMode, choicesLayout, ...questionProps } = question || {};\n\n return {\n ...defaults,\n ...questionProps,\n // This is used for offering support for old models which have the property verticalMode\n // Same thing is set in authoring : packages/multiple-choice/configure/src/index.jsx - createDefaultModel\n choicesLayout: choicesLayout || (verticalMode === false && 'horizontal') || defaults.choicesLayout\n };\n};\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n normalizedQuestion.defaultFeedback\n );\n\n let choices = normalizedQuestion.choices.map(\n prepareChoice(normalizedQuestion, env, defaultFeedback)\n );\n\n const lockChoiceOrder = lockChoices(normalizedQuestion, session, env);\n\n if (!lockChoiceOrder) {\n choices = await getShuffledChoices(\n choices,\n session,\n updateSession,\n 'value'\n );\n }\n\n const out = {\n disabled: env.mode !== 'gather',\n mode: env.mode,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n choicesLayout: normalizedQuestion.choicesLayout,\n gridColumns: normalizedQuestion.gridColumns,\n choiceMode: normalizedQuestion.choiceMode,\n keyMode: normalizedQuestion.choicePrefix,\n choices,\n responseCorrect:\n env.mode === 'evaluate' ? isResponseCorrect(normalizedQuestion, session) : undefined\n };\n\n const { role, mode } = env || {};\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.teacherInstructions = null;\n }\n\n return out;\n}\n\n\nexport const getScore = (config, session) => {\n if (!session || isEmpty(session)) {\n return 0;\n }\n\n const selectedChoices = session.value || [];\n const correctChoices = (config.choices || []).filter(ch => ch.correct);\n\n let score = selectedChoices.reduce((acc, selectedChoice) =>\n acc + (correctChoices.find(ch => ch.value === selectedChoice) ? 1 : 0), 0);\n\n if (correctChoices.length < selectedChoices.length) {\n score -= selectedChoices.length - correctChoices.length;\n\n if (score < 0) {\n score = 0;\n }\n }\n\n const str = correctChoices.length ? score / correctChoices.length : 0;\n\n return parseFloat(str.toFixed(2));\n};\n\n/**\n *\n * The score is partial by default for checkbox mode, allOrNothing for radio mode.\n * To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring = false. the value in `env` will\n * override the value in `model`.\n * @param {Object} model - the main model\n * @param {*} session\n * @param {Object} env\n */\nexport function outcome(model, session, env) {\n return new Promise(resolve => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true });\n } else {\n const partialScoringEnabled =\n partialScoring.enabled(model, env) && model.choiceMode !== 'radio';\n const score = getScore(model, session);\n\n resolve({ score: partialScoringEnabled ? score : score === 1 ? 1 : 0, empty: false });\n }\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { choices } = question || { choices: [] };\n\n resolve({\n id: '1',\n value: choices.filter(c => c.correct).map(c => c.value)\n });\n } else {\n resolve(null);\n }\n });\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...choices || []].reverse();\n const choicesErrors = {};\n let hasCorrectResponse = false;\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (label === '' || label === '<div></div>') {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n });\n\n const errors = {};\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoicesError = `Should be defined at least ${minAnswerChoices} choices.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponseError = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n return errors;\n};\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["prepareChoice","model","env","defaultFeedback","choice","role","mode","out","label","value","accessibilityLabelsEnabled","accessibility","textContent","rationale","rationaleEnabled","correct","feedbackEnabled","feedbackType","feedback","type","createDefaultModel","Promise","resolve","defaults","normalize","question","verticalMode","choicesLayout","questionProps","session","updateSession","normalizedQuestion","Object","assign","incorrect","choices","map","lockChoiceOrder","disabled","prompt","promptEnabled","gridColumns","choiceMode","keyMode","choicePrefix","responseCorrect","undefined","teacherInstructions","teacherInstructionsEnabled","getScore","config","selectedChoices","correctChoices","filter","ch","score","reduce","acc","selectedChoice","find","length","str","parseFloat","toFixed","outcome","empty","partialScoringEnabled","partialScoring","enabled","createCorrectResponseSession","id","c","validate","minAnswerChoices","maxAnswerChoices","reversedChoices","reverse","choicesErrors","hasCorrectResponse","forEach","index","identicalAnswer","slice","some","errors","nbOfChoices","answerChoicesError","correctResponseError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAQC,GAAR,EAAaC,eAAb;AAAA,SAAiC,UAAAC,MAAM,EAAI;AAC/D,eAA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;AAClCW,IAAAA,MAAM,CAACE,kBAAP,sCAAwDb,gBAAxD;AACD,GAFD,MAEO,IAAIY,WAAW,GAAGX,gBAAlB,EAAoC;AACzCU,IAAAA,MAAM,CAACE,kBAAP,0BAA4CZ,gBAA5C;AACD;;AAED,MAAI,CAACI,kBAAL,EAAyB;AACvBM,IAAAA,MAAM,CAACG,oBAAP,GAA8B,8BAA9B;AACD;;AAED,MAAI,CAAC,yBAAQV,aAAR,CAAL,EAA6B;AAC3BO,IAAAA,MAAM,CAACP,aAAP,GAAuBA,aAAvB;AACD;;AAED,SAAOO,MAAP;AACD,CA3CM","sourcesContent":["/* eslint-disable no-console */\nimport isEmpty from 'lodash/isEmpty';\nimport { isResponseCorrect, parseHTML } from './utils';\nimport defaults from './defaults';\nimport { lockChoices, partialScoring, getShuffledChoices } from '@pie-lib/controller-utils';\n\nconst prepareChoice = (model, env, defaultFeedback) => choice => {\n const { role, mode } = env || {};\n const out = {\n label: choice.label,\n value: choice.value,\n };\n\n if (model.accessibilityLabelsEnabled) {\n out.accessibility = parseHTML(choice.accessibility).textContent || choice.value;\n }\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise(resolve => resolve({ ...defaults, ...model }));\n}\n\nexport const normalize = question => {\n const { verticalMode, choicesLayout, ...questionProps } = question || {};\n\n return {\n ...defaults,\n ...questionProps,\n // This is used for offering support for old models which have the property verticalMode\n // Same thing is set in authoring : packages/multiple-choice/configure/src/index.jsx - createDefaultModel\n choicesLayout: choicesLayout || (verticalMode === false && 'horizontal') || defaults.choicesLayout\n };\n};\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n normalizedQuestion.defaultFeedback\n );\n\n let choices = normalizedQuestion.choices.map(\n prepareChoice(normalizedQuestion, env, defaultFeedback)\n );\n\n const lockChoiceOrder = lockChoices(normalizedQuestion, session, env);\n\n if (!lockChoiceOrder) {\n choices = await getShuffledChoices(\n choices,\n session,\n updateSession,\n 'value'\n );\n }\n\n const out = {\n disabled: env.mode !== 'gather',\n mode: env.mode,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n choicesLayout: normalizedQuestion.choicesLayout,\n gridColumns: normalizedQuestion.gridColumns,\n choiceMode: normalizedQuestion.choiceMode,\n keyMode: normalizedQuestion.choicePrefix,\n choices,\n responseCorrect:\n env.mode === 'evaluate' ? isResponseCorrect(normalizedQuestion, session) : undefined\n };\n\n const { role, mode } = env || {};\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.teacherInstructions = null;\n }\n\n return out;\n}\n\n\nexport const getScore = (config, session) => {\n if (!session || isEmpty(session)) {\n return 0;\n }\n\n const selectedChoices = session.value || [];\n const correctChoices = (config.choices || []).filter(ch => ch.correct);\n\n let score = selectedChoices.reduce((acc, selectedChoice) =>\n acc + (correctChoices.find(ch => ch.value === selectedChoice) ? 1 : 0), 0);\n\n if (correctChoices.length < selectedChoices.length) {\n score -= selectedChoices.length - correctChoices.length;\n\n if (score < 0) {\n score = 0;\n }\n }\n\n const str = correctChoices.length ? score / correctChoices.length : 0;\n\n return parseFloat(str.toFixed(2));\n};\n\n/**\n *\n * The score is partial by default for checkbox mode, allOrNothing for radio mode.\n * To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring = false. the value in `env` will\n * override the value in `model`.\n * @param {Object} model - the main model\n * @param {*} session\n * @param {Object} env\n */\nexport function outcome(model, session, env) {\n return new Promise(resolve => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true });\n } else {\n const partialScoringEnabled =\n partialScoring.enabled(model, env) && model.choiceMode !== 'radio';\n const score = getScore(model, session);\n\n resolve({ score: partialScoringEnabled ? score : score === 1 ? 1 : 0, empty: false });\n }\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise(resolve => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { choices } = question || { choices: [] };\n\n resolve({\n id: '1',\n value: choices.filter(c => c.correct).map(c => c.value)\n });\n } else {\n resolve(null);\n }\n });\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...choices || []].reverse();\n const choicesErrors = {};\n let hasCorrectResponse = false;\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (label === '' || label === '<div></div>') {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n });\n\n const errors = {};\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponseError = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choicesErrors = choicesErrors;\n }\n\n return errors;\n};\n"],"file":"index.js"}
|
package/module/configure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_lodash, _dll_pie_lib__render_ui, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.10/module/index.js";
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_lodash, _dll_material_ui__icons, _dll_pie_lib__render_ui, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.10/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.33/module/index.js";
|
|
3
3
|
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.9/module/index.js";
|
|
4
4
|
var lib = {};
|
|
@@ -46,6 +46,13 @@ class InsertImageEvent extends CustomEvent {
|
|
|
46
46
|
}
|
|
47
47
|
InsertImageEvent.TYPE = 'insert.image';
|
|
48
48
|
var InsertImageEvent_1 = lib.InsertImageEvent = InsertImageEvent;
|
|
49
|
+
const generateValidationMessage = config => {
|
|
50
|
+
const {minAnswerChoices, maxAnswerChoices} = config;
|
|
51
|
+
const answerChoicesMessage = `\nThere should be at least ${minAnswerChoices} ` + (maxAnswerChoices ? `and at most ${maxAnswerChoices} ` : '') + 'answer choices defined.' + '\nEvery answer choice should be non-blank and unique.';
|
|
52
|
+
const correctAnswerMessage = '\nA correct answer must be defined.';
|
|
53
|
+
const message = 'Validation requirements:' + answerChoicesMessage + correctAnswerMessage;
|
|
54
|
+
return message;
|
|
55
|
+
};
|
|
49
56
|
const React$1 = _dll_react;
|
|
50
57
|
const PropTypes = _dll_prop_types;
|
|
51
58
|
const {color: color} = _dll_pie_lib__render_ui;
|
|
@@ -55,7 +62,9 @@ const {Tooltip: Tooltip} = _dll_material_ui__core;
|
|
|
55
62
|
const {Dialog: Dialog} = _dll_material_ui__core;
|
|
56
63
|
const {DialogTitle: DialogTitle} = _dll_material_ui__core;
|
|
57
64
|
const {DialogActions: DialogActions} = _dll_material_ui__core;
|
|
65
|
+
const {Typography: Typography} = _dll_material_ui__core;
|
|
58
66
|
const {merge: merge} = _dll_lodash;
|
|
67
|
+
const {Info: Info} = _dll_material_ui__icons;
|
|
59
68
|
const EditableHtml = _dll_pie_lib__editable_html;
|
|
60
69
|
const {InputContainer: InputContainer} = _dll_pie_lib__config_ui;
|
|
61
70
|
const {ChoiceConfiguration: ChoiceConfiguration} = _dll_pie_lib__config_ui;
|
|
@@ -120,15 +129,15 @@ const styles = theme => ({
|
|
|
120
129
|
},
|
|
121
130
|
flexContainer: {
|
|
122
131
|
display: 'flex',
|
|
123
|
-
alignItems: 'center'
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
marginBottom: '5px'
|
|
124
134
|
},
|
|
125
135
|
titleText: {
|
|
126
136
|
fontFamily: 'Cerebri Sans',
|
|
127
137
|
fontSize: '18px',
|
|
128
138
|
lineHeight: '19px',
|
|
129
139
|
color: '#495B8F',
|
|
130
|
-
marginRight: '5px'
|
|
131
|
-
marginBottom: '5px'
|
|
140
|
+
marginRight: '5px'
|
|
132
141
|
},
|
|
133
142
|
tooltip: {
|
|
134
143
|
fontSize: '12px',
|
|
@@ -169,11 +178,12 @@ const Design = withStyles(styles)(props => {
|
|
|
169
178
|
if (limitChoicesNumber) {
|
|
170
179
|
maxAnswerChoices = MAX_CHOICES;
|
|
171
180
|
}
|
|
181
|
+
const validationMessage = generateValidationMessage(configuration);
|
|
172
182
|
const Content = React$1.createElement('div', {
|
|
173
183
|
__self: undefined,
|
|
174
184
|
__source: {
|
|
175
185
|
fileName: _jsxFileName,
|
|
176
|
-
lineNumber:
|
|
186
|
+
lineNumber: 181
|
|
177
187
|
}
|
|
178
188
|
}, teacherInstructionsEnabled && React$1.createElement(InputContainer, {
|
|
179
189
|
label: teacherInstructions.label,
|
|
@@ -181,7 +191,7 @@ const Design = withStyles(styles)(props => {
|
|
|
181
191
|
__self: undefined,
|
|
182
192
|
__source: {
|
|
183
193
|
fileName: _jsxFileName,
|
|
184
|
-
lineNumber:
|
|
194
|
+
lineNumber: 183
|
|
185
195
|
}
|
|
186
196
|
}, React$1.createElement(EditableHtml, {
|
|
187
197
|
className: classes.prompt,
|
|
@@ -194,7 +204,7 @@ const Design = withStyles(styles)(props => {
|
|
|
194
204
|
__self: undefined,
|
|
195
205
|
__source: {
|
|
196
206
|
fileName: _jsxFileName,
|
|
197
|
-
lineNumber:
|
|
207
|
+
lineNumber: 187
|
|
198
208
|
}
|
|
199
209
|
})), promptEnabled && React$1.createElement(InputContainer, {
|
|
200
210
|
label: prompt.label,
|
|
@@ -202,7 +212,7 @@ const Design = withStyles(styles)(props => {
|
|
|
202
212
|
__self: undefined,
|
|
203
213
|
__source: {
|
|
204
214
|
fileName: _jsxFileName,
|
|
205
|
-
lineNumber:
|
|
215
|
+
lineNumber: 200
|
|
206
216
|
}
|
|
207
217
|
}, React$1.createElement(EditableHtml, {
|
|
208
218
|
className: classes.prompt,
|
|
@@ -216,15 +226,64 @@ const Design = withStyles(styles)(props => {
|
|
|
216
226
|
__self: undefined,
|
|
217
227
|
__source: {
|
|
218
228
|
fileName: _jsxFileName,
|
|
219
|
-
lineNumber:
|
|
229
|
+
lineNumber: 201
|
|
230
|
+
}
|
|
231
|
+
})), React$1.createElement('div', {
|
|
232
|
+
className: classes.flexContainer,
|
|
233
|
+
__self: undefined,
|
|
234
|
+
__source: {
|
|
235
|
+
fileName: _jsxFileName,
|
|
236
|
+
lineNumber: 213
|
|
237
|
+
}
|
|
238
|
+
}, React$1.createElement(Typography, {
|
|
239
|
+
className: classes.titleText,
|
|
240
|
+
__self: undefined,
|
|
241
|
+
__source: {
|
|
242
|
+
fileName: _jsxFileName,
|
|
243
|
+
lineNumber: 214
|
|
244
|
+
}
|
|
245
|
+
}, "Choices"), React$1.createElement(Tooltip, {
|
|
246
|
+
classes: {
|
|
247
|
+
tooltip: classes.tooltip
|
|
248
|
+
},
|
|
249
|
+
disableFocusListener: true,
|
|
250
|
+
disableTouchListener: true,
|
|
251
|
+
placement: 'right',
|
|
252
|
+
title: validationMessage,
|
|
253
|
+
__self: undefined,
|
|
254
|
+
__source: {
|
|
255
|
+
fileName: _jsxFileName,
|
|
256
|
+
lineNumber: 215
|
|
257
|
+
}
|
|
258
|
+
}, React$1.createElement(Info, {
|
|
259
|
+
fontSize: 'small',
|
|
260
|
+
color: 'primary',
|
|
261
|
+
__self: undefined,
|
|
262
|
+
__source: {
|
|
263
|
+
fileName: _jsxFileName,
|
|
264
|
+
lineNumber: 222
|
|
265
|
+
}
|
|
266
|
+
}))), correctResponseError && React$1.createElement('div', {
|
|
267
|
+
className: classes.errorText,
|
|
268
|
+
__self: undefined,
|
|
269
|
+
__source: {
|
|
270
|
+
fileName: _jsxFileName,
|
|
271
|
+
lineNumber: 225
|
|
272
|
+
}
|
|
273
|
+
}, correctResponseError), answerChoicesError && React$1.createElement('div', {
|
|
274
|
+
className: classes.errorText,
|
|
275
|
+
__self: undefined,
|
|
276
|
+
__source: {
|
|
277
|
+
fileName: _jsxFileName,
|
|
278
|
+
lineNumber: 226
|
|
220
279
|
}
|
|
221
|
-
})
|
|
280
|
+
}, answerChoicesError), choices.map((choice, index) => React$1.createElement('div', {
|
|
222
281
|
key: `choice-${index}`,
|
|
223
282
|
className: classes.choiceConfigurationHolder,
|
|
224
283
|
__self: undefined,
|
|
225
284
|
__source: {
|
|
226
285
|
fileName: _jsxFileName,
|
|
227
|
-
lineNumber:
|
|
286
|
+
lineNumber: 228
|
|
228
287
|
}
|
|
229
288
|
}, React$1.createElement(ChoiceConfiguration, {
|
|
230
289
|
key: index,
|
|
@@ -245,7 +304,7 @@ const Design = withStyles(styles)(props => {
|
|
|
245
304
|
__self: undefined,
|
|
246
305
|
__source: {
|
|
247
306
|
fileName: _jsxFileName,
|
|
248
|
-
lineNumber:
|
|
307
|
+
lineNumber: 232
|
|
249
308
|
}
|
|
250
309
|
}), rationaleEnabled && React$1.createElement(InputContainer, {
|
|
251
310
|
key: `rationale-${index}`,
|
|
@@ -254,7 +313,7 @@ const Design = withStyles(styles)(props => {
|
|
|
254
313
|
__self: undefined,
|
|
255
314
|
__source: {
|
|
256
315
|
fileName: _jsxFileName,
|
|
257
|
-
lineNumber:
|
|
316
|
+
lineNumber: 252
|
|
258
317
|
}
|
|
259
318
|
}, React$1.createElement(EditableHtml, {
|
|
260
319
|
className: classes.rationale,
|
|
@@ -270,7 +329,7 @@ const Design = withStyles(styles)(props => {
|
|
|
270
329
|
__self: undefined,
|
|
271
330
|
__source: {
|
|
272
331
|
fileName: _jsxFileName,
|
|
273
|
-
lineNumber:
|
|
332
|
+
lineNumber: 257
|
|
274
333
|
}
|
|
275
334
|
})), accessibilityLabelsEnabled && React$1.createElement(InputContainer, {
|
|
276
335
|
key: `accessibility-${index}`,
|
|
@@ -279,7 +338,7 @@ const Design = withStyles(styles)(props => {
|
|
|
279
338
|
__self: undefined,
|
|
280
339
|
__source: {
|
|
281
340
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
341
|
+
lineNumber: 274
|
|
283
342
|
}
|
|
284
343
|
}, React$1.createElement(EditableHtml, {
|
|
285
344
|
className: classes.accessibility,
|
|
@@ -294,13 +353,13 @@ const Design = withStyles(styles)(props => {
|
|
|
294
353
|
__self: undefined,
|
|
295
354
|
__source: {
|
|
296
355
|
fileName: _jsxFileName,
|
|
297
|
-
lineNumber:
|
|
356
|
+
lineNumber: 279
|
|
298
357
|
}
|
|
299
358
|
})))), React$1.createElement('br', {
|
|
300
359
|
__self: undefined,
|
|
301
360
|
__source: {
|
|
302
361
|
fileName: _jsxFileName,
|
|
303
|
-
lineNumber:
|
|
362
|
+
lineNumber: 296
|
|
304
363
|
}
|
|
305
364
|
}), addChoiceButton.settings && React$1.createElement(Tooltip, {
|
|
306
365
|
title: maxAnswerChoices && model.choices.length >= maxAnswerChoices ? `Only ${maxAnswerChoices} allowed maximum` : '',
|
|
@@ -310,11 +369,11 @@ const Design = withStyles(styles)(props => {
|
|
|
310
369
|
__self: undefined,
|
|
311
370
|
__source: {
|
|
312
371
|
fileName: _jsxFileName,
|
|
313
|
-
lineNumber:
|
|
372
|
+
lineNumber: 298
|
|
314
373
|
}
|
|
315
374
|
}, React$1.createElement(Button, {
|
|
316
375
|
classes: {
|
|
317
|
-
root: maxAnswerChoices && model.choices.length >= maxAnswerChoices
|
|
376
|
+
root: maxAnswerChoices && model.choices.length >= maxAnswerChoices && classes.disableButton
|
|
318
377
|
},
|
|
319
378
|
className: classes.addButton,
|
|
320
379
|
variant: "contained",
|
|
@@ -323,7 +382,7 @@ const Design = withStyles(styles)(props => {
|
|
|
323
382
|
__self: undefined,
|
|
324
383
|
__source: {
|
|
325
384
|
fileName: _jsxFileName,
|
|
326
|
-
lineNumber:
|
|
385
|
+
lineNumber: 306
|
|
327
386
|
}
|
|
328
387
|
}, addChoiceButton.label)));
|
|
329
388
|
const settingsInPanel = {
|
|
@@ -341,7 +400,7 @@ const Design = withStyles(styles)(props => {
|
|
|
341
400
|
__self: undefined,
|
|
342
401
|
__source: {
|
|
343
402
|
fileName: _jsxFileName,
|
|
344
|
-
lineNumber:
|
|
403
|
+
lineNumber: 343
|
|
345
404
|
}
|
|
346
405
|
}, settingsPanelDisabled ? Content : React$1.createElement(layout.ConfigLayout, {
|
|
347
406
|
settings: React$1.createElement(Panel, {
|
|
@@ -364,13 +423,13 @@ const Design = withStyles(styles)(props => {
|
|
|
364
423
|
__self: undefined,
|
|
365
424
|
__source: {
|
|
366
425
|
fileName: _jsxFileName,
|
|
367
|
-
lineNumber:
|
|
426
|
+
lineNumber: 349
|
|
368
427
|
}
|
|
369
428
|
}),
|
|
370
429
|
__self: undefined,
|
|
371
430
|
__source: {
|
|
372
431
|
fileName: _jsxFileName,
|
|
373
|
-
lineNumber:
|
|
432
|
+
lineNumber: 347
|
|
374
433
|
}
|
|
375
434
|
}, Content));
|
|
376
435
|
});
|
|
@@ -379,19 +438,19 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
|
|
|
379
438
|
__self: undefined,
|
|
380
439
|
__source: {
|
|
381
440
|
fileName: _jsxFileName,
|
|
382
|
-
lineNumber:
|
|
441
|
+
lineNumber: 386
|
|
383
442
|
}
|
|
384
443
|
}, React$1.createElement(DialogTitle, {
|
|
385
444
|
__self: undefined,
|
|
386
445
|
__source: {
|
|
387
446
|
fileName: _jsxFileName,
|
|
388
|
-
lineNumber:
|
|
447
|
+
lineNumber: 387
|
|
389
448
|
}
|
|
390
449
|
}, title), React$1.createElement(DialogActions, {
|
|
391
450
|
__self: undefined,
|
|
392
451
|
__source: {
|
|
393
452
|
fileName: _jsxFileName,
|
|
394
|
-
lineNumber:
|
|
453
|
+
lineNumber: 388
|
|
395
454
|
}
|
|
396
455
|
}, onOk && React$1.createElement(Button, {
|
|
397
456
|
onClick: onOk,
|
|
@@ -399,7 +458,7 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
|
|
|
399
458
|
__self: undefined,
|
|
400
459
|
__source: {
|
|
401
460
|
fileName: _jsxFileName,
|
|
402
|
-
lineNumber:
|
|
461
|
+
lineNumber: 390
|
|
403
462
|
}
|
|
404
463
|
}, "OK"), onCancel && React$1.createElement(Button, {
|
|
405
464
|
onClick: onCancel,
|
|
@@ -407,7 +466,7 @@ const InfoDialog = ({open, onCancel, onOk, title}) => React$1.createElement(Dial
|
|
|
407
466
|
__self: undefined,
|
|
408
467
|
__source: {
|
|
409
468
|
fileName: _jsxFileName,
|
|
410
|
-
lineNumber:
|
|
469
|
+
lineNumber: 395
|
|
411
470
|
}
|
|
412
471
|
}, "Cancel")));
|
|
413
472
|
InfoDialog.propTypes = {
|
|
@@ -463,12 +522,7 @@ class Main extends React$1.Component {
|
|
|
463
522
|
open: false
|
|
464
523
|
}
|
|
465
524
|
});
|
|
466
|
-
}
|
|
467
|
-
onCancel: () => this.setState({
|
|
468
|
-
dialog: {
|
|
469
|
-
open: false
|
|
470
|
-
}
|
|
471
|
-
})
|
|
525
|
+
}
|
|
472
526
|
}
|
|
473
527
|
});
|
|
474
528
|
} else {
|
|
@@ -485,35 +539,17 @@ class Main extends React$1.Component {
|
|
|
485
539
|
if (limitChoicesNumber) {
|
|
486
540
|
maxAnswerChoices = MAX_CHOICES;
|
|
487
541
|
}
|
|
488
|
-
if (maxAnswerChoices && model.choices.length
|
|
489
|
-
|
|
490
|
-
dialog: {
|
|
491
|
-
open: true,
|
|
492
|
-
message: `There can't be more than ${maxAnswerChoices} choices.`,
|
|
493
|
-
onOk: () => {
|
|
494
|
-
this.setState({
|
|
495
|
-
dialog: {
|
|
496
|
-
open: false
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
},
|
|
500
|
-
onCancel: () => this.setState({
|
|
501
|
-
dialog: {
|
|
502
|
-
open: false
|
|
503
|
-
}
|
|
504
|
-
})
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
} else {
|
|
508
|
-
model.choices.push({
|
|
509
|
-
label: '',
|
|
510
|
-
value: utils$1.firstAvailableIndex(model.choices.map(c => c.value), 0),
|
|
511
|
-
feedback: {
|
|
512
|
-
type: 'none'
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
this.props.onModelChanged(model);
|
|
542
|
+
if (maxAnswerChoices && model.choices.length >= maxAnswerChoices) {
|
|
543
|
+
return;
|
|
516
544
|
}
|
|
545
|
+
model.choices.push({
|
|
546
|
+
label: '',
|
|
547
|
+
value: utils$1.firstAvailableIndex(model.choices.map(c => c.value), 0),
|
|
548
|
+
feedback: {
|
|
549
|
+
type: 'none'
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
this.props.onModelChanged(model);
|
|
517
553
|
};
|
|
518
554
|
}
|
|
519
555
|
__init4() {
|
|
@@ -585,7 +621,7 @@ class Main extends React$1.Component {
|
|
|
585
621
|
__self: this,
|
|
586
622
|
__source: {
|
|
587
623
|
fileName: _jsxFileName,
|
|
588
|
-
lineNumber:
|
|
624
|
+
lineNumber: 543
|
|
589
625
|
}
|
|
590
626
|
}), React$1.createElement(Design, {
|
|
591
627
|
...this.props,
|
|
@@ -598,7 +634,7 @@ class Main extends React$1.Component {
|
|
|
598
634
|
__self: this,
|
|
599
635
|
__source: {
|
|
600
636
|
fileName: _jsxFileName,
|
|
601
|
-
lineNumber:
|
|
637
|
+
lineNumber: 549
|
|
602
638
|
}
|
|
603
639
|
}));
|
|
604
640
|
}
|
package/module/controller.js
CHANGED
|
@@ -20667,7 +20667,7 @@ const validate = (model = {}, config = {}) => {
|
|
|
20667
20667
|
const nbOfChoices = (choices || []).length;
|
|
20668
20668
|
|
|
20669
20669
|
if (nbOfChoices < minAnswerChoices) {
|
|
20670
|
-
errors.answerChoicesError = `
|
|
20670
|
+
errors.answerChoicesError = `There should be at least ${minAnswerChoices} choices defined.`;
|
|
20671
20671
|
} else if (nbOfChoices > maxAnswerChoices) {
|
|
20672
20672
|
errors.answerChoicesError = `No more than ${maxAnswerChoices} choices should be defined.`;
|
|
20673
20673
|
}
|
package/module/index.html
CHANGED
package/module/manifest.json
CHANGED
package/module/print.html
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multiple-choice",
|
|
3
3
|
"repository": "pie-framework/pie-elements",
|
|
4
|
-
"version": "5.9.3-next.
|
|
4
|
+
"version": "5.9.3-next.804+5bac3f5ae",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
|
-
"@pie-lib/config-ui": "10.11.0",
|
|
10
|
+
"@pie-lib/config-ui": "^10.11.0",
|
|
11
11
|
"@pie-lib/correct-answer-toggle": "^2.3.35",
|
|
12
12
|
"@pie-lib/math-rendering": "^2.3.13",
|
|
13
13
|
"@pie-lib/render-ui": "^4.12.5",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-test-renderer": "^16.3.2",
|
|
22
22
|
"react-transition-group": "^2.3.1"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "5bac3f5ae47bc85e51e821252ec75139d24c34af",
|
|
25
25
|
"scripts": {
|
|
26
26
|
"postpublish": "../../scripts/postpublish"
|
|
27
27
|
},
|