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