@digabi/exam-engine-core 19.12.1-beta.1 → 19.12.1-delta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/__tests__/examServerApi.d.ts.map +1 -1
  2. package/dist/__tests__/examServerApi.js +2 -1
  3. package/dist/__tests__/examServerApi.js.map +1 -1
  4. package/dist/__tests__/testExamRendering.js +10 -3
  5. package/dist/__tests__/testExamRendering.js.map +1 -1
  6. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  7. package/dist/components/context/ResultsContext.js +1 -1
  8. package/dist/components/context/ResultsContext.js.map +1 -1
  9. package/dist/components/exam/Exam.d.ts +10 -0
  10. package/dist/components/exam/Exam.d.ts.map +1 -1
  11. package/dist/components/exam/Exam.js +9 -2
  12. package/dist/components/exam/Exam.js.map +1 -1
  13. package/dist/components/exam/ExamFooter.d.ts.map +1 -1
  14. package/dist/components/exam/ExamFooter.js +12 -2
  15. package/dist/components/exam/ExamFooter.js.map +1 -1
  16. package/dist/components/exam/internal/ErrorIndicator.js +1 -1
  17. package/dist/components/exam/internal/ErrorIndicator.js.map +1 -1
  18. package/dist/components/results/ChoiceAnswer.js +5 -6
  19. package/dist/components/results/ChoiceAnswer.js.map +1 -1
  20. package/dist/components/results/DropdownAnswer.d.ts +1 -1
  21. package/dist/components/results/DropdownAnswer.d.ts.map +1 -1
  22. package/dist/components/results/DropdownAnswer.js +23 -23
  23. package/dist/components/results/DropdownAnswer.js.map +1 -1
  24. package/dist/components/results/MultiLineAnswer.d.ts.map +1 -1
  25. package/dist/components/results/MultiLineAnswer.js +1 -4
  26. package/dist/components/results/MultiLineAnswer.js.map +1 -1
  27. package/dist/components/results/Question.d.ts.map +1 -1
  28. package/dist/components/results/Question.js +4 -5
  29. package/dist/components/results/Question.js.map +1 -1
  30. package/dist/components/results/QuestionTitle.d.ts.map +1 -1
  31. package/dist/components/results/QuestionTitle.js +2 -7
  32. package/dist/components/results/QuestionTitle.js.map +1 -1
  33. package/dist/components/results/Results.d.ts +0 -1
  34. package/dist/components/results/Results.d.ts.map +1 -1
  35. package/dist/components/results/Results.js +5 -23
  36. package/dist/components/results/Results.js.map +1 -1
  37. package/dist/components/results/Section.d.ts.map +1 -1
  38. package/dist/components/results/Section.js +9 -2
  39. package/dist/components/results/Section.js.map +1 -1
  40. package/dist/components/results/SingleLineAnswer.d.ts.map +1 -1
  41. package/dist/components/results/SingleLineAnswer.js +1 -4
  42. package/dist/components/results/SingleLineAnswer.js.map +1 -1
  43. package/dist/components/results/internal/QuestionAutoScore.d.ts +1 -1
  44. package/dist/components/results/internal/QuestionAutoScore.d.ts.map +1 -1
  45. package/dist/components/results/internal/QuestionAutoScore.js +0 -5
  46. package/dist/components/results/internal/QuestionAutoScore.js.map +1 -1
  47. package/dist/components/results/internal/QuestionScoresContainer.d.ts +1 -1
  48. package/dist/components/results/internal/QuestionScoresContainer.d.ts.map +1 -1
  49. package/dist/components/results/internal/QuestionScoresContainer.js +0 -5
  50. package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
  51. package/dist/components/results/isExamFinishPageHook.d.ts +1 -1
  52. package/dist/components/results/isExamFinishPageHook.d.ts.map +1 -1
  53. package/dist/components/results/isExamFinishPageHook.js +1 -1
  54. package/dist/components/results/isExamFinishPageHook.js.map +1 -1
  55. package/dist/i18n/fi-FI.d.ts +18 -0
  56. package/dist/i18n/fi-FI.d.ts.map +1 -1
  57. package/dist/i18n/fi-FI.js +18 -0
  58. package/dist/i18n/fi-FI.js.map +1 -1
  59. package/dist/i18n/sv-FI.d.ts.map +1 -1
  60. package/dist/i18n/sv-FI.js +18 -0
  61. package/dist/i18n/sv-FI.js.map +1 -1
  62. package/dist/main-bundle.js +1 -1
  63. package/dist/main-bundle.js.LICENSE.txt +10 -0
  64. package/dist/main.css +1 -1
  65. package/dist/types/ExamServerAPI.d.ts +1 -0
  66. package/dist/types/ExamServerAPI.d.ts.map +1 -1
  67. package/package.json +4 -5
@@ -17,7 +17,7 @@ export const withResultsContext = withContext(ResultsContext, ({ scores, doc, gr
17
17
  };
18
18
  });
19
19
  export function findMultiChoiceFromGradingStructure(gradingStructure, id) {
20
- const choiceGroups = (gradingStructure === null || gradingStructure === void 0 ? void 0 : gradingStructure.questions.filter(v => v.type === 'choicegroup')) || [];
20
+ const choiceGroups = gradingStructure.questions.filter(v => v.type === 'choicegroup');
21
21
  for (let i = 0, length = choiceGroups.length; i < length; i++) {
22
22
  const choiceGroup = choiceGroups[i];
23
23
  for (let j = 0, choicesLength = choiceGroup.choices.length; j < choicesLength; j++) {
@@ -1 +1 @@
1
- {"version":3,"file":"ResultsContext.js","sourceRoot":"","sources":["../../../src/components/context/ResultsContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAUpG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAY3C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAiB,EAAoB,CAAC,CAAA;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAC3C,cAAc,EACd,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE;IACzE,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAC1D,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;IAC1E,MAAM,UAAU,GAAG,+BAA+B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAEpH,OAAO;QACL,mBAAmB;QACnB,gBAAgB;QAChB,MAAM;QACN,UAAU;QACV,WAAW;QAC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C,eAAe,EAAE,UAAU,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,GAAG,CAAC,EAAE;QAC5E,OAAO,CAAC,CAAA;KACT;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ExamAnswer, ExamServerAPI, InitialCasStatus, RestrictedAudioPlaybackStats } from '../../index';
3
+ import { TextAnswer as TextAnswerType, RichTextAnswer } from '../../types/ExamAnswer';
3
4
  /** Props common to taking the exams and viewing results */
4
5
  export interface CommonExamProps {
5
6
  /** Initial answers */
@@ -13,6 +14,12 @@ export interface CommonExamProps {
13
14
  /** @deprecated Not used anymore */
14
15
  language?: string;
15
16
  }
17
+ interface UndoViewProps {
18
+ close: () => void;
19
+ restoreAnswer: (examAnswer: TextAnswerType | RichTextAnswer) => void;
20
+ questionId: number;
21
+ title: string;
22
+ }
16
23
  /** Props related to taking the exam, 'executing' it */
17
24
  export interface ExamProps extends CommonExamProps {
18
25
  /** The status of CAS software on the OS */
@@ -26,6 +33,9 @@ export interface ExamProps extends CommonExamProps {
26
33
  restrictedAudioPlaybackStats: RestrictedAudioPlaybackStats[];
27
34
  /** Exam Server API implementation */
28
35
  examServerApi: ExamServerAPI;
36
+ studentName: string;
37
+ showUndoView: boolean;
38
+ undoViewProps: UndoViewProps;
29
39
  }
30
40
  declare const _default: React.MemoExoticComponent<React.ComponentType<any>>;
31
41
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Exam.d.ts","sourceRoot":"","sources":["../../../src/components/exam/Exam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AA8CvG,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,sBAAsB;IACtB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,uCAAuC;IACv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,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,uDAAuD;AACvD,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,2CAA2C;IAC3C,SAAS,EAAE,gBAAgB,CAAA;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;OAGG;IACH,4BAA4B,EAAE,4BAA4B,EAAE,CAAA;IAC5D,qCAAqC;IACrC,aAAa,EAAE,aAAa,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,aAAa,CAAA;CAC7B;;AA2MD,wBAAuE"}
@@ -45,6 +45,8 @@ import RenderChildNodes from '../RenderChildNodes';
45
45
  import { QuestionNumber } from '../shared/QuestionNumber';
46
46
  import ExamTranslation from '../shared/ExamTranslation';
47
47
  import * as _ from 'lodash-es';
48
+ import { StudentNameHeader } from './StudentNameHeader';
49
+ import { UndoView } from './UndoView';
48
50
  const renderChildNodes = createRenderChildNodes({
49
51
  attachment: ExamAttachment,
50
52
  'attachment-link': mkAttachmentLink('link'),
@@ -76,7 +78,7 @@ const renderChildNodes = createRenderChildNodes({
76
78
  video: Video,
77
79
  'image-overlay': ImageOverlay
78
80
  });
79
- const Exam = ({ doc, casStatus, answers, restrictedAudioPlaybackStats, examServerApi }) => {
81
+ const Exam = ({ doc, casStatus, answers, restrictedAudioPlaybackStats, examServerApi, studentName, showUndoView, undoViewProps }) => {
80
82
  const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
81
83
  const examTitle = findChildElement(root, 'exam-title');
82
84
  const examInstruction = findChildElement(root, 'exam-instruction');
@@ -150,6 +152,8 @@ const Exam = ({ doc, casStatus, answers, restrictedAudioPlaybackStats, examServe
150
152
  toc === null || toc === void 0 ? void 0 : toc.addEventListener('wheel', handleTOCScroll, { passive: false });
151
153
  return () => toc === null || toc === void 0 ? void 0 : toc.addEventListener('wheel', handleTOCScroll, { passive: false });
152
154
  }, []);
155
+ // TODO: Remove 'isOldKoeVersion' checks when old Koe version is not supported anymore
156
+ const isOldKoeVersion = examServerApi.finishExam === undefined;
153
157
  return (React.createElement(Provider, { store: store },
154
158
  React.createElement(I18nextProvider, { i18n: i18n },
155
159
  React.createElement("main", { className: "e-exam", lang: subjectLanguage, "aria-labelledby": examTitleId, ref: examRef },
@@ -160,6 +164,7 @@ const Exam = ({ doc, casStatus, answers, restrictedAudioPlaybackStats, examServe
160
164
  React.createElement(TableOfContentsSidebar, { element: tableOfContents, renderChildNodes }))),
161
165
  React.createElement("div", { className: "main-exam-container" },
162
166
  React.createElement("div", { className: "main-exam" },
167
+ React.createElement(StudentNameHeader, { studentName: studentName }),
163
168
  React.createElement(SectionElement, { "aria-labelledby": examTitleId },
164
169
  examTitle && React.createElement(DocumentTitle, { id: examTitleId }, renderChildNodes(examTitle)),
165
170
  date && (React.createElement("p", null,
@@ -170,9 +175,11 @@ const Exam = ({ doc, casStatus, answers, restrictedAudioPlaybackStats, examServe
170
175
  renderChildNodes }))),
171
176
  externalMaterial && (React.createElement(ExternalMaterial, { element: externalMaterial, renderChildNodes, forceRender: true }))),
172
177
  renderChildNodes(root)))),
178
+ !isOldKoeVersion && React.createElement("div", { className: "e-section e-exam-footer-content" }),
173
179
  React.createElement("div", { className: "e-footer" },
174
180
  React.createElement(ErrorIndicator, null),
175
- React.createElement(SaveIndicator, null))))));
181
+ React.createElement(SaveIndicator, null)),
182
+ showUndoView && !isOldKoeVersion && React.createElement(UndoView, { ...undoViewProps })))));
176
183
  };
177
184
  export default React.memo(withExamContext(withCommonExamContext(Exam)));
178
185
  //# sourceMappingURL=Exam.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Exam.js","sourceRoot":"","sources":["../../../src/components/exam/Exam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;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CAAS,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAU,CAC/C,CACL;gCACA,eAAe,IAAI,oBAAC,eAAe,IAAO,OAAO,EAAE,eAAe,EAAE,gBAAgB,GAAM;gCAE1F,eAAe,IAAI,CAClB,6BAAK,SAAS,EAAC,oBAAoB;oCACjC,oBAAC,eAAe,IAEZ,OAAO,EAAE,eAAe;wCACxB,gBAAgB,GAElB,CACE,CACP;gCACA,gBAAgB,IAAI,CACnB,oBAAC,gBAAgB,IAAO,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI,GAAM,CAC7F,CACc;4BAChB,gBAAgB,CAAC,IAAI,CAAC,CACnB,CACF,CACF;gBACL,CAAC,eAAe,IAAI,6BAAK,SAAS,EAAC,iCAAiC,GAAG;gBACxE,6BAAK,SAAS,EAAC,UAAU;oBACvB,oBAAC,cAAc,OAAG;oBAClB,oBAAC,aAAa,OAAG,CACb;gBACL,YAAY,IAAI,CAAC,eAAe,IAAI,oBAAC,QAAQ,OAAK,aAAa,GAAI,CAC/D,CACS,CACT,CACZ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExamFooter.d.ts","sourceRoot":"","sources":["../../../src/components/exam/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAEpE;;AAED,wBAAqC"}
1
+ {"version":3,"file":"ExamFooter.d.ts","sourceRoot":"","sources":["../../../src/components/exam/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAIjE,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAuBpE;;AAED,wBAAqC"}
@@ -1,7 +1,17 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import SectionElement from '../SectionElement';
3
+ import { ExamContext } from '../context/ExamContext';
4
+ import { useExamTranslation } from '../../i18n';
3
5
  function ExamFooter({ element, renderChildNodes }) {
4
- return React.createElement(SectionElement, null, renderChildNodes(element));
6
+ const { examServerApi } = useContext(ExamContext);
7
+ const { finishExam } = examServerApi;
8
+ const { t } = useExamTranslation();
9
+ return (React.createElement(SectionElement, null,
10
+ React.createElement("div", { className: "e-exam-footer" },
11
+ renderChildNodes(element),
12
+ finishExam !== undefined && (React.createElement(React.Fragment, null,
13
+ React.createElement("button", { id: "finishExam", onClick: () => void finishExam(), "aria-describedby": "finishExamInstructions" }, t('finish-exam.finish')),
14
+ React.createElement("div", { className: "e-finish-exam-instructions", id: "finishExamInstructions" }, t('finish-exam.instructions')))))));
5
15
  }
6
16
  export default React.memo(ExamFooter);
7
17
  //# sourceMappingURL=ExamFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExamFooter.js","sourceRoot":"","sources":["../../../src/components/exam/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAG9C,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACnE,OAAO,oBAAC,cAAc,QAAE,gBAAgB,CAAC,OAAO,CAAC,CAAkB,CAAA;AACrE,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
1
+ {"version":3,"file":"ExamFooter.js","sourceRoot":"","sources":["../../../src/components/exam/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACnE,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,CAAA;IACpC,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAElC,OAAO,CACL,oBAAC,cAAc;QACb,6BAAK,SAAS,EAAC,eAAe;YAC3B,gBAAgB,CAAC,OAAO,CAAC;YAEzB,UAAU,KAAK,SAAS,IAAI,CAC3B;gBACE,gCAAQ,EAAE,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,UAAU,EAAE,sBAAmB,wBAAwB,IAChG,CAAC,CAAC,oBAAoB,CAAC,CACjB;gBACT,6BAAK,SAAS,EAAC,4BAA4B,EAAC,EAAE,EAAC,wBAAwB,IACpE,CAAC,CAAC,0BAA0B,CAAC,CAC1B,CACL,CACJ,CACG,CACS,CAClB,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
@@ -26,7 +26,7 @@ const AnswerTooLongError = ({ displayNumber, characterCount }) => {
26
26
  };
27
27
  export function ErrorIndicatorForErrors({ validationErrors, inExam }) {
28
28
  return validationErrors.length > 0 ? (React.createElement("div", { className: classNames({ 'error-indicator e-bg-color-error e-color-off-white': inExam }, 'e-columns e-columns--inline e-font-size-xs e-pad-1 e-mrg-r-1'), role: "alert" },
29
- React.createElement("div", { className: "e-column e-column--narrow", style: { color: '#f90' } },
29
+ React.createElement("div", { className: "e-column e-column--narrow" },
30
30
  React.createElement(FontAwesomeIcon, { size: "lg", icon: faExclamationTriangle, fixedWidth: true, className: "e-mrg-r-1" })),
31
31
  React.createElement("div", { className: "e-column e-column--gapless" }, validationErrors.map(validationError => {
32
32
  const key = validationError.type + validationError.displayNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorIndicator.js","sourceRoot":"","sources":["../../../../src/components/exam/internal/ErrorIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,qBAAqB,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,gBAAgB,GAAyC,KAAK,CAAC,EAAE;IACrE,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAC5C,OAAO,CACL;QACG,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,aAAa;YACtD,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,CAAC,IAAI,oBAAC,aAAa,OAAK,KAAK,GAAI;YACnE,CAAC,CAAC,EAAE;QAAE,GAAG;QACV,oBAAC,qBAAqB,OAAK,KAAK,GAAI,CACjC,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,kBAAkB,GAA2C,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE;IACvG,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,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CAAA;YAC/D,IAAI,YAAY,EAAE;gBAChB,OAAO,0CAAG,GAAG,YAAY,CAAC,WAAY,CAAC,IAAI,EAAE,GAAG,CAAI,CAAA;aACrD;SACF;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA"}
@@ -26,31 +26,30 @@ function ChoiceAnswerOption({ renderChildNodes, selected, element, questionId, d
26
26
  React.createElement(Content, null))));
27
27
  }
28
28
  function ChoiceAnswer({ element, renderChildNodes }) {
29
- var _a, _b;
29
+ var _a;
30
30
  const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
31
31
  const questionId = getNumericAttribute(element, 'question-id');
32
32
  const answer = answersByQuestionId[questionId];
33
33
  const direction = element.getAttribute('direction') || 'vertical';
34
34
  const className = element.getAttribute('class');
35
35
  const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
36
- const scoreValue = answer && ((_b = (_a = choice === null || choice === void 0 ? void 0 : choice.options) === null || _a === void 0 ? void 0 : _a.find(option => option.id === Number(answer.value))) === null || _b === void 0 ? void 0 : _b.score);
36
+ const scoreValue = answer && ((_a = choice.options.find(option => option.id === Number(answer.value))) === null || _a === void 0 ? void 0 : _a.score);
37
37
  const maxScore = getNumericAttribute(element, 'max-score');
38
38
  return (React.createElement(React.Fragment, null,
39
- React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore }),
39
+ scoreValue !== undefined && React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore }),
40
40
  React.createElement("div", { className: classNames('e-choice-answer', className, {
41
41
  'e-columns': direction === 'horizontal'
42
42
  }) }, mapChildElements(element, childElement => {
43
- var _a;
44
43
  const optionId = getNumericAttribute(childElement, 'option-id');
45
44
  const selected = answer != null && Number(answer.value) === optionId;
46
- const grading = (_a = choice === null || choice === void 0 ? void 0 : choice.options) === null || _a === void 0 ? void 0 : _a.find(option => option.id === optionId);
45
+ const grading = choice.options.find(option => option.id === optionId);
47
46
  return (React.createElement(ChoiceAnswerOption, { element: childElement,
48
47
  renderChildNodes,
49
48
  questionId,
50
49
  key: optionId,
51
50
  direction,
52
51
  selected,
53
- isCorrect: (grading === null || grading === void 0 ? void 0 : grading.correct) || false }));
52
+ isCorrect: grading.correct }));
54
53
  }))));
55
54
  }
56
55
  export default React.memo(ChoiceAnswer);
@@ -1 +1 @@
1
- {"version":3,"file":"ChoiceAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ChoiceAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,4BAA4B,MAAM,8BAA8B,CAAA;AASvE,SAAS,kBAAkB,CAAC,EAC1B,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,SAAS,EACT,SAAS,EACe;IACxB,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;IAEnD,MAAM,OAAO,GAAG,CACd,6BACE,SAAS,EAAE,UAAU,CAAC,iCAAiC,EAAE,SAAS,EAAE;YAClE,kCAAkC,EAAE,QAAQ;SAC7C,CAAC,IAED,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;IACD,MAAM,OAAO,GAAkD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
  import React from 'react';
2
2
  import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function DropdownAnswer({ element, renderChildNodes }: ExamComponentProps): React.JSX.Element;
3
+ declare function DropdownAnswer({ element, renderChildNodes }: ExamComponentProps): React.JSX.Element | null;
4
4
  declare const _default: React.MemoExoticComponent<typeof DropdownAnswer>;
5
5
  export default _default;
6
6
  //# sourceMappingURL=DropdownAnswer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/DropdownAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAUjE,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAiExE;;AAED,wBAAyC"}
1
+ {"version":3,"file":"DropdownAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/DropdownAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AASjE,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,4BA2DxE;;AAED,wBAAyC"}
@@ -7,37 +7,37 @@ import { QuestionContext } from '../context/QuestionContext';
7
7
  import { ScreenReaderOnly } from '../ScreenReaderOnly';
8
8
  import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
9
9
  import ResultsExamQuestionAutoScore from './internal/QuestionAutoScore';
10
- import { useIsFinishExamPage } from './isExamFinishPageHook';
11
10
  function DropdownAnswer({ element, renderChildNodes }) {
12
- var _a;
13
11
  const { t } = useExamTranslation();
14
12
  const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
15
13
  const { answers } = useContext(QuestionContext);
16
14
  const questionId = getNumericAttribute(element, 'question-id');
17
15
  const answer = answersByQuestionId[questionId];
18
16
  const selectedOption = findChildElement(element, childElement => (answer === null || answer === void 0 ? void 0 : answer.value) === childElement.getAttribute('option-id'));
19
- const isFinishExamPage = useIsFinishExamPage();
20
17
  const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
21
- const correctIds = (choice === null || choice === void 0 ? void 0 : choice.options.filter(o => o.correct).map(o => o.id)) || [];
22
- const correctOptions = Array.from(element.children).filter(childElement => correctIds.includes(getNumericAttribute(childElement, 'option-id')));
23
- const isAnswerCorrect = selectedOption && correctIds.includes(getNumericAttribute(selectedOption, 'option-id'));
24
- const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
25
- const scoreValue = (answer && ((_a = choice === null || choice === void 0 ? void 0 : choice.options.find(option => option.id === Number(answer.value))) === null || _a === void 0 ? void 0 : _a.score)) || 0;
26
- const maxScore = getNumericAttribute(element, 'max-score');
27
- return (React.createElement(React.Fragment, null,
28
- answers.length > 1 && React.createElement("sup", null, displayNumber),
29
- React.createElement("span", { className: classNames('e-dropdown-answer__answered', !selectedOption && 'e-dropdown-answer__no-answer', !isFinishExamPage && {
30
- 'e-dropdown-answer__answered--correct': isAnswerCorrect,
31
- 'e-dropdown-answer__answered--wrong': !isAnswerCorrect
32
- }), "data-question-id": questionId },
33
- React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
34
- selectedOption && renderChildNodes(selectedOption),
35
- React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end')),
36
- isAnswerCorrect && React.createElement(ScreenReaderOnly, null, t('screen-reader.correct-answer'))),
37
- !isFinishExamPage && !isAnswerCorrect && (React.createElement("span", { className: "e-dropdown-answer__correct", "aria-hidden": true }, correctOptions.map((correctOption, i) => (React.createElement(React.Fragment, { key: i },
38
- renderChildNodes(correctOption),
39
- i < correctOptions.length - 1 && ', '))))),
40
- scoreValue != null && (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber }))));
18
+ if (selectedOption) {
19
+ const correctIds = choice.options.filter(o => o.correct).map(o => o.id);
20
+ const correctOptions = Array.from(element.children).filter(childElement => correctIds.includes(getNumericAttribute(childElement, 'option-id')));
21
+ const isAnswerCorrect = correctIds.includes(getNumericAttribute(selectedOption, 'option-id'));
22
+ const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
23
+ const scoreValue = answer && choice.options.find(option => option.id === Number(answer.value)).score;
24
+ const maxScore = getNumericAttribute(element, 'max-score');
25
+ return (React.createElement(React.Fragment, null,
26
+ answers.length > 1 && React.createElement("sup", null, displayNumber),
27
+ React.createElement("span", { className: classNames('e-dropdown-answer__answered', {
28
+ 'e-dropdown-answer__answered--correct': isAnswerCorrect,
29
+ 'e-dropdown-answer__answered--wrong': !isAnswerCorrect
30
+ }) },
31
+ React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
32
+ renderChildNodes(selectedOption),
33
+ React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end')),
34
+ isAnswerCorrect && React.createElement(ScreenReaderOnly, null, t('screen-reader.correct-answer'))),
35
+ !isAnswerCorrect && (React.createElement("span", { className: "e-dropdown-answer__correct", "aria-hidden": true }, correctOptions.map((correctOption, i) => (React.createElement(React.Fragment, { key: i },
36
+ renderChildNodes(correctOption),
37
+ i < correctOptions.length - 1 && ', '))))),
38
+ scoreValue != null && (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber }))));
39
+ }
40
+ return null;
41
41
  }
42
42
  export default React.memo(DropdownAnswer);
43
43
  //# sourceMappingURL=DropdownAnswer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownAnswer.js","sourceRoot":"","sources":["../../../src/components/results/DropdownAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAA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
@@ -1 +1 @@
1
- {"version":3,"file":"MultiLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAM7B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACpD,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CA2BA,CAAA"}
1
+ {"version":3,"file":"MultiLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACpD,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAuBA,CAAA"}
@@ -2,7 +2,6 @@ import React, { useLayoutEffect, useRef } from 'react';
2
2
  import { useExamTranslation } from '../../i18n';
3
3
  import { renderAnnotations } from '../../renderAnnotations';
4
4
  import { ScreenReaderOnly } from '../ScreenReaderOnly';
5
- import classNames from 'classnames';
6
5
  export const MultiLineAnswer = ({ type, score, value }) => {
7
6
  const { t } = useExamTranslation();
8
7
  const answerRef = useRef(null);
@@ -12,9 +11,7 @@ export const MultiLineAnswer = ({ type, score, value }) => {
12
11
  renderAnnotations(answerRef.current, (_b = (_a = score === null || score === void 0 ? void 0 : score.pregrading) === null || _a === void 0 ? void 0 : _a.annotations) !== null && _b !== void 0 ? _b : [], (_d = (_c = score === null || score === void 0 ? void 0 : score.censoring) === null || _c === void 0 ? void 0 : _c.annotations) !== null && _d !== void 0 ? _d : []);
13
12
  }
14
13
  });
15
- return (React.createElement("div", { className: classNames('e-multiline-results-text-answer e-line-height-l e-pad-l-2 e-mrg-b-1', {
16
- noAnswer: !value
17
- }) },
14
+ return (React.createElement("div", { className: "e-multiline-results-text-answer e-line-height-l e-pad-l-2 e-mrg-b-1" },
18
15
  React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
19
16
  type === 'rich-text' ? (React.createElement("div", { dangerouslySetInnerHTML: { __html: value || '' }, ref: answerRef })) : (React.createElement("div", { className: "e-pre-wrap", ref: answerRef }, value)),
20
17
  React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end'))));
@@ -1 +1 @@
1
- {"version":3,"file":"MultiLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAIvB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9B,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAE9C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0C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AK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC,CAAA;SAChH;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,qEAAqE;QAClF,oBAAC,gBAAgB,QAAE,CAAC,CAAC,4BAA4B,CAAC,CAAoB;QACrE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CACtB,6BAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,GAAI,CAC1E,CAAC,CAAC,CAAC,CACF,6BAAK,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,SAAS,IACvC,KAAK,CACF,CACP;QACD,oBAAC,gBAAgB,QAAE,CAAC,CAAC,0BAA0B,CAAC,CAAoB,CAChE,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Question.d.ts","sourceRoot":"","sources":["../../../src/components/results/Question.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;;AAiCzC,wBAAwD"}
1
+ {"version":3,"file":"Question.d.ts","sourceRoot":"","sources":["../../../src/components/results/Question.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;;AAgCzC,wBAAwD"}
@@ -8,17 +8,16 @@ function Question({ element, renderChildNodes }) {
8
8
  const { answersByQuestionId } = useContext(ResultsContext);
9
9
  const { displayNumber, level } = useContext(QuestionContext);
10
10
  const hasAnswers = questionHasAnswers(element, answersByQuestionId);
11
- return (React.createElement("div", { className: classNames('e-exam-question', `e-level-${level}`, {
11
+ return hasAnswers ? (React.createElement("div", { className: classNames('e-exam-question', {
12
12
  'e-mrg-b-8 e-clearfix': level === 0,
13
- 'e-mrg-l-8 e-mrg-y-4': level > 0,
14
- noAnswer: !hasAnswers
13
+ 'e-mrg-l-8 e-mrg-y-4': level > 0
15
14
  }), id: displayNumber },
16
15
  renderChildNodes(element),
17
- React.createElement(AnnotationList, null)));
16
+ React.createElement(AnnotationList, null))) : null;
18
17
  }
19
18
  function questionHasAnswers(element, answers) {
20
19
  const answerElems = findChildrenAnswers(element);
21
- return answerElems.some(e => { var _a; return (_a = answers[getNumericAttribute(e, 'question-id')]) === null || _a === void 0 ? void 0 : _a.value; });
20
+ return answerElems.some(e => answers[getNumericAttribute(e, 'question-id')]);
22
21
  }
23
22
  export default React.memo(withQuestionContext(Question));
24
23
  //# sourceMappingURL=Question.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/results/Question.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,cAAc,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAI1D,SAAS,QAAQ,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjE,MAAM,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC1D,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC5D,MAAM,UAAU,GAAG,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;IAEnE,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,WAAW,KAAK,EAAE,EAAE;YAC3D,sBAAsB,EAAE,KAAK,KAAK,CAAC;YACnC,qBAAqB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,CAAC,CAAC,CAClB,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE;YACvC,sBAAsB,EAAE,KAAK,KAAK,CAAC;YACnC,qBAAqB,EAAE,KAAK,GAAG,CAAC;SACjC,CAAC,EACF,EAAE,EAAE,aAAa;QAEhB,gBAAgB,CAAC,OAAO,CAAC;QAC1B,oBAAC,cAAc,OAAG,CACd,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgB,EAAE,OAAmC;IAC/E,MAAM,WAAW,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAChD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,EAAE,aAAa,CAAE,CAAC,CAAC,CAAA;AAC/E,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/results/QuestionTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAKjE,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBA0BvE;;AAED,wBAAwC"}
1
+ {"version":3,"file":"QuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/results/QuestionTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAwBvE;;AAED,wBAAwC"}
@@ -4,20 +4,15 @@ import AnsweringInstructions from '../AnsweringInstructions';
4
4
  import NotificationIcon from '../NotificationIcon';
5
5
  import { QuestionContext } from '../context/QuestionContext';
6
6
  import { formatQuestionDisplayNumber } from '../../formatting';
7
- import { Score } from '../shared/Score';
8
- import { useIsFinishExamPage } from './isExamFinishPageHook';
9
7
  function QuestionTitle({ element, renderChildNodes }) {
10
- const { displayNumber, level, maxAnswers, maxScore, childQuestions } = useContext(QuestionContext);
8
+ const { displayNumber, level, maxAnswers, childQuestions } = useContext(QuestionContext);
11
9
  const Tag = `h${Math.min(3 + level, 6)}`;
12
- const isFinishExamPage = useIsFinishExamPage();
13
10
  return (React.createElement(React.Fragment, null,
14
11
  React.createElement(Tag, { className: classNames('exam-question-title', { 'e-normal e-font-size-m': level > 0 }) },
15
12
  React.createElement("strong", { className: classNames('exam-question-title__display-number', {
16
13
  'exam-question-title__display-number--indented': level > 0
17
14
  }) }, `${formatQuestionDisplayNumber(displayNumber)} `),
18
- renderChildNodes(element),
19
- ' ',
20
- isFinishExamPage && React.createElement(Score, { score: maxScore, size: level === 0 ? 'large' : 'small' })),
15
+ renderChildNodes(element)),
21
16
  maxAnswers != null && childQuestions.length > 0 && (React.createElement("p", { className: "e-italic" },
22
17
  React.createElement(NotificationIcon, null),
23
18
  React.createElement(AnsweringInstructions, { maxAnswers, childQuestions, elementType: 'question' })))));
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionTitle.js","sourceRoot":"","sources":["../../../src/components/results/QuestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,qBAAqB,MAAM,0BAA0B,CAAA;AAC5D,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA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ores for exam answers */
10
10
  scores: Score[];
11
11
  singleGrading?: boolean;
12
- returnToExam: () => void;
13
12
  }
14
13
  declare const _default: React.MemoExoticComponent<React.ComponentType<any>>;
15
14
  export default _default;
@@ -1 +1 @@
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;AAuB9C,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;CACzB;;AAwHD,wBAA6E"}
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;AAqB9C,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;CACxB;;AAoFD,wBAA6E"}
@@ -1,5 +1,5 @@
1
1
  import React, { useContext, useEffect } from 'react';
2
- import { I18nextProvider, useTranslation } from 'react-i18next';
2
+ import { I18nextProvider } from 'react-i18next';
3
3
  import { createRenderChildNodes } from '../../createRenderChildNodes';
4
4
  import { findChildElement, queryAncestors } from '../../dom-utils';
5
5
  import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
@@ -28,8 +28,6 @@ import { validateAnswers } from '../../validateAnswers';
28
28
  import { parseExamStructure } from '../../parser/parseExamStructure';
29
29
  import { QuestionNumber } from '../shared/QuestionNumber';
30
30
  import ExamTranslation from '../shared/ExamTranslation';
31
- import { useIsFinishExamPage } from './isExamFinishPageHook';
32
- import classNames from 'classnames';
33
31
  const renderChildNodes = createRenderChildNodes({
34
32
  attachment: RenderChildNodes,
35
33
  'attachment-link': mkAttachmentLink('plain'),
@@ -51,7 +49,7 @@ const renderChildNodes = createRenderChildNodes({
51
49
  'scored-text-answer': ScoredTextAnswer,
52
50
  'scored-text-answers': RenderChildNodes
53
51
  });
54
- const Results = ({ doc, returnToExam }) => {
52
+ const Results = ({ doc }) => {
55
53
  const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
56
54
  const { answersByQuestionId } = useContext(ResultsContext);
57
55
  const examTitle = findChildElement(root, 'exam-title');
@@ -59,33 +57,17 @@ const Results = ({ doc, returnToExam }) => {
59
57
  const i18n = useCached(() => initI18n(language, examCode, dayCode));
60
58
  useEffect(changeLanguage(i18n, language));
61
59
  useEffect(scrollToHash, []);
62
- const { t } = useTranslation();
63
- const isFinishExamPage = useIsFinishExamPage();
64
60
  return (React.createElement(I18nextProvider, { i18n: i18n },
65
- React.createElement("main", { className: classNames('e-exam e-results', { 'finish-exam-page': isFinishExamPage }), lang: subjectLanguage },
61
+ React.createElement("main", { className: "e-exam e-results", lang: subjectLanguage },
66
62
  React.createElement(React.StrictMode, null),
67
63
  examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
68
- isFinishExamPage && (React.createElement("button", { className: "k-exam-done-return js-exam-done-return", onClick: () => returnToExam() }, "Palaa kokeeseen")),
69
64
  React.createElement("div", { className: "e-columns e-columns--bottom-v e-mrg-b-4" },
70
65
  examTitle && (React.createElement(DocumentTitle, { id: "title", className: "e-column e-mrg-b-0" },
71
66
  renderChildNodes(examTitle),
72
67
  date && `, ${dateTimeFormatter.format(date)}`)),
73
- !isFinishExamPage && React.createElement(ScoresAndFinalGrade, null)),
74
- isFinishExamPage && (React.createElement("div", { className: "finish-page-instructions" },
75
- React.createElement("p", null, "N\u00E4et t\u00E4ss\u00E4 vastauksesi samanlaisina kuin kokeen arvostelijat tulevat ne n\u00E4kem\u00E4\u00E4n."),
76
- React.createElement("ul", null,
77
- React.createElement("li", null,
78
- "Tarkista, ett\u00E4 n\u00E4et alla kaikki koesuoritukset, jotka haluat j\u00E4tt\u00E4\u00E4 arvosteltavaksi.",
79
- React.createElement("br", null)),
80
- React.createElement("li", null, "Jos n\u00E4et ylim\u00E4\u00E4r\u00E4isi\u00E4 koesuorituksia, palaa kokeeseen ja poista ne.")))),
68
+ React.createElement(ScoresAndFinalGrade, null)),
81
69
  React.createElement(ErrorIndicatorForErrors, { validationErrors: validateAnswers(parseExamStructure(doc), answersByQuestionId), inExam: false }),
82
- renderChildNodes(root),
83
- isFinishExamPage && (React.createElement("div", null,
84
- React.createElement("p", { className: "k-exam-done-instructions" },
85
- "Kun olet valmis, sammuta tietokoneesi oikeasta yl\u00E4kulmasta.",
86
- React.createElement("br", null),
87
- "Kun kone on sammunut, irrota USB-muisti ja palauta se kokeen valvojalle."),
88
- React.createElement("img", { className: "k-exam-done-shutdown-image", src: "/dist/digabi-shutdown-screenshot.png", alt: t('examFinished.shutdownTooltip') }))))));
70
+ renderChildNodes(root))));
89
71
  };
90
72
  function ScoresAndFinalGrade() {
91
73
  const { gradingText, totalScore } = useContext(ResultsContext);
@@ -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,E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