@digabi/exam-engine-core 20.0.1 → 20.0.2-responsive-images.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/main-bundle.js +1 -1
  3. package/dist/renderAnnotations.d.ts.map +1 -1
  4. package/dist/renderAnnotations.js +1 -0
  5. package/dist/renderAnnotations.js.map +1 -1
  6. package/package.json +2 -2
  7. package/dist/components/AttachmentContext.d.ts +0 -14
  8. package/dist/components/AttachmentContext.d.ts.map +0 -1
  9. package/dist/components/AttachmentContext.js +0 -12
  10. package/dist/components/AttachmentContext.js.map +0 -1
  11. package/dist/components/AttachmentLink.d.ts +0 -6
  12. package/dist/components/AttachmentLink.d.ts.map +0 -1
  13. package/dist/components/AttachmentLink.js +0 -24
  14. package/dist/components/AttachmentLink.js.map +0 -1
  15. package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
  16. package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
  17. package/dist/components/AttachmentLinkAnchor.js +0 -4
  18. package/dist/components/AttachmentLinkAnchor.js.map +0 -1
  19. package/dist/components/AttachmentLinks.d.ts +0 -6
  20. package/dist/components/AttachmentLinks.d.ts.map +0 -1
  21. package/dist/components/AttachmentLinks.js +0 -58
  22. package/dist/components/AttachmentLinks.js.map +0 -1
  23. package/dist/components/Attachments.d.ts +0 -5
  24. package/dist/components/Attachments.d.ts.map +0 -1
  25. package/dist/components/Attachments.js +0 -43
  26. package/dist/components/Attachments.js.map +0 -1
  27. package/dist/components/AttachmentsAttachment.d.ts +0 -5
  28. package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
  29. package/dist/components/AttachmentsAttachment.js +0 -8
  30. package/dist/components/AttachmentsAttachment.js.map +0 -1
  31. package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
  32. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
  33. package/dist/components/AttachmentsAttachmentTitle.js +0 -12
  34. package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
  35. package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
  36. package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
  37. package/dist/components/AttachmentsExternalMaterial.js +0 -40
  38. package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
  39. package/dist/components/AttachmentsQuestion.d.ts +0 -5
  40. package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
  41. package/dist/components/AttachmentsQuestion.js +0 -16
  42. package/dist/components/AttachmentsQuestion.js.map +0 -1
  43. package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
  44. package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
  45. package/dist/components/AttachmentsQuestionTitle.js +0 -13
  46. package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
  47. package/dist/components/Audio.d.ts +0 -6
  48. package/dist/components/Audio.d.ts.map +0 -1
  49. package/dist/components/Audio.js +0 -29
  50. package/dist/components/Audio.js.map +0 -1
  51. package/dist/components/AudioGroup.d.ts +0 -6
  52. package/dist/components/AudioGroup.d.ts.map +0 -1
  53. package/dist/components/AudioGroup.js +0 -9
  54. package/dist/components/AudioGroup.js.map +0 -1
  55. package/dist/components/AudioPlaybackError.d.ts +0 -7
  56. package/dist/components/AudioPlaybackError.d.ts.map +0 -1
  57. package/dist/components/AudioPlaybackError.js +0 -12
  58. package/dist/components/AudioPlaybackError.js.map +0 -1
  59. package/dist/components/AudioTest.d.ts +0 -6
  60. package/dist/components/AudioTest.d.ts.map +0 -1
  61. package/dist/components/AudioTest.js +0 -29
  62. package/dist/components/AudioTest.js.map +0 -1
  63. package/dist/components/ChoiceAnswer.d.ts +0 -12
  64. package/dist/components/ChoiceAnswer.d.ts.map +0 -1
  65. package/dist/components/ChoiceAnswer.js +0 -60
  66. package/dist/components/ChoiceAnswer.js.map +0 -1
  67. package/dist/components/CommonExamContext.d.ts +0 -16
  68. package/dist/components/CommonExamContext.d.ts.map +0 -1
  69. package/dist/components/CommonExamContext.js +0 -22
  70. package/dist/components/CommonExamContext.js.map +0 -1
  71. package/dist/components/DropdownAnswer.d.ts +0 -12
  72. package/dist/components/DropdownAnswer.d.ts.map +0 -1
  73. package/dist/components/DropdownAnswer.js +0 -85
  74. package/dist/components/DropdownAnswer.js.map +0 -1
  75. package/dist/components/Exam.d.ts +0 -40
  76. package/dist/components/Exam.d.ts.map +0 -1
  77. package/dist/components/Exam.js +0 -106
  78. package/dist/components/Exam.js.map +0 -1
  79. package/dist/components/ExamAttachment.d.ts +0 -5
  80. package/dist/components/ExamAttachment.d.ts.map +0 -1
  81. package/dist/components/ExamAttachment.js +0 -8
  82. package/dist/components/ExamAttachment.js.map +0 -1
  83. package/dist/components/ExamContext.d.ts +0 -10
  84. package/dist/components/ExamContext.d.ts.map +0 -1
  85. package/dist/components/ExamContext.js +0 -11
  86. package/dist/components/ExamContext.js.map +0 -1
  87. package/dist/components/ExamFooter.d.ts +0 -6
  88. package/dist/components/ExamFooter.d.ts.map +0 -1
  89. package/dist/components/ExamFooter.js +0 -7
  90. package/dist/components/ExamFooter.js.map +0 -1
  91. package/dist/components/ExamInstruction.d.ts +0 -6
  92. package/dist/components/ExamInstruction.d.ts.map +0 -1
  93. package/dist/components/ExamInstruction.js +0 -6
  94. package/dist/components/ExamInstruction.js.map +0 -1
  95. package/dist/components/ExamQuestion.d.ts +0 -5
  96. package/dist/components/ExamQuestion.d.ts.map +0 -1
  97. package/dist/components/ExamQuestion.js +0 -16
  98. package/dist/components/ExamQuestion.js.map +0 -1
  99. package/dist/components/ExamQuestionInstruction.d.ts +0 -6
  100. package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
  101. package/dist/components/ExamQuestionInstruction.js +0 -6
  102. package/dist/components/ExamQuestionInstruction.js.map +0 -1
  103. package/dist/components/ExamQuestionTitle.d.ts +0 -6
  104. package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
  105. package/dist/components/ExamQuestionTitle.js +0 -25
  106. package/dist/components/ExamQuestionTitle.js.map +0 -1
  107. package/dist/components/ExamSection.d.ts +0 -5
  108. package/dist/components/ExamSection.d.ts.map +0 -1
  109. package/dist/components/ExamSection.js +0 -30
  110. package/dist/components/ExamSection.js.map +0 -1
  111. package/dist/components/ExamSectionTitle.d.ts +0 -6
  112. package/dist/components/ExamSectionTitle.d.ts.map +0 -1
  113. package/dist/components/ExamSectionTitle.js +0 -21
  114. package/dist/components/ExamSectionTitle.js.map +0 -1
  115. package/dist/components/ExternalMaterialList.d.ts +0 -10
  116. package/dist/components/ExternalMaterialList.d.ts.map +0 -1
  117. package/dist/components/ExternalMaterialList.js +0 -31
  118. package/dist/components/ExternalMaterialList.js.map +0 -1
  119. package/dist/components/File.d.ts +0 -6
  120. package/dist/components/File.d.ts.map +0 -1
  121. package/dist/components/File.js +0 -15
  122. package/dist/components/File.js.map +0 -1
  123. package/dist/components/Formula.d.ts +0 -6
  124. package/dist/components/Formula.d.ts.map +0 -1
  125. package/dist/components/Formula.js +0 -12
  126. package/dist/components/Formula.js.map +0 -1
  127. package/dist/components/Hints.d.ts +0 -6
  128. package/dist/components/Hints.d.ts.map +0 -1
  129. package/dist/components/Hints.js +0 -32
  130. package/dist/components/Hints.js.map +0 -1
  131. package/dist/components/Image.d.ts +0 -6
  132. package/dist/components/Image.d.ts.map +0 -1
  133. package/dist/components/Image.js +0 -25
  134. package/dist/components/Image.js.map +0 -1
  135. package/dist/components/ImageOverlay.d.ts +0 -6
  136. package/dist/components/ImageOverlay.d.ts.map +0 -1
  137. package/dist/components/ImageOverlay.js +0 -45
  138. package/dist/components/ImageOverlay.js.map +0 -1
  139. package/dist/components/ProgressBar.d.ts +0 -6
  140. package/dist/components/ProgressBar.d.ts.map +0 -1
  141. package/dist/components/ProgressBar.js +0 -18
  142. package/dist/components/ProgressBar.js.map +0 -1
  143. package/dist/components/QuestionContext.d.ts +0 -14
  144. package/dist/components/QuestionContext.d.ts.map +0 -1
  145. package/dist/components/QuestionContext.js +0 -20
  146. package/dist/components/QuestionContext.js.map +0 -1
  147. package/dist/components/Reference.d.ts +0 -6
  148. package/dist/components/Reference.d.ts.map +0 -1
  149. package/dist/components/Reference.js +0 -63
  150. package/dist/components/Reference.js.map +0 -1
  151. package/dist/components/References.d.ts +0 -6
  152. package/dist/components/References.d.ts.map +0 -1
  153. package/dist/components/References.js +0 -23
  154. package/dist/components/References.js.map +0 -1
  155. package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
  156. package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
  157. package/dist/components/ResponsiveMediaContainer.js +0 -20
  158. package/dist/components/ResponsiveMediaContainer.js.map +0 -1
  159. package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
  160. package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
  161. package/dist/components/RestrictedAudioPlayer.js +0 -29
  162. package/dist/components/RestrictedAudioPlayer.js.map +0 -1
  163. package/dist/components/RichTextAnswer.d.ts +0 -31
  164. package/dist/components/RichTextAnswer.d.ts.map +0 -1
  165. package/dist/components/RichTextAnswer.js +0 -70
  166. package/dist/components/RichTextAnswer.js.map +0 -1
  167. package/dist/components/SaveIndicator.d.ts +0 -5
  168. package/dist/components/SaveIndicator.d.ts.map +0 -1
  169. package/dist/components/SaveIndicator.js +0 -15
  170. package/dist/components/SaveIndicator.js.map +0 -1
  171. package/dist/components/Score.d.ts +0 -6
  172. package/dist/components/Score.d.ts.map +0 -1
  173. package/dist/components/Score.js +0 -13
  174. package/dist/components/Score.js.map +0 -1
  175. package/dist/components/Section.d.ts +0 -3
  176. package/dist/components/Section.d.ts.map +0 -1
  177. package/dist/components/Section.js +0 -7
  178. package/dist/components/Section.js.map +0 -1
  179. package/dist/components/SectionContext.d.ts +0 -13
  180. package/dist/components/SectionContext.d.ts.map +0 -1
  181. package/dist/components/SectionContext.js +0 -21
  182. package/dist/components/SectionContext.js.map +0 -1
  183. package/dist/components/SectionInstruction.d.ts +0 -6
  184. package/dist/components/SectionInstruction.d.ts.map +0 -1
  185. package/dist/components/SectionInstruction.js +0 -6
  186. package/dist/components/SectionInstruction.js.map +0 -1
  187. package/dist/components/TableOfContents.d.ts +0 -13
  188. package/dist/components/TableOfContents.d.ts.map +0 -1
  189. package/dist/components/TableOfContents.js +0 -66
  190. package/dist/components/TableOfContents.js.map +0 -1
  191. package/dist/components/TextAnswer.d.ts +0 -6
  192. package/dist/components/TextAnswer.d.ts.map +0 -1
  193. package/dist/components/TextAnswer.js +0 -16
  194. package/dist/components/TextAnswer.js.map +0 -1
  195. package/dist/components/TextAnswerInput.d.ts +0 -37
  196. package/dist/components/TextAnswerInput.d.ts.map +0 -1
  197. package/dist/components/TextAnswerInput.js +0 -145
  198. package/dist/components/TextAnswerInput.js.map +0 -1
  199. package/dist/components/Video.d.ts +0 -6
  200. package/dist/components/Video.d.ts.map +0 -1
  201. package/dist/components/Video.js +0 -15
  202. package/dist/components/Video.js.map +0 -1
  203. package/dist/components/results/AnnotationList.d.ts +0 -5
  204. package/dist/components/results/AnnotationList.d.ts.map +0 -1
  205. package/dist/components/results/AnnotationList.js +0 -40
  206. package/dist/components/results/AnnotationList.js.map +0 -1
  207. package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
  208. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
  209. package/dist/components/results/ResultsChoiceAnswer.js +0 -60
  210. package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
  211. package/dist/components/results/ResultsContext.d.ts +0 -20
  212. package/dist/components/results/ResultsContext.d.ts.map +0 -1
  213. package/dist/components/results/ResultsContext.js +0 -68
  214. package/dist/components/results/ResultsContext.js.map +0 -1
  215. package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
  216. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
  217. package/dist/components/results/ResultsDropdownAnswer.js +0 -41
  218. package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
  219. package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
  220. package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
  221. package/dist/components/results/ResultsExamQuestion.js +0 -23
  222. package/dist/components/results/ResultsExamQuestion.js.map +0 -1
  223. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
  224. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
  225. package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
  226. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
  227. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
  228. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
  229. package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
  230. package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
  231. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
  232. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
  233. package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
  234. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
  235. package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
  236. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
  237. package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
  238. package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
  239. package/dist/components/results/ResultsExamSection.d.ts +0 -5
  240. package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
  241. package/dist/components/results/ResultsExamSection.js +0 -17
  242. package/dist/components/results/ResultsExamSection.js.map +0 -1
  243. package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
  244. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
  245. package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
  246. package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
  247. package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
  248. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
  249. package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
  250. package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
  251. package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
  252. package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
  253. package/dist/components/results/ResultsTextAnswer.js +0 -51
  254. package/dist/components/results/ResultsTextAnswer.js.map +0 -1
  255. package/dist/components/results/helpers.d.ts +0 -9
  256. package/dist/components/results/helpers.d.ts.map +0 -1
  257. package/dist/components/results/helpers.js +0 -10
  258. package/dist/components/results/helpers.js.map +0 -1
  259. package/dist/components/types.d.ts +0 -110
  260. package/dist/components/types.d.ts.map +0 -1
  261. package/dist/components/types.js +0 -1
  262. package/dist/components/types.js.map +0 -1
  263. package/dist/components/withContext.d.ts +0 -3
  264. package/dist/components/withContext.d.ts.map +0 -1
  265. package/dist/components/withContext.js +0 -12
  266. package/dist/components/withContext.js.map +0 -1
@@ -1,62 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { Translation } from 'react-i18next';
4
- import { QuestionContext } from '../QuestionContext';
5
- import ResultsExamQuestionScoresContainer from './ResultsExamQuestionScoresContainer';
6
- function ResultsExamQuestionManualScore({ scores, maxScore, displayNumber }) {
7
- var _a, _b, _c, _d;
8
- const { answers } = useContext(QuestionContext);
9
- const containerProps = { answers, displayNumber };
10
- const shortCode = (_b = (_a = scores === null || scores === void 0 ? void 0 : scores.censoring) === null || _a === void 0 ? void 0 : _a.nonAnswerDetails) === null || _b === void 0 ? void 0 : _b.shortCode;
11
- return (React.createElement(ResultsExamQuestionScoresContainer, Object.assign({}, containerProps),
12
- ((_c = scores === null || scores === void 0 ? void 0 : scores.pregrading) === null || _c === void 0 ? void 0 : _c.score) == null && (!(scores === null || scores === void 0 ? void 0 : scores.censoring) || ((_d = scores === null || scores === void 0 ? void 0 : scores.censoring) === null || _d === void 0 ? void 0 : _d.scores.length) === 0) && (React.createElement(NoPregrading, { maxScore: maxScore })),
13
- scores && renderNormalizedScores(scores, maxScore),
14
- shortCode && React.createElement(NonAnswer, { shortCode: shortCode })));
15
- }
16
- function renderNormalizedScores(scores, maxScore) {
17
- const normalizedScores = [
18
- scores.inspection && normalizeInspectionScore(scores.inspection),
19
- ...(scores.censoring ? normalizeCensoringScores(scores.censoring) : []),
20
- scores.pregrading && normalizePregradingScore(scores.pregrading),
21
- ].filter(Boolean);
22
- return normalizedScores.map((score, i) => React.createElement(ScoreRow, Object.assign({ key: i }, score, { latest: i === 0, maxScore: maxScore })));
23
- }
24
- function NoPregrading({ maxScore }) {
25
- return (React.createElement(React.Fragment, null,
26
- React.createElement("span", { className: "e-result-scorecount-empty" }),
27
- maxScore && ` / ${maxScore} `,
28
- React.createElement(Translation, null, (t) => t('points'))));
29
- }
30
- function NonAnswer({ shortCode }) {
31
- return (React.createElement("div", { className: "e-color-darkgrey e-columns e-columns--center-v" },
32
- React.createElement("span", { className: "e-font-size-xxxl e-light e-mrg-r-1" }, "\u00D7"),
33
- React.createElement("span", null, shortCode)));
34
- }
35
- function ScoreRow({ score, shortCode, type, maxScore, latest }) {
36
- return (React.createElement("div", { className: latest ? 'e-color-black' : 'e-color-grey e-font-size-xs' },
37
- React.createElement(ScoreColumn, { className: classNames('e-nowrap', { 'e-font-size-m': latest }) },
38
- latest ? React.createElement("b", null, score) : score,
39
- latest && maxScore ? ` / ${maxScore}` : '',
40
- ` p.`),
41
- React.createElement(ScoreColumn, { className: "e-result-scorecount-shortcode" }, shortCode),
42
- React.createElement(ScoreColumn, { className: "e-mrg-r-0" },
43
- React.createElement(Translation, null, (t) => t(type)))));
44
- }
45
- function ScoreColumn({ className, children }) {
46
- return React.createElement("span", { className: classNames('e-mrg-r-1 e-nowrap', className) }, children);
47
- }
48
- function normalizePregradingScore({ score }) {
49
- return score !== undefined ? { score, shortCode: '', type: 'va' } : null;
50
- }
51
- function normalizeCensoringScores(score) {
52
- return score.scores.map((s, i) => ({
53
- score: s.score,
54
- shortCode: s.shortCode || '',
55
- type: `${score.scores.length - i}.s`,
56
- }));
57
- }
58
- function normalizeInspectionScore(score) {
59
- return { score: score.score, shortCode: score.shortCodes ? score.shortCodes.join(', ') : '', type: 'ta' };
60
- }
61
- export default React.memo(ResultsExamQuestionManualScore);
62
- //# sourceMappingURL=ResultsExamQuestionManualScore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionManualScore.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionManualScore.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,kCAAkC,MAAM,sCAAsC,CAAA;AAerF,SAAS,8BAA8B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAuC;;IAC9G,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,cAAc,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,CAAA;IACjD,MAAM,SAAS,eAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,gBAAgB,0CAAE,SAAS,CAAA;IAChE,OAAO,CACL,oBAAC,kCAAkC,oBAAK,cAAc;QACnD,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,0CAAE,KAAK,KAAI,IAAI,IAAI,CAAC,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA,IAAI,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,MAAM,CAAC,MAAM,MAAK,CAAC,CAAC,IAAI,CACtG,oBAAC,YAAY,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACrC;QACA,MAAM,IAAI,sBAAsB,CAAC,MAAM,EAAE,QAAQ,CAAC;QAClD,SAAS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I;KACrC,CAAC,CAAC,CAAA;AACL,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAsB;IACtD,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;AAC3G,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare function ResultsExamQuestionScoresContainer({ answers, displayNumber, children, }: {
3
- answers: Element[];
4
- displayNumber?: string;
5
- children: React.ReactNode;
6
- }): JSX.Element;
7
- declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionScoresContainer>;
8
- export default _default;
9
- //# sourceMappingURL=ResultsExamQuestionScoresContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionScoresContainer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,iBAAS,kCAAkC,CAAC,EAC1C,OAAO,EACP,aAAa,EACb,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,eAOA;;AAED,wBAA6D"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- function ResultsExamQuestionScoresContainer({ answers, displayNumber, children, }) {
3
- return (React.createElement("div", { className: "e-result-scorecount e-float-right e-mrg-b-1" },
4
- answers.length > 1 && displayNumber && React.createElement("sup", { className: "e-result-scorecount-sup e-mrg-r-1" }, displayNumber),
5
- children));
6
- }
7
- export default React.memo(ResultsExamQuestionScoresContainer);
8
- //# sourceMappingURL=ResultsExamQuestionScoresContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionScoresContainer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,SAAS,kCAAkC,CAAC,EAC1C,OAAO,EACP,aAAa,EACb,QAAQ,GAKT;IACC,OAAO,CACL,6BAAK,SAAS,EAAC,6CAA6C;QACzD,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,IAAI,6BAAK,SAAS,EAAC,mCAAmC,IAAE,aAAa,CAAO;QAC/G,QAAQ,CACL,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function ResultsExamQuestionTitle({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionTitle>;
5
- export default _default;
6
- //# sourceMappingURL=ResultsExamQuestionTitle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,iBAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAyBlF;;AAED,wBAAmD"}
@@ -1,22 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import AnsweringInstructions from '../AnsweringInstructions';
4
- import NotificationIcon from '../NotificationIcon';
5
- import { QuestionContext } from '../QuestionContext';
6
- function ResultsExamQuestionTitle({ element, renderChildNodes }) {
7
- const { displayNumber, level, maxAnswers, childQuestions } = useContext(QuestionContext);
8
- const Tag = ('h' + Math.min(3 + level, 6));
9
- return (React.createElement(React.Fragment, null,
10
- React.createElement(Tag, { className: classNames('exam-question-title', { 'e-normal e-font-size-m': level > 0 }) },
11
- React.createElement("strong", { className: classNames('exam-question-title__display-number', {
12
- 'exam-question-title__display-number--indented': level > 0,
13
- }) },
14
- displayNumber,
15
- '. '),
16
- renderChildNodes(element)),
17
- maxAnswers != null && childQuestions.length > 0 && (React.createElement("p", { className: "e-italic" },
18
- React.createElement(NotificationIcon, null),
19
- React.createElement(AnsweringInstructions, { maxAnswers: maxAnswers, childQuestions: childQuestions, type: "question" })))));
20
- }
21
- export default React.memo(ResultsExamQuestionTitle);
22
- //# sourceMappingURL=ResultsExamQuestionTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionTitle.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionTitle.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,oBAAoB,CAAA;AAGpD,SAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjF,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IACxF,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,CAAQ,CAAA;IAEjD,OAAO,CACL;QACE,oBAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,EAAE,wBAAwB,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;YACxF,gCACE,SAAS,EAAE,UAAU,CAAC,qCAAqC,EAAE;oBAC3D,+CAA+C,EAAE,KAAK,GAAG,CAAC;iBAC3D,CAAC;gBAED,aAAa;gBACb,IAAI,CACE;YACR,gBAAgB,CAAC,OAAO,CAAC,CACtB;QACL,UAAU,IAAI,IAAI,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAClD,2BAAG,SAAS,EAAC,UAAU;YACrB,oBAAC,gBAAgB,OAAG;YACpB,oBAAC,qBAAqB,IAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAC,UAAU,GAAG,CAC/F,CACL,CACA,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
- export default _default;
5
- //# sourceMappingURL=ResultsExamSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamSection.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;;AAiBjE,wBAAiE"}
@@ -1,17 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { query } from '../../dom-utils';
3
- import Section from '../Section';
4
- import { SectionContext, withSectionContext } from '../SectionContext';
5
- import { ResultsContext } from './ResultsContext';
6
- function ResultsExamSection({ element, renderChildNodes }) {
7
- const { displayNumber } = useContext(SectionContext);
8
- const { answersByQuestionId } = useContext(ResultsContext);
9
- const containsAnswers = query(element, (e) => {
10
- const maybeQuestionId = e.getAttribute('question-id');
11
- return maybeQuestionId != null && Object.prototype.hasOwnProperty.call(answersByQuestionId, maybeQuestionId);
12
- });
13
- return containsAnswers ? (React.createElement(Section, { "aria-labelledby": displayNumber + '-title' },
14
- React.createElement("div", { className: "e-results-section-wrapper" }, renderChildNodes(element)))) : null;
15
- }
16
- export default React.memo(withSectionContext(ResultsExamSection));
17
- //# sourceMappingURL=ResultsExamSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamSection.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,SAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACpD,MAAM,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC1D,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QAC3C,MAAM,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;QACrD,OAAO,eAAe,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAA;IAC9G,CAAC,CAAC,CAAA;IAEF,OAAO,eAAe,CAAC,CAAC,CAAC,CACvB,oBAAC,OAAO,uBAAkB,aAAa,GAAG,QAAQ;QAChD,6BAAK,SAAS,EAAC,2BAA2B,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAO,CACpE,CACX,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function ResultsScoredTextAnswer({ element }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ResultsScoredTextAnswer>;
5
- export default _default;
6
- //# sourceMappingURL=ResultsScoredTextAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsScoredTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsScoredTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAOzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,uBAAuB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAmB/D;;AAED,wBAAkD"}
@@ -1,22 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { getNumericAttribute } from '../../dom-utils';
3
- import { shortDisplayNumber } from '../../shortDisplayNumber';
4
- import { QuestionContext } from '../QuestionContext';
5
- import { findScore, ResultsContext } from './ResultsContext';
6
- import ResultsExamQuestionAutoScore from './ResultsExamQuestionAutoScore';
7
- import ResultsSingleLineAnswer from './ResultsSingleLineAnswer';
8
- function ResultsScoredTextAnswer({ element }) {
9
- var _a;
10
- const { answers } = useContext(QuestionContext);
11
- const { answersByQuestionId, scores } = useContext(ResultsContext);
12
- const questionId = getNumericAttribute(element, 'question-id');
13
- const maxScore = getNumericAttribute(element, 'max-score');
14
- const answer = answersByQuestionId[questionId];
15
- const value = answer && answer.value;
16
- const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
17
- const autogradingScore = (_a = findScore(scores, questionId)) === null || _a === void 0 ? void 0 : _a.autograding;
18
- return (React.createElement(ResultsSingleLineAnswer, { answers: answers, displayNumber: displayNumber, value: value },
19
- React.createElement(ResultsExamQuestionAutoScore, { score: autogradingScore === null || autogradingScore === void 0 ? void 0 : autogradingScore.score, maxScore: maxScore, displayNumber: answers.length > 1 ? displayNumber : undefined })));
20
- }
21
- export default React.memo(ResultsScoredTextAnswer);
22
- //# sourceMappingURL=ResultsScoredTextAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsScoredTextAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsScoredTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,4BAA4B,MAAM,gCAAgC,CAAA;AACzE,OAAO,uBAAuB,MAAM,2BAA2B,CAAA;AAI/D,SAAS,uBAAuB,CAAC,EAAE,OAAO,EAAsB;;IAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAClE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAE,CAAA;IAC3D,MAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAA2B,CAAA;IACxE,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAA;IACpC,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC,CAAA;IACjF,MAAM,gBAAgB,SAAG,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,0CAAE,WAAW,CAAA;IAEnE,OAAO,CACL,oBAAC,uBAAuB,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK;QACnF,oBAAC,4BAA4B,IAC3B,KAAK,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,GAC7D,CACsB,CAC3B,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Score } from '../../types/Score';
3
- declare function ResultsSingleLineAnswer({ answers, displayNumber, answerScores, value, children, }: {
4
- answers: Element[];
5
- answerScores?: Score;
6
- displayNumber: string;
7
- value: string | undefined;
8
- children: React.ReactNode;
9
- }): JSX.Element;
10
- declare const _default: React.MemoExoticComponent<typeof ResultsSingleLineAnswer>;
11
- export default _default;
12
- //# sourceMappingURL=ResultsSingleLineAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsSingleLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsSingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,iBAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,eAcA;;AAED,wBAAkD"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { getAnnotationAttributes } from './helpers';
3
- function ResultsSingleLineAnswer({ answers, displayNumber, answerScores, value, children, }) {
4
- return (React.createElement(React.Fragment, null,
5
- answers.length > 1 && React.createElement("sup", null, displayNumber),
6
- React.createElement("span", { className: "answer text-answer text-answer--single-line" },
7
- React.createElement("span", { className: "e-inline-block answer-text-container" },
8
- React.createElement("div", Object.assign({ className: "answerText e-inline-block" }, getAnnotationAttributes(answerScores)), value))),
9
- children));
10
- }
11
- export default React.memo(ResultsSingleLineAnswer);
12
- //# sourceMappingURL=ResultsSingleLineAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsSingleLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsSingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAGnD,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,YAAY,EACZ,KAAK,EACL,QAAQ,GAOT;IACC,OAAO,CACL;QACG,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,iCAAM,aAAa,CAAO;QACjD,8BAAM,SAAS,EAAC,6CAA6C;YAC3D,8BAAM,SAAS,EAAC,sCAAsC;gBACpD,2CAAK,SAAS,EAAC,2BAA2B,IAAK,uBAAuB,CAAC,YAAY,CAAC,GACjF,KAAK,CACF,CACD,CACF;QACN,QAAQ,CACR,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function ResultsTextAnswer({ element }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ResultsTextAnswer>;
5
- export default _default;
6
- //# sourceMappingURL=ResultsTextAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsTextAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAUzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAyDzD;;AAED,wBAA4C"}
@@ -1,51 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { getNumericAttribute } from '../../dom-utils';
5
- import { shortDisplayNumber } from '../../shortDisplayNumber';
6
- import AnswerToolbar from '../AnswerToolbar';
7
- import { QuestionContext } from '../QuestionContext';
8
- import { getAnnotationAttributes } from './helpers';
9
- import { findScore, ResultsContext } from './ResultsContext';
10
- import ResultsExamQuestionManualScore from './ResultsExamQuestionManualScore';
11
- import ResultsSingleLineAnswer from './ResultsSingleLineAnswer';
12
- function ResultsTextAnswer({ element }) {
13
- var _a;
14
- const { answers } = useContext(QuestionContext);
15
- const { answersByQuestionId, scores } = useContext(ResultsContext);
16
- const { t } = useTranslation();
17
- const questionId = getNumericAttribute(element, 'question-id');
18
- const maxScore = getNumericAttribute(element, 'max-score');
19
- const answer = answersByQuestionId[questionId];
20
- const value = answer && answer.value;
21
- const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
22
- const answerScores = findScore(scores, questionId);
23
- const comment = (_a = answerScores === null || answerScores === void 0 ? void 0 : answerScores.pregrading) === null || _a === void 0 ? void 0 : _a.comment;
24
- const type = (element.getAttribute('type') || 'single-line');
25
- switch (type) {
26
- case 'rich-text':
27
- case 'multi-line': {
28
- const props = {
29
- ...getAnnotationAttributes(answerScores),
30
- className: classNames('answerText', { 'e-pre-wrap': type === 'multi-line' }),
31
- };
32
- return (React.createElement(React.Fragment, null,
33
- React.createElement(ResultsExamQuestionManualScore, { scores: answerScores, maxScore: maxScore }),
34
- React.createElement("div", { className: "answer e-multiline-results-text-answer" },
35
- React.createElement("div", { className: "answer-text-container" }, type === 'rich-text' ? (React.createElement("div", Object.assign({}, props, { dangerouslySetInnerHTML: { __html: value } }))) : (React.createElement("div", Object.assign({}, props), value)))),
36
- React.createElement(AnswerToolbar, Object.assign({}, {
37
- answer,
38
- element,
39
- })),
40
- comment && (React.createElement(React.Fragment, null,
41
- React.createElement("h5", null, t('comment')),
42
- React.createElement("p", { className: "e-italic" }, comment)))));
43
- }
44
- case 'single-line':
45
- default:
46
- return (React.createElement(ResultsSingleLineAnswer, Object.assign({}, { answers, answerScores, displayNumber, value }),
47
- React.createElement(ResultsExamQuestionManualScore, Object.assign({}, { scores: answerScores, maxScore, displayNumber: answers.length > 1 ? displayNumber : undefined }))));
48
- }
49
- }
50
- export default React.memo(ResultsTextAnswer);
51
- //# sourceMappingURL=ResultsTextAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsTextAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,8BAA8B,MAAM,kCA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Q,GAAI;gBAC5E,6BAAK,SAAS,EAAC,wCAAwC;oBACrD,6BAAK,SAAS,EAAC,uBAAuB,IACnC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CACtB,6CAAS,KAAK,IAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAM,EAAE,IAAI,CAChE,CAAC,CAAC,CAAC,CACF,6CAAS,KAAK,GAAG,KAAK,CAAO,CAC9B,CACG,CACF;gBACN,oBAAC,aAAa,oBACR;oBACF,MAAM;oBACN,OAAO;iBACR,EACD;gBACD,OAAO,IAAI,CACV;oBACE,gCAAK,CAAC,CAAC,SAAS,CAAC,CAAM;oBACvB,2BAAG,SAAS,EAAC,UAAU,IAAE,OAAO,CAAK,CACpC,CACJ,CACA,CACJ,CAAA;SACF;QACD,KAAK,aAAa,CAAC;QACnB;YACE,OAAO,CACL,oBAAC,uBAAuB,oBAAK,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,EAAE;gBAC1E,oBAAC,8BAA8B,oBACzB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,EACrG,CACsB,CAC3B,CAAA;KACJ;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Score } from '../../types/Score';
2
- export declare const getAnnotationAttributes: (answer?: Score | undefined) => {
3
- 'data-pregrading-annotations': string;
4
- 'data-censoring-annotations': string;
5
- } | {
6
- 'data-pregrading-annotations'?: undefined;
7
- 'data-censoring-annotations'?: undefined;
8
- };
9
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/results/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,eAAO,MAAM,uBAAuB;;;;;;CAM5B,CAAA"}
@@ -1,10 +0,0 @@
1
- export const getAnnotationAttributes = (answer) => {
2
- var _a, _b, _c, _d;
3
- return answer
4
- ? {
5
- 'data-pregrading-annotations': JSON.stringify((_b = (_a = answer === null || answer === void 0 ? void 0 : answer.pregrading) === null || _a === void 0 ? void 0 : _a.annotations) !== null && _b !== void 0 ? _b : []),
6
- 'data-censoring-annotations': JSON.stringify((_d = (_c = answer === null || answer === void 0 ? void 0 : answer.censoring) === null || _c === void 0 ? void 0 : _c.annotations) !== null && _d !== void 0 ? _d : []),
7
- }
8
- : {};
9
- };
10
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/results/helpers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAc,EAAE,EAAE;;IACxD,OAAA,MAAM;QACJ,CAAC,CAAC;YACE,6BAA6B,EAAE,IAAI,CAAC,SAAS,aAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,CAAC;YACpF,4BAA4B,EAAE,IAAI,CAAC,SAAS,aAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC;SACnF;QACH,CAAC,CAAC,EAAE,CAAA;CAAA,CAAA"}
@@ -1,110 +0,0 @@
1
- import { RenderChildNodes } from '../createRenderChildNodes';
2
- import { Translations } from '../i18n/fi-FI';
3
- export declare type QuestionId = number;
4
- interface AnswerCommon {
5
- questionId: QuestionId;
6
- value: string;
7
- /** This field is undefined in older exams that were packaged before this change. */
8
- displayNumber?: string;
9
- }
10
- export interface TextAnswer extends AnswerCommon {
11
- type: 'text';
12
- characterCount: number;
13
- }
14
- export interface RichTextAnswer extends AnswerCommon {
15
- type: 'richText';
16
- characterCount: number;
17
- }
18
- export interface ChoiceAnswer extends AnswerCommon {
19
- type: 'choice';
20
- }
21
- export declare type ExamAnswer = TextAnswer | RichTextAnswer | ChoiceAnswer;
22
- export declare type SaveState = 'initial' | 'saving' | 'saved';
23
- export interface Annotation {
24
- startIndex: number;
25
- length: number;
26
- message: string;
27
- }
28
- export interface AnswerScore {
29
- questionId: number;
30
- scoreValue: number;
31
- comment?: string;
32
- annotations: Annotation[];
33
- }
34
- /**
35
- * CAS status is a state machine with three states.
36
- *
37
- * ```
38
- * +---------+ +--------+ +-------+
39
- * |forbidden| <---> |allowing| ---> |allowed|
40
- * +---------+ +--------+ +-------+
41
- * ```
42
- *
43
- * When the user clicks the "Palauta A-osa" button, we start a 60s countdown
44
- * and transition the state from `'forbidden'` to `'allowing'`. When the timer reaches
45
- * zero, we transition the state from from `'allowing'` to `'allowed'`. Cancelling
46
- * the countdown transitions the state back from `'allowing'` to `'forbidden'`.
47
- */
48
- export declare type CasStatus = InitialCasStatus | 'allowing';
49
- export declare type InitialCasStatus = 'allowed' | 'forbidden';
50
- export declare type RestrictedAudioId = number;
51
- export declare type AudioPlaybackError =
52
- /** The user has already accessed this restricted audio */
53
- 'already-accessed'
54
- /** There already is an audio file playing */
55
- | 'already-playing'
56
- /** Other error, e.g. a network issue */
57
- | 'other-error';
58
- export declare type AudioPlaybackResponse = 'ok' | AudioPlaybackError;
59
- export interface RestrictedAudioPlaybackStats {
60
- /** An unique identifier for each restricted audio element */
61
- restrictedAudioId: RestrictedAudioId;
62
- /** Number of times it has been listened to. */
63
- times: number;
64
- }
65
- export interface ExamComponentProps {
66
- className?: string;
67
- /** An element in the exam XML. */
68
- element: Element;
69
- /** A function that knows how to render the child nodes of this element. */
70
- renderChildNodes: RenderChildNodes;
71
- }
72
- export interface ExamServerAPI {
73
- /**
74
- * Setting CAS status to allowed will lock the answers for each section where
75
- * the use of CAS software is forbidden.
76
- *
77
- * All state transitions are not legal (for example, you may not disable CAS
78
- * software after they have been allowed), so the function returns the CAS
79
- * status that the server decided upon.
80
- */
81
- setCasStatus: (casStatus: CasStatus) => Promise<CasStatus>;
82
- /** Retrieve the latest answer for each question */
83
- getAnswers: () => Promise<ExamAnswer[]>;
84
- /** Save a new answer to the server */
85
- saveAnswer: (answer: ExamAnswer) => Promise<void>;
86
- /**
87
- * Play a non-restricted audio file. Right now, this is only used by the
88
- * audio test. The Promise should be resolved with `'ok'` when playback starts
89
- * or with an error response if an error occurs.
90
- */
91
- playAudio: (src: string) => Promise<AudioPlaybackResponse>;
92
- /**
93
- * Play a restricted audio file. The promise should be resolved with `'ok'`
94
- * when the playback starts or with an error response if an error occurs.
95
- *
96
- * @param restrictedAudioId A number that uniquely identifies each restricted audio element.
97
- * @param playbackTimes How many times this audio has been listened to already.
98
- */
99
- playRestrictedAudio: (src: string, restrictedAudioId: number, playbackTimes: number) => Promise<AudioPlaybackResponse>;
100
- /** Select another answer version from answer history. Return undefined to cancel. Optional feature. */
101
- selectAnswerVersion?: (questionId: QuestionId, questionTitle: string) => Promise<ExamAnswer | undefined>;
102
- /** Save screenshot to server. Should return the URL to the saved screenshot. */
103
- saveScreenshot: (questionId: QuestionId, screenshot: Blob) => Promise<string>;
104
- }
105
- export interface AnswerError {
106
- key: keyof Translations['answer-errors'];
107
- options?: object;
108
- }
109
- export {};
110
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,oBAAY,UAAU,GAAG,MAAM,CAAA;AAE/B,UAAU,YAAY;IACpB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AACD,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,IAAI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BAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAA;IAC1D,mDAAmD;IACnD,UAAU,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACvC,sCAAsC;IACtC,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD;;;;OAIG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC1D;;;;;;OAMG;IACH,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACtH,uGAAuG;IACvG,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IACxG,gFAAgF;IAChF,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC9E;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,YAAY,CAAC,eAAe,CAAC,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const withContext: <T, P>(Context: React.Context<T>, parse: (p: P) => T) => (Component: React.ComponentType<P>) => React.ComponentType<P>;
3
- //# sourceMappingURL=withContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withContext.d.ts","sourceRoot":"","sources":["../../src/components/withContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,WAAW,wHAavB,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { getDisplayName } from '../getDisplayName';
3
- export const withContext = (Context, parse) => (Component) => {
4
- const Wrapped = (props) => {
5
- const ctx = parse(props);
6
- return (React.createElement(Context.Provider, { value: ctx },
7
- React.createElement(Component, Object.assign({}, props))));
8
- };
9
- Wrapped.displayName = 'WithContext(' + getDisplayName(Component) + ')';
10
- return Wrapped;
11
- };
12
- //# sourceMappingURL=withContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withContext.js","sourceRoot":"","sources":["../../src/components/withContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAO,OAAyB,EAAE,KAAkB,EAAE,EAAE,CAAC,CAClF,SAAiC,EACT,EAAE;IAC1B,MAAM,OAAO,GAAG,CAAC,KAAQ,EAAE,EAAE;QAC3B,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;QACxB,OAAO,CACL,oBAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG;YAC1B,oBAAC,SAAS,oBAAK,KAAK,EAAI,CACP,CACpB,CAAA;IACH,CAAC,CAAA;IACD,OAAO,CAAC,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,GAAG,CAAA;IACtE,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}