@elice/material-quiz 1.250313.0 → 1.250317.0-concurrenttutoring.0
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.
|
@@ -10,6 +10,7 @@ var muiElements = require('@elice/mui-elements');
|
|
|
10
10
|
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
11
11
|
var material = require('@mui/material');
|
|
12
12
|
var index = require('../../helpers/index.js');
|
|
13
|
+
var MaterialQuizContext = require('./context/MaterialQuizContext.js');
|
|
13
14
|
|
|
14
15
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
16
|
|
|
@@ -39,6 +40,10 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
39
40
|
var status = React__default.default.useMemo(function () {
|
|
40
41
|
return index.getQuizResultStatus(materialQuizResponse);
|
|
41
42
|
}, [materialQuizResponse]);
|
|
43
|
+
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
44
|
+
lecture = _useMaterialQuizState.lecture;
|
|
45
|
+
var isTestLectureEnded = index.checkUserLectureTestEnded(lecture);
|
|
46
|
+
var isTestLectureResetEnabled = lecture === null || lecture === void 0 ? void 0 : lecture.isTestResetEnabledByStudent;
|
|
42
47
|
//
|
|
43
48
|
//
|
|
44
49
|
//
|
|
@@ -56,6 +61,9 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
56
61
|
})]
|
|
57
62
|
});
|
|
58
63
|
case index.QuizResultStatus.Wrong:
|
|
64
|
+
if (isTestLectureEnded && !isTestLectureResetEnabled) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
59
67
|
return jsxRuntime.jsxs(StyledQuizResultTypography, {
|
|
60
68
|
variant: "body2",
|
|
61
69
|
color: function color(theme) {
|
|
@@ -5,7 +5,8 @@ import { useRawEliceIntl } from '@elice/intl';
|
|
|
5
5
|
import { EliceIcon } from '@elice/mui-elements';
|
|
6
6
|
import { faCircleCheck, faCircleXmark } from '@fortawesome/pro-solid-svg-icons';
|
|
7
7
|
import { Typography } from '@mui/material';
|
|
8
|
-
import { getQuizResultStatus, QuizResultStatus } from '../../helpers/index.js';
|
|
8
|
+
import { getQuizResultStatus, checkUserLectureTestEnded, QuizResultStatus } from '../../helpers/index.js';
|
|
9
|
+
import { useMaterialQuizState } from './context/MaterialQuizContext.js';
|
|
9
10
|
|
|
10
11
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
11
12
|
//
|
|
@@ -30,6 +31,10 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
30
31
|
var status = React.useMemo(function () {
|
|
31
32
|
return getQuizResultStatus(materialQuizResponse);
|
|
32
33
|
}, [materialQuizResponse]);
|
|
34
|
+
var _useMaterialQuizState = useMaterialQuizState(),
|
|
35
|
+
lecture = _useMaterialQuizState.lecture;
|
|
36
|
+
var isTestLectureEnded = checkUserLectureTestEnded(lecture);
|
|
37
|
+
var isTestLectureResetEnabled = lecture === null || lecture === void 0 ? void 0 : lecture.isTestResetEnabledByStudent;
|
|
33
38
|
//
|
|
34
39
|
//
|
|
35
40
|
//
|
|
@@ -47,6 +52,9 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
47
52
|
})]
|
|
48
53
|
});
|
|
49
54
|
case QuizResultStatus.Wrong:
|
|
55
|
+
if (isTestLectureEnded && !isTestLectureResetEnabled) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
50
58
|
return jsxs(StyledQuizResultTypography, {
|
|
51
59
|
variant: "body2",
|
|
52
60
|
color: function color(theme) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.250317.0-concurrenttutoring.0",
|
|
4
4
|
"description": "User view and editing components of Elice material quiz",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
77
77
|
"@elice/intl": "0.241127.0",
|
|
78
78
|
"@elice/markdown": "1.241015.0",
|
|
79
|
-
"@elice/material-shared-types": "1.
|
|
80
|
-
"@elice/material-shared-utils": "1.
|
|
79
|
+
"@elice/material-shared-types": "1.250317.0-concurrenttutoring.0",
|
|
80
|
+
"@elice/material-shared-utils": "1.250317.0-concurrenttutoring.0",
|
|
81
81
|
"@elice/mui-elements": "^5.250108.0-controllabel.0",
|
|
82
82
|
"@elice/mui-system": "^5.250108.0-controllabel.0",
|
|
83
83
|
"@elice/openapi-client-course": "^1.241220.0",
|