@elice/material-quiz 1.240718.0-trasncript.2 → 1.240718.2
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/cjs/components/eb-sortable/EbDraggable.js +33 -42
- package/cjs/components/eb-sortable/EbDroppable.js +20 -27
- package/cjs/components/markdown-editor/index.d.ts +2 -1
- package/cjs/components/markdown-editor/index.js +10 -19
- package/cjs/components/material-quiz/MaterialQuiz.js +83 -114
- package/cjs/components/material-quiz/MaterialQuizAnswerExplanation.js +29 -36
- package/cjs/components/material-quiz/MaterialQuizInfo.js +149 -151
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +127 -175
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +286 -360
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +126 -172
- package/cjs/components/material-quiz/MaterialQuizShimmer.js +39 -46
- package/cjs/components/material-quiz/MaterialQuizText.js +115 -163
- package/cjs/components/material-quiz/QuizResultBadge.js +22 -32
- package/cjs/components/material-quiz/QuizSubmitStatusText.js +16 -21
- package/cjs/components/material-quiz/constants/color.js +5 -5
- package/cjs/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
- package/cjs/components/material-quiz/context/MaterialQuizContext.js +93 -156
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +161 -259
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +100 -134
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +101 -130
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +52 -64
- package/cjs/components/material-quiz/material-quiz-group/context/context.js +1 -5
- package/cjs/components/material-quiz-edit/MaterialQuizEdit.js +36 -47
- package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +232 -280
- package/cjs/components/material-quiz-edit/context.js +2 -8
- package/cjs/components/material-quiz-edit/options/OptionEditor.js +46 -70
- package/cjs/components/material-quiz-edit/options/OptionSelectMultiple.js +148 -174
- package/cjs/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +149 -175
- package/cjs/components/material-quiz-edit/options/OptionSelectOne.js +144 -164
- package/cjs/components/material-quiz-edit/options/OptionText.js +82 -90
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroup.js +8 -9
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +112 -156
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +196 -288
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +75 -88
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +92 -108
- package/cjs/components/material-quiz-edit/utils/checkTwoDimensionArray.js +1 -5
- package/cjs/components/material-quiz-edit/utils/editValue.js +12 -21
- package/cjs/components/shared/QuestionBox.js +165 -198
- package/cjs/components/shared/QuizDraggbleDroppedOption.js +12 -11
- package/cjs/components/shared/QuizDraggbleDummyOption.js +16 -23
- package/cjs/components/shared/QuizDraggbleOption.js +59 -65
- package/cjs/components/shared/StyledMarkdown.js +1 -5
- package/cjs/components/shared/question-checkbox/QuestionCheckbox.js +7 -13
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -24
- package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.js +68 -59
- package/cjs/components/shared/question-radio/QuestionRadio.js +7 -13
- package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
- package/cjs/components/shared/question-radio/QuestionRadioContext.js +17 -24
- package/cjs/components/shared/question-radio/QuestionRadioOption.js +59 -52
- package/cjs/components/shared/utils/getQuestionStatusStyle.js +9 -7
- package/cjs/components/shared/utils/mergeRefs.js +6 -15
- package/cjs/constant/element.js +3 -3
- package/cjs/helpers/index.js +10 -8
- package/cjs/hooks/useCaculatePassage.js +20 -21
- package/es/components/eb-sortable/EbDraggable.js +33 -37
- package/es/components/eb-sortable/EbDroppable.js +20 -22
- package/es/components/markdown-editor/index.d.ts +2 -1
- package/es/components/markdown-editor/index.js +10 -15
- package/es/components/material-quiz/MaterialQuiz.js +83 -109
- package/es/components/material-quiz/MaterialQuizAnswerExplanation.js +29 -32
- package/es/components/material-quiz/MaterialQuizInfo.js +150 -148
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +127 -171
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +287 -356
- package/es/components/material-quiz/MaterialQuizSelectOne.js +126 -168
- package/es/components/material-quiz/MaterialQuizShimmer.js +39 -42
- package/es/components/material-quiz/MaterialQuizText.js +115 -158
- package/es/components/material-quiz/QuizResultBadge.js +22 -27
- package/es/components/material-quiz/QuizSubmitStatusText.js +16 -17
- package/es/components/material-quiz/constants/color.js +5 -5
- package/es/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
- package/es/components/material-quiz/context/MaterialQuizContext.js +94 -153
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +161 -253
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +100 -129
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +101 -125
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +52 -60
- package/es/components/material-quiz/material-quiz-group/context/context.js +1 -1
- package/es/components/material-quiz-edit/MaterialQuizEdit.js +36 -43
- package/es/components/material-quiz-edit/MaterialQuizEditContent.js +229 -272
- package/es/components/material-quiz-edit/context.js +2 -4
- package/es/components/material-quiz-edit/options/OptionEditor.js +46 -64
- package/es/components/material-quiz-edit/options/OptionSelectMultiple.js +148 -170
- package/es/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +149 -171
- package/es/components/material-quiz-edit/options/OptionSelectOne.js +144 -159
- package/es/components/material-quiz-edit/options/OptionText.js +82 -86
- package/es/components/material-quiz-edit/options/options-group/OptionGroup.js +8 -9
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +112 -151
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +197 -283
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +75 -83
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +92 -103
- package/es/components/material-quiz-edit/utils/checkTwoDimensionArray.js +1 -5
- package/es/components/material-quiz-edit/utils/editValue.js +12 -17
- package/es/components/shared/QuestionBox.js +165 -192
- package/es/components/shared/QuizDraggbleDroppedOption.js +12 -11
- package/es/components/shared/QuizDraggbleDummyOption.js +16 -19
- package/es/components/shared/QuizDraggbleOption.js +59 -61
- package/es/components/shared/StyledMarkdown.js +1 -1
- package/es/components/shared/question-checkbox/QuestionCheckbox.js +7 -9
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -20
- package/es/components/shared/question-checkbox/QuestionCheckboxOption.js +68 -54
- package/es/components/shared/question-radio/QuestionRadio.js +7 -9
- package/es/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
- package/es/components/shared/question-radio/QuestionRadioContext.js +17 -20
- package/es/components/shared/question-radio/QuestionRadioOption.js +59 -47
- package/es/components/shared/utils/getQuestionStatusStyle.js +9 -7
- package/es/components/shared/utils/mergeRefs.js +6 -15
- package/es/constant/element.js +3 -3
- package/es/helpers/index.js +10 -8
- package/es/hooks/useCaculatePassage.js +20 -21
- package/package.json +15 -12
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -423
- package/cjs/components/material-quiz/index.js +0 -9
- package/cjs/components/material-quiz/locales/index.js +0 -13
- package/cjs/components/material-quiz-edit/index.js +0 -7
- package/cjs/components/material-quiz-edit/locales/index.js +0 -13
- package/cjs/components/shared/index.js +0 -19
- package/cjs/constant/index.js +0 -9
- package/cjs/hooks/index.js +0 -7
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -408
- package/es/components/material-quiz/index.js +0 -2
- package/es/components/material-quiz/locales/index.js +0 -4
- package/es/components/material-quiz-edit/index.js +0 -1
- package/es/components/material-quiz-edit/locales/index.js +0 -4
- package/es/components/shared/index.js +0 -7
- package/es/constant/index.js +0 -1
- package/es/hooks/index.js +0 -1
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
5
|
var React = require('react');
|
|
8
6
|
var apiClient = require('@elice/api-client');
|
|
9
7
|
var blocks = require('@elice/blocks');
|
|
@@ -26,92 +24,80 @@ var MaterialQuizInfo = require('./MaterialQuizInfo.js');
|
|
|
26
24
|
var QuizResultBadge = require('./QuizResultBadge.js');
|
|
27
25
|
var QuizSubmitStatusText = require('./QuizSubmitStatusText.js');
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
32
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
33
|
-
|
|
34
|
-
var StyledVerticalDivider = styled__default.default.div.withConfig({
|
|
27
|
+
const StyledVerticalDivider = styled.div.withConfig({
|
|
35
28
|
componentId: "sc-10067nt-0"
|
|
36
|
-
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none !important;padding:1rem;", ""],
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none !important;padding:1rem;", ""], ({
|
|
30
|
+
vertical
|
|
31
|
+
}) => {
|
|
32
|
+
return vertical ? `
|
|
33
|
+
display: none;
|
|
34
|
+
` : '';
|
|
39
35
|
});
|
|
40
|
-
|
|
36
|
+
const StyledHorizontalDivider = styled.hr.withConfig({
|
|
41
37
|
componentId: "sc-10067nt-1"
|
|
42
|
-
})(["display:none;", ""],
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
})(["display:none;", ""], ({
|
|
39
|
+
vertical
|
|
40
|
+
}) => {
|
|
41
|
+
return vertical ? `
|
|
42
|
+
display: block;
|
|
43
|
+
margin: 1rem 0;
|
|
44
|
+
width: 100%;
|
|
45
|
+
border: solid 1px ${designTokens.base.color.navy5};
|
|
46
|
+
` : '';
|
|
45
47
|
});
|
|
46
|
-
|
|
48
|
+
const StyledQuizOptionsDropZone = styled(EbDroppable.default).withConfig({
|
|
47
49
|
componentId: "sc-10067nt-2"
|
|
48
50
|
})(["display:flex;flex-direction:column;flex:1 1 50%;padding:1rem;border-radius:8px;background-color:", ";&.ui-droppable-hover{outline:1px dashed ", ";margin:1px 0;}"], designTokens.base.color.navy7, designTokens.base.color.gray4);
|
|
49
|
-
|
|
51
|
+
const StyledQuizAnswersDropZone = styled.div.withConfig({
|
|
50
52
|
componentId: "sc-10067nt-3"
|
|
51
53
|
})(["position:relative;display:flex;flex-direction:column;flex:1 1 50%;padding:1rem;border-radius:8px;background-color:", ";"], designTokens.base.color.navy6);
|
|
52
|
-
|
|
54
|
+
const StyledOptionBox = styled.div.withConfig({
|
|
53
55
|
componentId: "sc-10067nt-4"
|
|
54
|
-
})(["display:flex;", ""],
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
})(["display:flex;", ""], ({
|
|
57
|
+
vertical
|
|
58
|
+
}) => {
|
|
59
|
+
return vertical ? `
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
` : '';
|
|
57
62
|
});
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
const MaterialQuizSelectMultipleOrder = ({
|
|
64
|
+
hasInlinePassage
|
|
65
|
+
}) => {
|
|
60
66
|
// context
|
|
61
|
-
|
|
62
|
-
lecture
|
|
63
|
-
materialQuiz
|
|
64
|
-
userId
|
|
65
|
-
vertical
|
|
66
|
-
course
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
const {
|
|
68
|
+
lecture,
|
|
69
|
+
materialQuiz,
|
|
70
|
+
userId,
|
|
71
|
+
vertical,
|
|
72
|
+
course
|
|
73
|
+
} = MaterialQuizContext.useMaterialQuizState();
|
|
74
|
+
const {
|
|
75
|
+
onSubmit,
|
|
76
|
+
onNext,
|
|
77
|
+
refreshOrgMaterialQuiz,
|
|
78
|
+
onDirty
|
|
79
|
+
} = MaterialQuizContext.useMaterialQuizDispatch();
|
|
80
|
+
const theme = material.useTheme();
|
|
73
81
|
// state
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
containerRef = _useCaculatePassage.containerRef,
|
|
89
|
-
questionRef = _useCaculatePassage.questionRef;
|
|
90
|
-
var _React$useState7 = React__default.default.useState([]),
|
|
91
|
-
_React$useState8 = _rollupPluginBabelHelpers.slicedToArray(_React$useState7, 2),
|
|
92
|
-
optionList = _React$useState8[0],
|
|
93
|
-
setOptionList = _React$useState8[1];
|
|
94
|
-
var _React$useState9 = React__default.default.useState([]),
|
|
95
|
-
_React$useState10 = _rollupPluginBabelHelpers.slicedToArray(_React$useState9, 2),
|
|
96
|
-
answerList = _React$useState10[0],
|
|
97
|
-
setAnswerList = _React$useState10[1];
|
|
98
|
-
var _React$useState11 = React__default.default.useState([]),
|
|
99
|
-
_React$useState12 = _rollupPluginBabelHelpers.slicedToArray(_React$useState11, 2),
|
|
100
|
-
correctAnswerList = _React$useState12[0],
|
|
101
|
-
setCorrectAnswerList = _React$useState12[1];
|
|
102
|
-
var _React$useState13 = React__default.default.useState(false),
|
|
103
|
-
_React$useState14 = _rollupPluginBabelHelpers.slicedToArray(_React$useState13, 2),
|
|
104
|
-
hasSubmitted = _React$useState14[0],
|
|
105
|
-
setHasSubmitted = _React$useState14[1];
|
|
106
|
-
var isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
107
|
-
var isDisabled = (materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.correctOptionCount) !== answerList.filter(function (answer) {
|
|
108
|
-
return answer.order !== null;
|
|
109
|
-
}).length || !!userId;
|
|
82
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
83
|
+
const [materialQuizResponse, setMaterialQuizResponse] = React.useState();
|
|
84
|
+
const [submitStatus, setSubmitStatus] = React.useState('idle');
|
|
85
|
+
const [isActive, setIsActive] = React.useState(false);
|
|
86
|
+
const {
|
|
87
|
+
containerRef,
|
|
88
|
+
questionRef
|
|
89
|
+
} = useCaculatePassage.useCaculatePassage();
|
|
90
|
+
const [optionList, setOptionList] = React.useState([]);
|
|
91
|
+
const [answerList, setAnswerList] = React.useState([]);
|
|
92
|
+
const [correctAnswerList, setCorrectAnswerList] = React.useState([]);
|
|
93
|
+
const [hasSubmitted, setHasSubmitted] = React.useState(false);
|
|
94
|
+
const isNextActive = hasSubmitted && typeof onNext === 'function';
|
|
95
|
+
const isDisabled = (materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.correctOptionCount) !== answerList.filter(answer => answer.order !== null).length || !!userId;
|
|
110
96
|
// ref
|
|
111
|
-
|
|
97
|
+
const optionBoxRef = React.useRef(null);
|
|
112
98
|
// to make jquery touchable
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
React.useEffect(() => {
|
|
100
|
+
const optionBoxElement = optionBoxRef.current;
|
|
115
101
|
if (!optionBoxElement) {
|
|
116
102
|
return;
|
|
117
103
|
}
|
|
@@ -120,9 +106,9 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
120
106
|
* credit: http://stackoverflow.com/a/6141093
|
|
121
107
|
*/
|
|
122
108
|
function touchHandler(event) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
109
|
+
const touches = event.changedTouches;
|
|
110
|
+
const first = touches[0];
|
|
111
|
+
let type = '';
|
|
126
112
|
switch (event.type) {
|
|
127
113
|
case 'touchstart':
|
|
128
114
|
type = 'mousedown';
|
|
@@ -139,7 +125,7 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
139
125
|
// initMouseEvent(type, canBubble, cancelable, view, clickCount,
|
|
140
126
|
// screenX, screenY, clientX, clientY, ctrlKey,
|
|
141
127
|
// altKey, shiftKey, metaKey, button, relatedTarget);
|
|
142
|
-
|
|
128
|
+
const simulatedEvent = document.createEvent('MouseEvent');
|
|
143
129
|
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null);
|
|
144
130
|
first.target.dispatchEvent(simulatedEvent);
|
|
145
131
|
event.preventDefault();
|
|
@@ -148,7 +134,7 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
148
134
|
optionBoxElement.addEventListener('touchmove', touchHandler, true);
|
|
149
135
|
optionBoxElement.addEventListener('touchend', touchHandler, true);
|
|
150
136
|
optionBoxElement.addEventListener('touchcancel', touchHandler, true);
|
|
151
|
-
return
|
|
137
|
+
return () => {
|
|
152
138
|
optionBoxElement.removeEventListener('touchstart', touchHandler, true);
|
|
153
139
|
optionBoxElement.removeEventListener('touchmove', touchHandler, true);
|
|
154
140
|
optionBoxElement.removeEventListener('touchend', touchHandler, true);
|
|
@@ -156,48 +142,44 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
156
142
|
};
|
|
157
143
|
}, []);
|
|
158
144
|
// quiz response fetcher
|
|
159
|
-
|
|
145
|
+
React.useEffect(() => {
|
|
160
146
|
var _a, _b;
|
|
161
147
|
if (!userId && (materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.lastQuizResponseId)) {
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
const controller = new AbortController();
|
|
149
|
+
const {
|
|
150
|
+
signal
|
|
151
|
+
} = controller;
|
|
164
152
|
apiClient.getOrgMaterialQuizResponseGet({
|
|
165
153
|
quizResponseId: materialQuiz.lastQuizResponseId
|
|
166
154
|
}, {
|
|
167
|
-
signal
|
|
168
|
-
}).then(
|
|
155
|
+
signal
|
|
156
|
+
}).then(response => {
|
|
169
157
|
var _a;
|
|
170
158
|
setMaterialQuizResponse(response.quizResponse);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
const answer = response.quizResponse.answer; // user submitted
|
|
160
|
+
const options = (_a = materialQuiz.options) !== null && _a !== void 0 ? _a : []; // options
|
|
161
|
+
const answerList = answer.map(answer => {
|
|
174
162
|
var _a, _b;
|
|
175
163
|
return {
|
|
176
164
|
order: answer,
|
|
177
165
|
value: (_b = (_a = options[answer]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : ''
|
|
178
166
|
};
|
|
179
167
|
}, []);
|
|
180
|
-
|
|
181
|
-
return !answer.includes(index);
|
|
182
|
-
}).map(function (option) {
|
|
168
|
+
const optionList = options.filter((item, index) => !answer.includes(index)).map(option => {
|
|
183
169
|
var _a;
|
|
184
170
|
return {
|
|
185
|
-
order: options.findIndex(
|
|
186
|
-
return optionInfo === option;
|
|
187
|
-
}),
|
|
171
|
+
order: options.findIndex(optionInfo => optionInfo === option),
|
|
188
172
|
value: (_a = option === null || option === void 0 ? void 0 : option.content) !== null && _a !== void 0 ? _a : ''
|
|
189
173
|
};
|
|
190
174
|
});
|
|
191
175
|
setAnswerList(answerList);
|
|
192
176
|
setOptionList(optionList);
|
|
193
|
-
}).catch(
|
|
177
|
+
}).catch(error => {
|
|
194
178
|
console.error(error);
|
|
195
179
|
});
|
|
196
|
-
return
|
|
197
|
-
return controller.abort();
|
|
198
|
-
};
|
|
180
|
+
return () => controller.abort();
|
|
199
181
|
} else {
|
|
200
|
-
setOptionList(((_a = materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.options) === null || _a === void 0 ? void 0 : _a.map(
|
|
182
|
+
setOptionList(((_a = materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.options) === null || _a === void 0 ? void 0 : _a.map((option, index) => {
|
|
201
183
|
var _a;
|
|
202
184
|
return {
|
|
203
185
|
order: index,
|
|
@@ -206,19 +188,19 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
206
188
|
})) || []);
|
|
207
189
|
setAnswerList(Array.from({
|
|
208
190
|
length: (_b = materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.correctOptionCount) !== null && _b !== void 0 ? _b : 0
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
};
|
|
214
|
-
}));
|
|
191
|
+
}, () => ({
|
|
192
|
+
order: null,
|
|
193
|
+
value: null
|
|
194
|
+
})));
|
|
215
195
|
}
|
|
216
196
|
}, [materialQuiz, userId]);
|
|
217
197
|
// quiz response fetcher
|
|
218
|
-
|
|
198
|
+
React.useEffect(() => {
|
|
219
199
|
if (userId && materialQuiz) {
|
|
220
|
-
|
|
221
|
-
|
|
200
|
+
const controller = new AbortController();
|
|
201
|
+
const {
|
|
202
|
+
signal
|
|
203
|
+
} = controller;
|
|
222
204
|
apiClient.getOrgMaterialQuizResponseList({
|
|
223
205
|
materialQuizId: materialQuiz.id,
|
|
224
206
|
filterUserIds: [userId],
|
|
@@ -227,130 +209,93 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
227
209
|
offset: 0,
|
|
228
210
|
count: 1
|
|
229
211
|
}, {
|
|
230
|
-
signal
|
|
231
|
-
}).then(
|
|
212
|
+
signal
|
|
213
|
+
}).then(response => {
|
|
232
214
|
var _a, _b, _c;
|
|
233
|
-
|
|
215
|
+
const quizResponse = response.quizResponses[0];
|
|
234
216
|
setMaterialQuizResponse(quizResponse);
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
217
|
+
const answer = (_a = quizResponse === null || quizResponse === void 0 ? void 0 : quizResponse.answer) !== null && _a !== void 0 ? _a : []; // user submitted
|
|
218
|
+
const options = (_b = materialQuiz.options) !== null && _b !== void 0 ? _b : []; // options
|
|
219
|
+
const materialQuizAnswerInfo = materialQuiz.answerInfo;
|
|
220
|
+
const correctAnswerList = Array.isArray(materialQuizAnswerInfo) ? (_c = materialQuizAnswerInfo === null || materialQuizAnswerInfo === void 0 ? void 0 : materialQuizAnswerInfo.map(answerInfo => {
|
|
239
221
|
var _a, _b, _c;
|
|
240
222
|
return {
|
|
241
223
|
order: answerInfo,
|
|
242
224
|
value: (_c = (_b = (_a = materialQuiz.options) === null || _a === void 0 ? void 0 : _a[answerInfo]) === null || _b === void 0 ? void 0 : _b.content) !== null && _c !== void 0 ? _c : ''
|
|
243
225
|
};
|
|
244
226
|
})) !== null && _c !== void 0 ? _c : [] : [];
|
|
245
|
-
|
|
227
|
+
const answerList = answer.map(answer => {
|
|
246
228
|
var _a, _b;
|
|
247
229
|
return {
|
|
248
230
|
order: answer,
|
|
249
231
|
value: (_b = (_a = options[answer]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : ''
|
|
250
232
|
};
|
|
251
233
|
}, []);
|
|
252
|
-
|
|
253
|
-
return !answer.includes(index);
|
|
254
|
-
}).map(function (option) {
|
|
234
|
+
const optionList = options.filter((item, index) => !answer.includes(index)).map(option => {
|
|
255
235
|
var _a;
|
|
256
236
|
return {
|
|
257
|
-
order: options.findIndex(
|
|
258
|
-
return optionInfo === option;
|
|
259
|
-
}),
|
|
237
|
+
order: options.findIndex(optionInfo => optionInfo === option),
|
|
260
238
|
value: (_a = option === null || option === void 0 ? void 0 : option.content) !== null && _a !== void 0 ? _a : ''
|
|
261
239
|
};
|
|
262
240
|
});
|
|
263
241
|
setCorrectAnswerList(correctAnswerList);
|
|
264
242
|
setAnswerList(answerList);
|
|
265
243
|
setOptionList(optionList);
|
|
266
|
-
}).catch(
|
|
244
|
+
}).catch(error => {
|
|
267
245
|
console.error(error);
|
|
268
246
|
});
|
|
269
|
-
return
|
|
270
|
-
return controller.abort();
|
|
271
|
-
};
|
|
247
|
+
return () => controller.abort();
|
|
272
248
|
}
|
|
273
249
|
}, [materialQuiz, userId]);
|
|
274
250
|
// submit handler
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
setMaterialQuizResponse(quizResponse);
|
|
309
|
-
void refreshOrgMaterialQuiz();
|
|
310
|
-
onSubmit(true, index.getQuizResult(quizResponse));
|
|
311
|
-
setSubmitStatus('resolved');
|
|
312
|
-
onDirty(false);
|
|
313
|
-
_context.next = 26;
|
|
314
|
-
break;
|
|
315
|
-
case 21:
|
|
316
|
-
_context.prev = 21;
|
|
317
|
-
_context.t0 = _context["catch"](3);
|
|
318
|
-
console.error(_context.t0);
|
|
319
|
-
onSubmit(false);
|
|
320
|
-
setSubmitStatus('rejected');
|
|
321
|
-
case 26:
|
|
322
|
-
case "end":
|
|
323
|
-
return _context.stop();
|
|
324
|
-
}
|
|
325
|
-
}, _callee, null, [[3, 21]]);
|
|
326
|
-
}));
|
|
327
|
-
return function handleSubmit() {
|
|
328
|
-
return _ref5.apply(this, arguments);
|
|
329
|
-
};
|
|
330
|
-
}();
|
|
331
|
-
var renderQuizDragOption = function renderQuizDragOption() {
|
|
332
|
-
return jsxRuntime.jsxs(StyledQuizOptionsDropZone, {
|
|
251
|
+
const handleSubmit = async () => {
|
|
252
|
+
if (!materialQuiz) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
setSubmitStatus('pending');
|
|
256
|
+
try {
|
|
257
|
+
const {
|
|
258
|
+
quizResponseId
|
|
259
|
+
} = await apiClient.postOrgMaterialQuizResponseAdd({
|
|
260
|
+
materialQuizId: materialQuiz.id,
|
|
261
|
+
answer: answerList.map(answer => answer.order) // FIXME: Type mismatch
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
const {
|
|
265
|
+
quizResponse
|
|
266
|
+
} = await apiClient.getOrgMaterialQuizResponseGet({
|
|
267
|
+
quizResponseId
|
|
268
|
+
});
|
|
269
|
+
setIsActive(false);
|
|
270
|
+
setHasSubmitted(true);
|
|
271
|
+
setMaterialQuizResponse(quizResponse);
|
|
272
|
+
void refreshOrgMaterialQuiz();
|
|
273
|
+
onSubmit(true, index.getQuizResult(quizResponse));
|
|
274
|
+
setSubmitStatus('resolved');
|
|
275
|
+
onDirty(false);
|
|
276
|
+
} catch (error) {
|
|
277
|
+
console.error(error);
|
|
278
|
+
onSubmit(false);
|
|
279
|
+
setSubmitStatus('rejected');
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const renderQuizDragOption = () => {
|
|
283
|
+
return React.createElement(StyledQuizOptionsDropZone, {
|
|
333
284
|
disabled: !!userId,
|
|
334
285
|
accept: ".quiz-answer",
|
|
335
|
-
onDrop:
|
|
286
|
+
onDrop: (event, ui) => {
|
|
336
287
|
if (index.checkUserLectureTestEnded(lecture)) {
|
|
337
288
|
return;
|
|
338
289
|
}
|
|
339
290
|
setIsActive(true);
|
|
340
291
|
setHasSubmitted(false);
|
|
341
|
-
|
|
342
|
-
setOptionList(
|
|
343
|
-
return [
|
|
344
|
-
return answer.order === targetId;
|
|
345
|
-
})]).sort(function (a, b) {
|
|
346
|
-
return a.order - b.order;
|
|
347
|
-
});
|
|
292
|
+
const targetId = Number(ui.draggable[0].id);
|
|
293
|
+
setOptionList(prevOptionList => {
|
|
294
|
+
return [...prevOptionList, answerList.find(answer => answer.order === targetId)].sort((a, b) => a.order - b.order);
|
|
348
295
|
});
|
|
349
|
-
setAnswerList(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
});
|
|
353
|
-
return prevAnswerList.map(function (answer, answerIndex) {
|
|
296
|
+
setAnswerList(prevAnswerList => {
|
|
297
|
+
const removingIndex = prevAnswerList.findIndex(answer => answer.order === targetId);
|
|
298
|
+
return prevAnswerList.map((answer, answerIndex) => {
|
|
354
299
|
if (answerIndex === removingIndex) {
|
|
355
300
|
return {
|
|
356
301
|
order: null,
|
|
@@ -361,127 +306,117 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
361
306
|
}
|
|
362
307
|
});
|
|
363
308
|
});
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}) : null]
|
|
388
|
-
});
|
|
309
|
+
}
|
|
310
|
+
}, optionList.map((option, index) => {
|
|
311
|
+
return React.createElement(QuizDraggbleOption.default, {
|
|
312
|
+
disabled: !!userId,
|
|
313
|
+
key: option.order,
|
|
314
|
+
id: option.order.toString(),
|
|
315
|
+
className: "quiz-option",
|
|
316
|
+
content: option.value,
|
|
317
|
+
isMarkdown: !!(course === null || course === void 0 ? void 0 : course.preference.renderMarkdownInQuizOptions)
|
|
318
|
+
});
|
|
319
|
+
}), optionList.length === 0 && !userId ? React.createElement(blocks.Flex, {
|
|
320
|
+
align: "center",
|
|
321
|
+
justify: "center",
|
|
322
|
+
style: {
|
|
323
|
+
minWidth: '200px',
|
|
324
|
+
height: '100%'
|
|
325
|
+
}
|
|
326
|
+
}, React.createElement(blocks.Text, {
|
|
327
|
+
size: "tiny",
|
|
328
|
+
role: "white"
|
|
329
|
+
}, intl$1.formatMessage({
|
|
330
|
+
id: 'materialQuiz.order.answerEmpty'
|
|
331
|
+
}))) : null);
|
|
389
332
|
};
|
|
390
|
-
|
|
391
|
-
return
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
333
|
+
const renderQuizDragAnswers = () => {
|
|
334
|
+
return React.createElement(StyledQuizAnswersDropZone, null, answerList.map((option, index$1) => {
|
|
335
|
+
const getRole = () => {
|
|
336
|
+
if (isActive) {
|
|
337
|
+
return 'default';
|
|
338
|
+
}
|
|
339
|
+
const status = index.getQuizResultStatus(materialQuizResponse);
|
|
340
|
+
switch (status) {
|
|
341
|
+
case index.QuizResultStatus.Correct:
|
|
342
|
+
return 'correct';
|
|
343
|
+
case index.QuizResultStatus.Wrong:
|
|
344
|
+
return 'wrong';
|
|
345
|
+
default:
|
|
395
346
|
return 'default';
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return prevOption.order !== _targetOptionId;
|
|
443
|
-
});
|
|
444
|
-
});
|
|
445
|
-
setAnswerList(function (prevAnswerList) {
|
|
446
|
-
return prevAnswerList.map(function (prevAnswer, prevAnswerIndex) {
|
|
447
|
-
var _a, _b;
|
|
448
|
-
if (index$1 === prevAnswerIndex) {
|
|
449
|
-
return {
|
|
450
|
-
order: _targetOptionId,
|
|
451
|
-
value: (_b = (_a = optionList.find(function (option) {
|
|
452
|
-
return option.order === _targetOptionId;
|
|
453
|
-
})) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ''
|
|
454
|
-
};
|
|
455
|
-
} else {
|
|
456
|
-
return prevAnswer;
|
|
457
|
-
}
|
|
458
|
-
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
if (option.value === null) {
|
|
350
|
+
return React.createElement(QuizDraggbleDummyOption.default, {
|
|
351
|
+
children: intl$1.formatMessage({
|
|
352
|
+
id: 'materialQuiz.selectMultipleOrder.answer.title'
|
|
353
|
+
}),
|
|
354
|
+
key: index$1,
|
|
355
|
+
indexOrder: index$1 + 1,
|
|
356
|
+
onDrop: (event, ui) => {
|
|
357
|
+
if (index.checkUserLectureTestEnded(lecture)) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
setIsActive(true);
|
|
361
|
+
setHasSubmitted(false);
|
|
362
|
+
onDirty(true);
|
|
363
|
+
// from answerList to answerList
|
|
364
|
+
if (ui.draggable[0].classList.contains('quiz-answer')) {
|
|
365
|
+
const targetOptionId = Number(ui.draggable[0].id);
|
|
366
|
+
setAnswerList(prevAnswerList => {
|
|
367
|
+
const newState = [...prevAnswerList];
|
|
368
|
+
const from = newState.find(prevAnswer => prevAnswer.order === targetOptionId);
|
|
369
|
+
const fromIndex = newState.findIndex(prevAnswer => prevAnswer.order === targetOptionId);
|
|
370
|
+
const to = newState[index$1];
|
|
371
|
+
newState[index$1] = from;
|
|
372
|
+
newState[fromIndex] = to;
|
|
373
|
+
return newState;
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
// from option-list to answerList-list
|
|
377
|
+
else {
|
|
378
|
+
const targetOptionId = Number(ui.draggable[0].id);
|
|
379
|
+
setOptionList(prevOptions => {
|
|
380
|
+
return prevOptions.filter(prevOption => prevOption.order !== targetOptionId);
|
|
381
|
+
});
|
|
382
|
+
setAnswerList(prevAnswerList => {
|
|
383
|
+
return prevAnswerList.map((prevAnswer, prevAnswerIndex) => {
|
|
384
|
+
var _a, _b;
|
|
385
|
+
if (index$1 === prevAnswerIndex) {
|
|
386
|
+
return {
|
|
387
|
+
order: targetOptionId,
|
|
388
|
+
value: (_b = (_a = optionList.find(option => option.order === targetOptionId)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ''
|
|
389
|
+
};
|
|
390
|
+
} else {
|
|
391
|
+
return prevAnswer;
|
|
392
|
+
}
|
|
459
393
|
});
|
|
460
|
-
}
|
|
394
|
+
});
|
|
461
395
|
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
} else {
|
|
399
|
+
return React.createElement(QuizDraggbleDroppedOption.default, {
|
|
400
|
+
key: index$1,
|
|
401
|
+
id: option.order.toString(),
|
|
402
|
+
content: option.value,
|
|
403
|
+
role: getRole(),
|
|
404
|
+
disabled: !!userId,
|
|
405
|
+
indexOrder: index$1 + 1,
|
|
406
|
+
isMarkdown: !!(course === null || course === void 0 ? void 0 : course.preference.renderMarkdownInQuizOptions)
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}));
|
|
475
410
|
};
|
|
476
|
-
return
|
|
411
|
+
return React.createElement(QuestionBox.default, {
|
|
477
412
|
title: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionTitle,
|
|
478
413
|
titlePrefix: "Q.",
|
|
479
414
|
onNext: onNext,
|
|
480
415
|
isNextActive: isNextActive,
|
|
481
|
-
submitStatus:
|
|
416
|
+
submitStatus: React.createElement(QuizSubmitStatusText.default, {
|
|
482
417
|
status: submitStatus
|
|
483
418
|
}),
|
|
484
|
-
submitResult:
|
|
419
|
+
submitResult: React.createElement(QuizResultBadge.default, {
|
|
485
420
|
materialQuizResponse: materialQuizResponse
|
|
486
421
|
}),
|
|
487
422
|
bodyContainerRef: containerRef,
|
|
@@ -499,60 +434,51 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
499
434
|
backgroundColor: isNextActive ? theme.palette.secondary.main : isDisabled ? designTokens.base.color.gray6 : theme.palette.primary.main,
|
|
500
435
|
color: isNextActive ? theme.palette.secondary.contrastText : isDisabled ? designTokens.base.color.gray3 : theme.palette.primary.contrastText
|
|
501
436
|
}
|
|
502
|
-
}]
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
indexOrder: index + 1,
|
|
548
|
-
isMarkdown: !!(course === null || course === void 0 ? void 0 : course.preference.renderMarkdownInQuizOptions)
|
|
549
|
-
}, correctAnswer.order);
|
|
550
|
-
})]
|
|
551
|
-
})
|
|
552
|
-
}) : null, jsxRuntime.jsx(MaterialQuizAnswerExplanation.default, {})]
|
|
553
|
-
})]
|
|
554
|
-
})
|
|
555
|
-
});
|
|
437
|
+
}]
|
|
438
|
+
}, React.createElement(material.Stack, {
|
|
439
|
+
height: "100%",
|
|
440
|
+
gap: "1rem"
|
|
441
|
+
}, hasInlinePassage && React.createElement("div", {
|
|
442
|
+
id: element.MATERIAL_QUIZ_PASSIVE_ID,
|
|
443
|
+
ref: questionRef
|
|
444
|
+
}, React.createElement(MaterialQuizInfo.default, {
|
|
445
|
+
renderWithBox: false
|
|
446
|
+
})), React.createElement("div", {
|
|
447
|
+
id: element.MATERIAL_QUIZ_ANSWER_ID
|
|
448
|
+
}, React.createElement(StyledOptionBox, {
|
|
449
|
+
ref: optionBoxRef,
|
|
450
|
+
vertical: vertical
|
|
451
|
+
}, renderQuizDragOption(), React.createElement(StyledVerticalDivider, {
|
|
452
|
+
vertical: vertical
|
|
453
|
+
}, React.createElement(blocks.Icon, {
|
|
454
|
+
size: "elephant",
|
|
455
|
+
icon: icons.eilSortItem,
|
|
456
|
+
rotate: 90,
|
|
457
|
+
style: {
|
|
458
|
+
color: designTokens.base.color.navy3
|
|
459
|
+
}
|
|
460
|
+
})), React.createElement(StyledHorizontalDivider, {
|
|
461
|
+
vertical: vertical
|
|
462
|
+
}), renderQuizDragAnswers()), !!userId ? React.createElement(blocks.Flex, {
|
|
463
|
+
margintop: "1rem",
|
|
464
|
+
column: true
|
|
465
|
+
}, React.createElement(StyledQuizOptionsDropZone, null, React.createElement(blocks.Text, {
|
|
466
|
+
role: "white",
|
|
467
|
+
size: "small"
|
|
468
|
+
}, intl$1.formatMessage({
|
|
469
|
+
id: 'materialQuiz.answer'
|
|
470
|
+
})), correctAnswerList.map((correctAnswer, index) => {
|
|
471
|
+
var _a;
|
|
472
|
+
return React.createElement(QuizDraggbleDroppedOption.default, {
|
|
473
|
+
key: correctAnswer.order,
|
|
474
|
+
id: (_a = correctAnswer.order) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
475
|
+
content: correctAnswer.value,
|
|
476
|
+
disabled: true,
|
|
477
|
+
role: "correct",
|
|
478
|
+
indexOrder: index + 1,
|
|
479
|
+
isMarkdown: !!(course === null || course === void 0 ? void 0 : course.preference.renderMarkdownInQuizOptions)
|
|
480
|
+
});
|
|
481
|
+
}))) : null, React.createElement(MaterialQuizAnswerExplanation.default, null))));
|
|
556
482
|
};
|
|
557
483
|
|
|
558
484
|
exports.default = MaterialQuizSelectMultipleOrder;
|