@digabi/exam-engine-core 19.17.0-alpha.2 → 19.17.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/testExamRendering.js +2 -1
- package/dist/__tests__/testExamRendering.js.map +1 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/results/EndExamSession.d.ts +1 -1
- package/dist/components/results/EndExamSession.d.ts.map +1 -1
- package/dist/components/results/Results.d.ts +1 -0
- package/dist/components/results/Results.d.ts.map +1 -1
- package/dist/components/results/Results.js +8 -8
- package/dist/components/results/Results.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/dist/main.css +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EndExamSession.d.ts","sourceRoot":"","sources":["../../../src/components/results/EndExamSession.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"EndExamSession.d.ts","sourceRoot":"","sources":["../../../src/components/results/EndExamSession.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;CACtB;AAED,eAAO,MAAM,cAAc,mCAAoC,KAAK,sBAiCnE,CAAA"}
|
@@ -11,6 +11,7 @@ export interface ResultsProps extends CommonExamProps {
|
|
11
11
|
singleGrading?: boolean;
|
12
12
|
returnToExam: () => void;
|
13
13
|
endSession: () => Promise<void>;
|
14
|
+
studentSessionEnded: boolean;
|
14
15
|
}
|
15
16
|
declare const _default: React.MemoExoticComponent<React.ComponentType<any>>;
|
16
17
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Results.d.ts","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAU/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAwB9C,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,8GAA8G;IAC9G,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,mBAAmB,EAAE,OAAO,CAAA;CAC7B;;AAmJD,wBAA6E"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useContext, useEffect
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
2
2
|
import { I18nextProvider } from 'react-i18next';
|
3
3
|
import { createRenderChildNodes } from '../../createRenderChildNodes';
|
4
4
|
import { findChildElement, queryAncestors } from '../../dom-utils';
|
@@ -52,7 +52,7 @@ const renderChildNodes = createRenderChildNodes({
|
|
52
52
|
'scored-text-answer': ScoredTextAnswer,
|
53
53
|
'scored-text-answers': RenderChildNodes
|
54
54
|
});
|
55
|
-
const Results = ({ doc, returnToExam, endSession }) => {
|
55
|
+
const Results = ({ doc, returnToExam, endSession, studentSessionEnded }) => {
|
56
56
|
const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
|
57
57
|
const { answersByQuestionId } = useContext(ResultsContext);
|
58
58
|
const examTitle = findChildElement(root, 'exam-title');
|
@@ -65,16 +65,16 @@ const Results = ({ doc, returnToExam, endSession }) => {
|
|
65
65
|
useEffect(() => {
|
66
66
|
window.location.hash = '';
|
67
67
|
}, []);
|
68
|
-
const
|
69
|
-
const onEndSession = async () => {
|
68
|
+
const onEndSession = () => {
|
70
69
|
try {
|
71
70
|
const elements = document.querySelectorAll('main > *:not(.e-logout-container)');
|
72
71
|
elements.forEach(el => {
|
73
72
|
const element = el;
|
74
73
|
element.style.height = `${element.clientHeight}px`;
|
75
74
|
});
|
76
|
-
|
77
|
-
|
75
|
+
setTimeout(() => {
|
76
|
+
void endSession();
|
77
|
+
}, 50);
|
78
78
|
}
|
79
79
|
catch (e) {
|
80
80
|
console.error(e);
|
@@ -83,7 +83,7 @@ const Results = ({ doc, returnToExam, endSession }) => {
|
|
83
83
|
return (React.createElement(I18nextProvider, { i18n: i18n },
|
84
84
|
React.createElement("main", { className: classNames('e-exam e-results', {
|
85
85
|
'examine-exam-page': isStudentsExamineExamPage,
|
86
|
-
'session-ended':
|
86
|
+
'session-ended': studentSessionEnded
|
87
87
|
}), lang: subjectLanguage },
|
88
88
|
React.createElement(React.StrictMode, null),
|
89
89
|
examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
|
@@ -98,7 +98,7 @@ const Results = ({ doc, returnToExam, endSession }) => {
|
|
98
98
|
React.createElement(ExamineExamInstructions, null),
|
99
99
|
React.createElement(ErrorIndicatorForErrors, { validationErrors: validateAnswers(parseExamStructure(doc), answersByQuestionId), inExam: false }),
|
100
100
|
renderChildNodes(root),
|
101
|
-
(studentCanEndSession || !isStudentsExamineExamPage) && (React.createElement(EndExamSession, { onEndSession: isStudentsExamineExamPage ? onEndSession : () => Promise.resolve(), sessionEnded:
|
101
|
+
(studentCanEndSession || !isStudentsExamineExamPage) && (React.createElement(EndExamSession, { onEndSession: isStudentsExamineExamPage ? onEndSession : () => Promise.resolve(), sessionEnded: studentSessionEnded }))),
|
102
102
|
React.createElement("div", { className: "e-exam-footer-content" })));
|
103
103
|
};
|
104
104
|
const BackToExamText = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../src/components/results/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,gBAAgB,MAAM,0BAA0B,CAAA;AACvD,OAAO,iBAAiB,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACvF,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAE5C,OAAO,uBAAuB,MAAM,6BAA6B,CAAA;AACjE,OAAO,gBAAgB,MAAM,sBAAsB,CAAA;AACnD,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,KAAK,MAAM,iBAAiB,CAAA;AACnC,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,mBAAmB,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,QAAQ,MAAM,YAAY,CAAA;AACj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