@digabi/exam-engine-core 19.15.5 → 19.15.6-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. package/dist/__tests__/examServerApi.js +1 -1
  2. package/dist/__tests__/examServerApi.js.map +1 -1
  3. package/dist/__tests__/testExamRendering.js +2 -1
  4. package/dist/__tests__/testExamRendering.js.map +1 -1
  5. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  6. package/dist/components/exam/Exam.d.ts.map +1 -1
  7. package/dist/components/exam/Exam.js +7 -6
  8. package/dist/components/exam/Exam.js.map +1 -1
  9. package/dist/components/exam/ExamineExam.d.ts +5 -0
  10. package/dist/components/exam/ExamineExam.d.ts.map +1 -0
  11. package/dist/components/exam/ExamineExam.js +25 -0
  12. package/dist/components/exam/ExamineExam.js.map +1 -0
  13. package/dist/components/results/DropdownAnswer.js +5 -5
  14. package/dist/components/results/DropdownAnswer.js.map +1 -1
  15. package/dist/components/results/EndExamSession.d.ts +5 -0
  16. package/dist/components/results/EndExamSession.d.ts.map +1 -0
  17. package/dist/components/results/EndExamSession.js +43 -0
  18. package/dist/components/results/EndExamSession.js.map +1 -0
  19. package/dist/components/results/MultiLineAnswer.js +1 -1
  20. package/dist/components/results/MultiLineAnswer.js.map +1 -1
  21. package/dist/components/results/Question.js +1 -1
  22. package/dist/components/results/Question.js.map +1 -1
  23. package/dist/components/results/QuestionTitle.js +3 -3
  24. package/dist/components/results/QuestionTitle.js.map +1 -1
  25. package/dist/components/results/Results.d.ts +1 -0
  26. package/dist/components/results/Results.d.ts.map +1 -1
  27. package/dist/components/results/Results.js +19 -22
  28. package/dist/components/results/Results.js.map +1 -1
  29. package/dist/components/results/SingleLineAnswer.js +1 -1
  30. package/dist/components/results/SingleLineAnswer.js.map +1 -1
  31. package/dist/components/results/internal/QuestionScoresContainer.js +3 -3
  32. package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
  33. package/dist/components/results/isExamExaminePageHook.d.ts +2 -0
  34. package/dist/components/results/isExamExaminePageHook.d.ts.map +1 -0
  35. package/dist/components/results/{isExamFinishPageHook.js → isExamExaminePageHook.js} +2 -2
  36. package/dist/components/results/isExamExaminePageHook.js.map +1 -0
  37. package/dist/i18n/fi-FI.d.ts +10 -5
  38. package/dist/i18n/fi-FI.d.ts.map +1 -1
  39. package/dist/i18n/fi-FI.js +10 -5
  40. package/dist/i18n/fi-FI.js.map +1 -1
  41. package/dist/i18n/sv-FI.d.ts.map +1 -1
  42. package/dist/i18n/sv-FI.js +10 -5
  43. package/dist/i18n/sv-FI.js.map +1 -1
  44. package/dist/main-bundle.js +1 -1
  45. package/dist/main.css +1 -1
  46. package/dist/types/ExamServerAPI.d.ts +2 -1
  47. package/dist/types/ExamServerAPI.d.ts.map +1 -1
  48. package/package.json +2 -2
  49. package/dist/components/AttachmentContext.d.ts +0 -14
  50. package/dist/components/AttachmentContext.d.ts.map +0 -1
  51. package/dist/components/AttachmentContext.js +0 -12
  52. package/dist/components/AttachmentContext.js.map +0 -1
  53. package/dist/components/AttachmentLink.d.ts +0 -6
  54. package/dist/components/AttachmentLink.d.ts.map +0 -1
  55. package/dist/components/AttachmentLink.js +0 -24
  56. package/dist/components/AttachmentLink.js.map +0 -1
  57. package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
  58. package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
  59. package/dist/components/AttachmentLinkAnchor.js +0 -4
  60. package/dist/components/AttachmentLinkAnchor.js.map +0 -1
  61. package/dist/components/AttachmentLinks.d.ts +0 -6
  62. package/dist/components/AttachmentLinks.d.ts.map +0 -1
  63. package/dist/components/AttachmentLinks.js +0 -58
  64. package/dist/components/AttachmentLinks.js.map +0 -1
  65. package/dist/components/Attachments.d.ts +0 -5
  66. package/dist/components/Attachments.d.ts.map +0 -1
  67. package/dist/components/Attachments.js +0 -43
  68. package/dist/components/Attachments.js.map +0 -1
  69. package/dist/components/AttachmentsAttachment.d.ts +0 -5
  70. package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
  71. package/dist/components/AttachmentsAttachment.js +0 -8
  72. package/dist/components/AttachmentsAttachment.js.map +0 -1
  73. package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
  74. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
  75. package/dist/components/AttachmentsAttachmentTitle.js +0 -12
  76. package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
  77. package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
  78. package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
  79. package/dist/components/AttachmentsExternalMaterial.js +0 -40
  80. package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
  81. package/dist/components/AttachmentsQuestion.d.ts +0 -5
  82. package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
  83. package/dist/components/AttachmentsQuestion.js +0 -16
  84. package/dist/components/AttachmentsQuestion.js.map +0 -1
  85. package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
  86. package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
  87. package/dist/components/AttachmentsQuestionTitle.js +0 -13
  88. package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
  89. package/dist/components/Audio.d.ts +0 -6
  90. package/dist/components/Audio.d.ts.map +0 -1
  91. package/dist/components/Audio.js +0 -29
  92. package/dist/components/Audio.js.map +0 -1
  93. package/dist/components/AudioGroup.d.ts +0 -6
  94. package/dist/components/AudioGroup.d.ts.map +0 -1
  95. package/dist/components/AudioGroup.js +0 -9
  96. package/dist/components/AudioGroup.js.map +0 -1
  97. package/dist/components/AudioPlaybackError.d.ts +0 -7
  98. package/dist/components/AudioPlaybackError.d.ts.map +0 -1
  99. package/dist/components/AudioPlaybackError.js +0 -12
  100. package/dist/components/AudioPlaybackError.js.map +0 -1
  101. package/dist/components/AudioTest.d.ts +0 -6
  102. package/dist/components/AudioTest.d.ts.map +0 -1
  103. package/dist/components/AudioTest.js +0 -29
  104. package/dist/components/AudioTest.js.map +0 -1
  105. package/dist/components/ChoiceAnswer.d.ts +0 -12
  106. package/dist/components/ChoiceAnswer.d.ts.map +0 -1
  107. package/dist/components/ChoiceAnswer.js +0 -60
  108. package/dist/components/ChoiceAnswer.js.map +0 -1
  109. package/dist/components/CommonExamContext.d.ts +0 -16
  110. package/dist/components/CommonExamContext.d.ts.map +0 -1
  111. package/dist/components/CommonExamContext.js +0 -22
  112. package/dist/components/CommonExamContext.js.map +0 -1
  113. package/dist/components/DropdownAnswer.d.ts +0 -12
  114. package/dist/components/DropdownAnswer.d.ts.map +0 -1
  115. package/dist/components/DropdownAnswer.js +0 -85
  116. package/dist/components/DropdownAnswer.js.map +0 -1
  117. package/dist/components/Exam.d.ts +0 -40
  118. package/dist/components/Exam.d.ts.map +0 -1
  119. package/dist/components/Exam.js +0 -106
  120. package/dist/components/Exam.js.map +0 -1
  121. package/dist/components/ExamAttachment.d.ts +0 -5
  122. package/dist/components/ExamAttachment.d.ts.map +0 -1
  123. package/dist/components/ExamAttachment.js +0 -8
  124. package/dist/components/ExamAttachment.js.map +0 -1
  125. package/dist/components/ExamContext.d.ts +0 -10
  126. package/dist/components/ExamContext.d.ts.map +0 -1
  127. package/dist/components/ExamContext.js +0 -11
  128. package/dist/components/ExamContext.js.map +0 -1
  129. package/dist/components/ExamFooter.d.ts +0 -6
  130. package/dist/components/ExamFooter.d.ts.map +0 -1
  131. package/dist/components/ExamFooter.js +0 -7
  132. package/dist/components/ExamFooter.js.map +0 -1
  133. package/dist/components/ExamInstruction.d.ts +0 -6
  134. package/dist/components/ExamInstruction.d.ts.map +0 -1
  135. package/dist/components/ExamInstruction.js +0 -6
  136. package/dist/components/ExamInstruction.js.map +0 -1
  137. package/dist/components/ExamQuestion.d.ts +0 -5
  138. package/dist/components/ExamQuestion.d.ts.map +0 -1
  139. package/dist/components/ExamQuestion.js +0 -16
  140. package/dist/components/ExamQuestion.js.map +0 -1
  141. package/dist/components/ExamQuestionInstruction.d.ts +0 -6
  142. package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
  143. package/dist/components/ExamQuestionInstruction.js +0 -6
  144. package/dist/components/ExamQuestionInstruction.js.map +0 -1
  145. package/dist/components/ExamQuestionTitle.d.ts +0 -6
  146. package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
  147. package/dist/components/ExamQuestionTitle.js +0 -25
  148. package/dist/components/ExamQuestionTitle.js.map +0 -1
  149. package/dist/components/ExamSection.d.ts +0 -5
  150. package/dist/components/ExamSection.d.ts.map +0 -1
  151. package/dist/components/ExamSection.js +0 -30
  152. package/dist/components/ExamSection.js.map +0 -1
  153. package/dist/components/ExamSectionTitle.d.ts +0 -6
  154. package/dist/components/ExamSectionTitle.d.ts.map +0 -1
  155. package/dist/components/ExamSectionTitle.js +0 -21
  156. package/dist/components/ExamSectionTitle.js.map +0 -1
  157. package/dist/components/ExternalMaterialList.d.ts +0 -10
  158. package/dist/components/ExternalMaterialList.d.ts.map +0 -1
  159. package/dist/components/ExternalMaterialList.js +0 -31
  160. package/dist/components/ExternalMaterialList.js.map +0 -1
  161. package/dist/components/File.d.ts +0 -6
  162. package/dist/components/File.d.ts.map +0 -1
  163. package/dist/components/File.js +0 -15
  164. package/dist/components/File.js.map +0 -1
  165. package/dist/components/Formula.d.ts +0 -6
  166. package/dist/components/Formula.d.ts.map +0 -1
  167. package/dist/components/Formula.js +0 -12
  168. package/dist/components/Formula.js.map +0 -1
  169. package/dist/components/Hints.d.ts +0 -6
  170. package/dist/components/Hints.d.ts.map +0 -1
  171. package/dist/components/Hints.js +0 -32
  172. package/dist/components/Hints.js.map +0 -1
  173. package/dist/components/Image.d.ts +0 -6
  174. package/dist/components/Image.d.ts.map +0 -1
  175. package/dist/components/Image.js +0 -25
  176. package/dist/components/Image.js.map +0 -1
  177. package/dist/components/ImageOverlay.d.ts +0 -6
  178. package/dist/components/ImageOverlay.d.ts.map +0 -1
  179. package/dist/components/ImageOverlay.js +0 -45
  180. package/dist/components/ImageOverlay.js.map +0 -1
  181. package/dist/components/ProgressBar.d.ts +0 -6
  182. package/dist/components/ProgressBar.d.ts.map +0 -1
  183. package/dist/components/ProgressBar.js +0 -18
  184. package/dist/components/ProgressBar.js.map +0 -1
  185. package/dist/components/QuestionContext.d.ts +0 -14
  186. package/dist/components/QuestionContext.d.ts.map +0 -1
  187. package/dist/components/QuestionContext.js +0 -20
  188. package/dist/components/QuestionContext.js.map +0 -1
  189. package/dist/components/Reference.d.ts +0 -6
  190. package/dist/components/Reference.d.ts.map +0 -1
  191. package/dist/components/Reference.js +0 -63
  192. package/dist/components/Reference.js.map +0 -1
  193. package/dist/components/References.d.ts +0 -6
  194. package/dist/components/References.d.ts.map +0 -1
  195. package/dist/components/References.js +0 -23
  196. package/dist/components/References.js.map +0 -1
  197. package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
  198. package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
  199. package/dist/components/ResponsiveMediaContainer.js +0 -20
  200. package/dist/components/ResponsiveMediaContainer.js.map +0 -1
  201. package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
  202. package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
  203. package/dist/components/RestrictedAudioPlayer.js +0 -29
  204. package/dist/components/RestrictedAudioPlayer.js.map +0 -1
  205. package/dist/components/RichTextAnswer.d.ts +0 -31
  206. package/dist/components/RichTextAnswer.d.ts.map +0 -1
  207. package/dist/components/RichTextAnswer.js +0 -70
  208. package/dist/components/RichTextAnswer.js.map +0 -1
  209. package/dist/components/SaveIndicator.d.ts +0 -5
  210. package/dist/components/SaveIndicator.d.ts.map +0 -1
  211. package/dist/components/SaveIndicator.js +0 -15
  212. package/dist/components/SaveIndicator.js.map +0 -1
  213. package/dist/components/Score.d.ts +0 -6
  214. package/dist/components/Score.d.ts.map +0 -1
  215. package/dist/components/Score.js +0 -13
  216. package/dist/components/Score.js.map +0 -1
  217. package/dist/components/Section.d.ts +0 -3
  218. package/dist/components/Section.d.ts.map +0 -1
  219. package/dist/components/Section.js +0 -7
  220. package/dist/components/Section.js.map +0 -1
  221. package/dist/components/SectionContext.d.ts +0 -13
  222. package/dist/components/SectionContext.d.ts.map +0 -1
  223. package/dist/components/SectionContext.js +0 -21
  224. package/dist/components/SectionContext.js.map +0 -1
  225. package/dist/components/SectionInstruction.d.ts +0 -6
  226. package/dist/components/SectionInstruction.d.ts.map +0 -1
  227. package/dist/components/SectionInstruction.js +0 -6
  228. package/dist/components/SectionInstruction.js.map +0 -1
  229. package/dist/components/TableOfContents.d.ts +0 -13
  230. package/dist/components/TableOfContents.d.ts.map +0 -1
  231. package/dist/components/TableOfContents.js +0 -66
  232. package/dist/components/TableOfContents.js.map +0 -1
  233. package/dist/components/TextAnswer.d.ts +0 -6
  234. package/dist/components/TextAnswer.d.ts.map +0 -1
  235. package/dist/components/TextAnswer.js +0 -16
  236. package/dist/components/TextAnswer.js.map +0 -1
  237. package/dist/components/TextAnswerInput.d.ts +0 -37
  238. package/dist/components/TextAnswerInput.d.ts.map +0 -1
  239. package/dist/components/TextAnswerInput.js +0 -145
  240. package/dist/components/TextAnswerInput.js.map +0 -1
  241. package/dist/components/Video.d.ts +0 -6
  242. package/dist/components/Video.d.ts.map +0 -1
  243. package/dist/components/Video.js +0 -15
  244. package/dist/components/Video.js.map +0 -1
  245. package/dist/components/exam/FinishExam.d.ts +0 -5
  246. package/dist/components/exam/FinishExam.d.ts.map +0 -1
  247. package/dist/components/exam/FinishExam.js +0 -17
  248. package/dist/components/exam/FinishExam.js.map +0 -1
  249. package/dist/components/results/AnnotationList.d.ts +0 -5
  250. package/dist/components/results/AnnotationList.d.ts.map +0 -1
  251. package/dist/components/results/AnnotationList.js +0 -40
  252. package/dist/components/results/AnnotationList.js.map +0 -1
  253. package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
  254. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
  255. package/dist/components/results/ResultsChoiceAnswer.js +0 -60
  256. package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
  257. package/dist/components/results/ResultsContext.d.ts +0 -20
  258. package/dist/components/results/ResultsContext.d.ts.map +0 -1
  259. package/dist/components/results/ResultsContext.js +0 -68
  260. package/dist/components/results/ResultsContext.js.map +0 -1
  261. package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
  262. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
  263. package/dist/components/results/ResultsDropdownAnswer.js +0 -41
  264. package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
  265. package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
  266. package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
  267. package/dist/components/results/ResultsExamQuestion.js +0 -23
  268. package/dist/components/results/ResultsExamQuestion.js.map +0 -1
  269. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
  270. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
  271. package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
  272. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
  273. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
  274. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
  275. package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
  276. package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
  277. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
  278. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
  279. package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
  280. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
  281. package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
  282. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
  283. package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
  284. package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
  285. package/dist/components/results/ResultsExamSection.d.ts +0 -5
  286. package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
  287. package/dist/components/results/ResultsExamSection.js +0 -17
  288. package/dist/components/results/ResultsExamSection.js.map +0 -1
  289. package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
  290. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
  291. package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
  292. package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
  293. package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
  294. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
  295. package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
  296. package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
  297. package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
  298. package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
  299. package/dist/components/results/ResultsTextAnswer.js +0 -51
  300. package/dist/components/results/ResultsTextAnswer.js.map +0 -1
  301. package/dist/components/results/helpers.d.ts +0 -9
  302. package/dist/components/results/helpers.d.ts.map +0 -1
  303. package/dist/components/results/helpers.js +0 -10
  304. package/dist/components/results/helpers.js.map +0 -1
  305. package/dist/components/results/isExamFinishPageHook.d.ts +0 -2
  306. package/dist/components/results/isExamFinishPageHook.d.ts.map +0 -1
  307. package/dist/components/results/isExamFinishPageHook.js.map +0 -1
  308. package/dist/components/types.d.ts +0 -110
  309. package/dist/components/types.d.ts.map +0 -1
  310. package/dist/components/types.js +0 -1
  311. package/dist/components/types.js.map +0 -1
  312. package/dist/components/withContext.d.ts +0 -3
  313. package/dist/components/withContext.d.ts.map +0 -1
  314. package/dist/components/withContext.js +0 -12
  315. package/dist/components/withContext.js.map +0 -1
@@ -1,17 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { useExamTranslation } from '../../i18n';
3
- import { ExamContext } from '../context/ExamContext';
4
- function FinishExam() {
5
- const { examServerApi } = useContext(ExamContext);
6
- const { finishExam } = examServerApi;
7
- const { t } = useExamTranslation();
8
- const goToInspectAnswers = () => {
9
- finishExam();
10
- window.scrollTo(0, 0);
11
- };
12
- return (React.createElement("div", { className: "e-finish-exam" },
13
- React.createElement("button", { id: "finishExam", onClick: goToInspectAnswers, "aria-describedby": "finishExamInstructions" }, t('finish-exam.finish')),
14
- React.createElement("div", { className: "e-finish-exam-instructions", id: "finishExamInstructions" }, t('finish-exam.instructions'))));
15
- }
16
- export default React.memo(FinishExam);
17
- //# sourceMappingURL=FinishExam.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FinishExam.js","sourceRoot":"","sources":["../../../src/components/exam/FinishExam.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,SAAS,UAAU;IACjB,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,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,UAAU,EAAE,CAAA;QACZ,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,eAAe;QAC5B,gCAAQ,EAAE,EAAC,YAAY,EAAC,OAAO,EAAE,kBAAkB,sBAAmB,wBAAwB,IAC3F,CAAC,CAAC,oBAAoB,CAAC,CACjB;QACT,6BAAK,SAAS,EAAC,4BAA4B,EAAC,EAAE,EAAC,wBAAwB,IACpE,CAAC,CAAC,0BAA0B,CAAC,CAC1B,CACF,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- declare function ResultsAnnotationList(): JSX.Element | null;
3
- declare const _default: React.MemoExoticComponent<typeof ResultsAnnotationList>;
4
- export default _default;
5
- //# sourceMappingURL=AnnotationList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationList.d.ts","sourceRoot":"","sources":["../../../src/components/results/AnnotationList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AA0CzC,iBAAS,qBAAqB,uBAoD7B;;AAED,wBAAgD"}
@@ -1,40 +0,0 @@
1
- import * as _ from 'lodash-es';
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 { mapMaybe } from '../../utils';
7
- import { QuestionContext } from '../QuestionContext';
8
- import { findScore, ResultsContext } from './ResultsContext';
9
- const hasAnnotations = (score) => { var _a, _b, _c, _d; return Boolean(((_b = (_a = score === null || score === void 0 ? void 0 : score.pregrading) === null || _a === void 0 ? void 0 : _a.annotations) === null || _b === void 0 ? void 0 : _b.length) || ((_d = (_c = score === null || score === void 0 ? void 0 : score.censoring) === null || _c === void 0 ? void 0 : _c.annotations) === null || _d === void 0 ? void 0 : _d.length)); };
10
- const getPrefix = (answers, answer) => answers.length > 1 ? shortDisplayNumber(answer.getAttribute('display-number')) : '';
11
- const AnnotationListComponent = ({ i18nTitleKey, annotations }) => {
12
- const { t } = useTranslation();
13
- return annotations ? (React.createElement(React.Fragment, null,
14
- i18nTitleKey && React.createElement("h5", null, t(i18nTitleKey)),
15
- React.createElement("ol", { className: "e-list-data e-pad-l-0 e-font-size-s" }, annotations.map(({ numbering, message }) => (React.createElement("li", { "data-list-number": numbering, key: numbering }, message)))))) : null;
16
- };
17
- function ResultsAnnotationList() {
18
- const { answers } = useContext(QuestionContext);
19
- const { scores, singleGrading } = useContext(ResultsContext);
20
- const answersAndScores = mapMaybe(answers, (answer) => {
21
- const questionId = getNumericAttribute(answer, 'question-id');
22
- const score = findScore(scores, questionId);
23
- return score && answer && hasAnnotations(score) ? [answer, score] : undefined;
24
- });
25
- const getListOfAnnotations = (answerElementAndScores, annotationsFrom, listNumberOffset = 0) => _.flatMap(answerElementAndScores, ([answer, score]) => { var _a, _b, _c; return (_c = (_b = (_a = score[annotationsFrom]) === null || _a === void 0 ? void 0 : _a.annotations) === null || _b === void 0 ? void 0 : _b.filter((a) => a.message.length).map((annotation, i) => {
26
- const numbering = getPrefix(answers, answer) + String(listNumberOffset + i + 1) + ')';
27
- const message = annotation.message;
28
- return { numbering, message };
29
- })) !== null && _c !== void 0 ? _c : []; });
30
- const pregradingAnnotations = getListOfAnnotations(answersAndScores, 'pregrading');
31
- const censoringAnnotations = getListOfAnnotations(answersAndScores, 'censoring', pregradingAnnotations.length);
32
- return pregradingAnnotations.length || censoringAnnotations.length ? (React.createElement("div", { className: "e-annotation-list e-columns e-mrg-t-2" }, singleGrading ? (React.createElement("div", { className: "e-column e-column--10" },
33
- React.createElement(AnnotationListComponent, { annotations: pregradingAnnotations }))) : (React.createElement(React.Fragment, null,
34
- React.createElement("div", { className: "e-column e-column--6" },
35
- React.createElement(AnnotationListComponent, { i18nTitleKey: 'grading.pregrading-annotations', annotations: pregradingAnnotations })),
36
- React.createElement("div", { className: "e-column e-column--6" },
37
- React.createElement(AnnotationListComponent, { i18nTitleKey: 'grading.censor-annotations', annotations: censoringAnnotations })))))) : null;
38
- }
39
- export default React.memo(ResultsAnnotationList);
40
- //# sourceMappingURL=AnnotationList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotationList.js","sourceRoot":"","sources":["../../../src/components/results/AnnotationList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,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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AgB,EAAE,WAAW,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAE9G,OAAO,qBAAqB,CAAC,MAAM,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CACnE,6BAAK,SAAS,EAAC,uCAAuC,IACnD,aAAa,CAAC,CAAC,CAAC,CACf,6BAAK,SAAS,EAAC,uBAAuB;QACpC,oBAAC,uBAAuB,IAAC,WAAW,EAAE,qBAAqB,GAAI,CAC3D,CACP,CAAC,CAAC,CAAC,CACF;QACE,6BAAK,SAAS,EAAC,sBAAsB;YACnC,oBAAC,uBAAuB,IACtB,YAAY,EAAE,gCAAgC,EAC9C,WAAW,EAAE,qBAAqB,GAClC,CACE;QACN,6BAAK,SAAS,EAAC,sBAAsB;YACnC,oBAAC,uBAAuB,IAAC,YAAY,EAAE,4BAA4B,EAAE,WAAW,EAAE,oBAAoB,GAAI,CACtG,CACL,CACJ,CACG,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function ResultsChoiceAnswer({ element }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ResultsChoiceAnswer>;
5
- export default _default;
6
- //# sourceMappingURL=ResultsChoiceAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsChoiceAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsChoiceAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAA0B,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAmEzF,iBAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAyC3D;;AAED,wBAA8C"}
@@ -1,60 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { createRenderChildNodes } from '../../createRenderChildNodes';
4
- import { getNumericAttribute, mapChildElements, query } from '../../dom-utils';
5
- import ExamAttachment from '../ExamAttachment';
6
- import Image from '../Image';
7
- import { findMultiChoiceFromGradingStructure, ResultsContext } from './ResultsContext';
8
- import ResultsExamQuestionAutoScore from './ResultsExamQuestionAutoScore';
9
- const renderChildNodes = createRenderChildNodes({
10
- attachment: ExamAttachment,
11
- image: Image,
12
- });
13
- function ChoiceAnswerOption({ selected, element, questionId, direction, isCorrect }) {
14
- const className = element.getAttribute('class');
15
- const optionId = element.getAttribute('option-id');
16
- const content = (React.createElement("div", { className: classNames('e-choice-answer-option e-column', className, {
17
- 'e-choice-answer-option--selected': selected,
18
- }) }, renderChildNodes(element)));
19
- const RadioInput = ({ narrow = false }) => (React.createElement("input", { type: "radio", className: classNames('e-radio-button', { 'e-column e-column--narrow': narrow }), name: String(questionId), value: optionId, checked: selected, readOnly: true }));
20
- return direction === 'vertical' ? (React.createElement("div", { className: "e-mrg-b-1" },
21
- React.createElement("label", { className: classNames('e-columns', {
22
- 'e-correct-answer-left': isCorrect,
23
- 'e-columns--inline': query(element, ['image', 'video']) == null /* Force full width for options containing responsive media */,
24
- }) },
25
- React.createElement(RadioInput, { narrow: true }),
26
- content))) : (React.createElement("div", { className: "e-column e-mrg-b-1" },
27
- React.createElement("label", { className: classNames('e-block e-text-center', { 'e-correct-answer-bottom': isCorrect }) },
28
- React.createElement(RadioInput, null),
29
- content)));
30
- }
31
- function ResultsChoiceAnswer({ element }) {
32
- const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
33
- const questionId = getNumericAttribute(element, 'question-id');
34
- const answer = answersByQuestionId[questionId];
35
- const direction = element.getAttribute('direction') || 'vertical';
36
- const className = element.getAttribute('class');
37
- const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
38
- const scoreValue = answer && choice.options.find((option) => option.id === Number(answer.value)).score;
39
- const maxScore = getNumericAttribute(element, 'max-score');
40
- return (React.createElement(React.Fragment, null,
41
- scoreValue !== undefined && React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore }),
42
- React.createElement("div", { className: classNames('e-choice-answer', className, {
43
- 'e-columns': direction === 'horizontal',
44
- }) }, mapChildElements(element, (childElement) => {
45
- const optionId = getNumericAttribute(childElement, 'option-id');
46
- const selected = answer != null && Number(answer.value) === optionId;
47
- const grading = choice.options.find((option) => option.id === optionId);
48
- return (React.createElement(ChoiceAnswerOption, Object.assign({}, {
49
- element: childElement,
50
- renderChildNodes,
51
- questionId,
52
- key: optionId,
53
- direction,
54
- selected,
55
- isCorrect: grading.correct,
56
- })));
57
- }))));
58
- }
59
- export default React.memo(ResultsChoiceAnswer);
60
- //# sourceMappingURL=ResultsChoiceAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsChoiceAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsChoiceAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAsB,MAAM,8BAA8B,CAAA;AACzF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtF,OAAO,4BAA4B,MAAM,gCAAgC,CAAA;AAUzE,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;IAC9C,UAAU,EAAE,cAAc;IAC1B,KAAK,EAAE,KAAK;CACb,CAAC,CAAA;AAEF,SAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAA2B;IAC1G,MAAM,S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AK,QAAQ,CAAE,CAAA;YACxE,OAAO,CACL,oBAAC,kBAAkB,oBACb;gBACF,OAAO,EAAE,YAAY;gBACrB,gBAAgB;gBAChB,UAAU;gBACV,GAAG,EAAE,QAAQ;gBACb,SAAS;gBACT,QAAQ;gBACR,SAAS,EAAE,OAAO,CAAC,OAAO;aAC3B,EACD,CACH,CAAA;QACH,CAAC,CAAC,CACE,CACL,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA"}
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { ExamAnswer, QuestionId } from '../../types/ExamAnswer';
3
- import { ChoiceGroupChoice, GradingStructure } from '../../types/GradingStructure';
4
- import { Score } from '../../types/Score';
5
- import { ResultsProps } from './Results';
6
- export interface ResultsContext {
7
- answersByQuestionId: Record<QuestionId, ExamAnswer>;
8
- gradingStructure: GradingStructure;
9
- scores: Score[];
10
- gradingText: string | undefined;
11
- totalScore: number;
12
- singleGrading?: boolean;
13
- }
14
- export declare const ResultsContext: React.Context<ResultsContext>;
15
- export declare const withResultsContext: (Component: React.ComponentType<ResultsProps>) => React.ComponentType<ResultsProps>;
16
- export declare function findMultiChoiceFromGradingStructure(gradingStructure: GradingStructure, id: number): ChoiceGroupChoice | undefined;
17
- export declare function findScore(scores: Score[], questionId: number): Score | undefined;
18
- export declare function calculateQuestionsTotalSumScore(topLevelQuestions: Element[], gradingStructure: GradingStructure, scores: Score[], answersByQuestionId: Record<QuestionId, ExamAnswer>): number;
19
- export declare function calculateQuestionSumScore(questionElement: Element, gradingStructure: GradingStructure, scores: Score[], answersById: Record<QuestionId, ExamAnswer>): number;
20
- //# sourceMappingURL=ResultsContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsContext.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAgB,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,EAAE,iBAAiB,EAAuB,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACvG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IACnD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,cAAc,+BAA4D,CAAA;AAEvF,eAAO,MAAM,kBAAkB,qFAgB9B,CAAA;AAED,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,gBAAgB,EAClC,EAAE,EAAE,MAAM,GACT,iBAAiB,GAAG,SAAS,CAY/B;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAEhF;AAED,wBAAgB,+BAA+B,CAC7C,iBAAiB,EAAE,OAAO,EAAE,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,UAOpD;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,KAAK,EAAE,EACf,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,UAiC5C"}
@@ -1,68 +0,0 @@
1
- import * as _ from 'lodash-es';
2
- import React from 'react';
3
- import { findChildrenAnswers, getNumericAttribute, parentElements, queryAll } from '../../dom-utils';
4
- import { withContext } from '../withContext';
5
- export const ResultsContext = React.createContext({});
6
- export const withResultsContext = withContext(ResultsContext, ({ scores, doc, gradingStructure, gradingText, answers, singleGrading }) => {
7
- const answersByQuestionId = _.keyBy(answers, 'questionId');
8
- const topLevelQuestions = queryAll(doc.documentElement, 'question', false);
9
- const totalScore = calculateQuestionsTotalSumScore(topLevelQuestions, gradingStructure, scores, answersByQuestionId);
10
- return {
11
- answersByQuestionId,
12
- gradingStructure,
13
- scores,
14
- totalScore,
15
- gradingText,
16
- singleGrading,
17
- };
18
- });
19
- export function findMultiChoiceFromGradingStructure(gradingStructure, id) {
20
- const choiceGroups = gradingStructure.questions.filter((v) => v.type === 'choicegroup');
21
- for (let i = 0, length = choiceGroups.length; i < length; i++) {
22
- const choiceGroup = choiceGroups[i];
23
- for (let j = 0, choicesLength = choiceGroup.choices.length; j < choicesLength; j++) {
24
- if (choiceGroup.choices[j].id === id) {
25
- return choiceGroup.choices[j];
26
- }
27
- }
28
- }
29
- return undefined;
30
- }
31
- export function findScore(scores, questionId) {
32
- return scores.find((a) => a.questionId === questionId);
33
- }
34
- export function calculateQuestionsTotalSumScore(topLevelQuestions, gradingStructure, scores, answersByQuestionId) {
35
- return _.sum(topLevelQuestions.map((question) => calculateQuestionSumScore(question, gradingStructure, scores, answersByQuestionId)));
36
- }
37
- export function calculateQuestionSumScore(questionElement, gradingStructure, scores, answersById) {
38
- const choiceQuestionScore = (questionId, scoredAnswer) => {
39
- const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
40
- return choice ? choice.options.find((o) => o.id === Number(scoredAnswer.value)).score : 0;
41
- };
42
- const textQuestionScore = (questionId) => {
43
- var _a, _b;
44
- const score = findScore(scores, questionId);
45
- return score
46
- ? ((_b = [score.inspection, (_a = score.censoring) === null || _a === void 0 ? void 0 : _a.scores[0], score.autograding, score.pregrading].find(Boolean)) === null || _b === void 0 ? void 0 : _b.score) || 0
47
- : 0;
48
- };
49
- const sumScore = _.sum(findChildrenAnswers(questionElement).map((answer) => {
50
- const questionId = getNumericAttribute(answer, 'question-id');
51
- const scoredAnswer = answersById[questionId];
52
- if (!scoredAnswer) {
53
- return 0;
54
- }
55
- if (scoredAnswer.type === 'choice') {
56
- return choiceQuestionScore(questionId, scoredAnswer);
57
- }
58
- else {
59
- return textQuestionScore(questionId);
60
- }
61
- }));
62
- // top level questions may not yield negative scores
63
- if (parentElements(questionElement, 'question').length === 0 && sumScore < 0) {
64
- return 0;
65
- }
66
- return sumScore;
67
- }
68
- //# sourceMappingURL=ResultsContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsContext.js","sourceRoot":"","sources":["../../../src/components/results/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;AAIpG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAY5C,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;QAC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AC,UAAU,CAAC,CAAA;SACrC;IACH,CAAC,CAAC,CACH,CAAA;IACD,oDAAoD;IACpD,IAAI,cAAc,CAAC,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,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../../createRenderChildNodes';
3
- declare function ResultsDropdownAnswer({ element }: ExamComponentProps): JSX.Element | null;
4
- declare const _default: React.MemoExoticComponent<typeof ResultsDropdownAnswer>;
5
- export default _default;
6
- //# sourceMappingURL=ResultsDropdownAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsDropdownAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsDropdownAnswer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,sBAiD7D;;AAED,wBAAgD"}
@@ -1,41 +0,0 @@
1
- import classNames from 'classnames';
2
- import * as _ from 'lodash-es';
3
- import React, { useContext } from 'react';
4
- import { findChildElement, getNumericAttribute, mapChildElements } from '../../dom-utils';
5
- import { shortDisplayNumber } from '../../shortDisplayNumber';
6
- import { QuestionContext } from '../QuestionContext';
7
- import { findMultiChoiceFromGradingStructure, ResultsContext } from './ResultsContext';
8
- import ResultsExamQuestionAutoScore from './ResultsExamQuestionAutoScore';
9
- function ResultsDropdownAnswer({ element }) {
10
- const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
11
- const { answers } = useContext(QuestionContext);
12
- const questionId = getNumericAttribute(element, 'question-id');
13
- const answer = answersByQuestionId[questionId];
14
- const currentlySelectedItem = answer &&
15
- answer.value &&
16
- findChildElement(element, (childElement) => answer.value === childElement.getAttribute('option-id'));
17
- const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
18
- if (currentlySelectedItem) {
19
- const correctIds = choice.options.filter((o) => o.correct).map((o) => o.id);
20
- const correctAnswers = _.compact(mapChildElements(element, (childElement) => {
21
- if (correctIds.includes(getNumericAttribute(childElement, 'option-id'))) {
22
- return childElement.textContent;
23
- }
24
- }));
25
- const isAnswerCorrect = correctIds.includes(getNumericAttribute(currentlySelectedItem, 'option-id'));
26
- const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
27
- const scoreValue = answer && choice.options.find((option) => option.id === Number(answer.value)).score;
28
- const maxScore = getNumericAttribute(element, 'max-score');
29
- return (React.createElement(React.Fragment, null,
30
- answers.length > 1 && React.createElement("sup", null, displayNumber),
31
- React.createElement("span", { className: classNames('e-dropdown-answer__answered', {
32
- 'e-dropdown-answer__answered--correct': isAnswerCorrect,
33
- 'e-dropdown-answer__answered--wrong': !isAnswerCorrect,
34
- }) }, currentlySelectedItem.textContent),
35
- !isAnswerCorrect && React.createElement("span", { className: "e-dropdown-answer__correct" }, correctAnswers.join(',')),
36
- scoreValue != null && (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber }))));
37
- }
38
- return null;
39
- }
40
- export default React.memo(ResultsDropdownAnswer);
41
- //# sourceMappingURL=ResultsDropdownAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsDropdownAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsDropdownAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACzF,OAAO,EAAE,kBAAkB,EA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AC,CAAC,CACH,CAAA;QACD,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,WAAW,CAAW,CAAC,CAAA;QAC9G,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC,CAAA;QACjF,MAAM,UAAU,GAAG,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAE,CAAC,KAAK,CAAA;QAEvG,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAE,CAAA;QAE3D,OAAO,CACL;YACG,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,iCAAM,aAAa,CAAO;YAEjD,8BACE,SAAS,EAAE,UAAU,CAAC,6BAA6B,EAAE;oBACnD,sCAAsC,EAAE,eAAe;oBACvD,oCAAoC,EAAE,CAAC,eAAe;iBACvD,CAAC,IAED,qBAAqB,CAAC,WAAW,CAC7B;YACN,CAAC,eAAe,IAAI,8BAAM,SAAS,EAAC,4BAA4B,IAAE,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAQ;YAClG,UAAU,IAAI,IAAI,IAAI,CACrB,oBAAC,4BAA4B,IAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,GAAI,CACtG,CACA,CACJ,CAAA;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,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=ResultsExamQuestion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestion.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;;AA2BjE,wBAAmE"}
@@ -1,23 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { findChildrenAnswers, getNumericAttribute } from '../../dom-utils';
4
- import { QuestionContext, withQuestionContext } from '../QuestionContext';
5
- import AnnotationList from './AnnotationList';
6
- import { ResultsContext } from './ResultsContext';
7
- function ResultsExamQuestion({ element, renderChildNodes }) {
8
- const { answersByQuestionId } = useContext(ResultsContext);
9
- const { displayNumber, level } = useContext(QuestionContext);
10
- const hasAnswers = questionHasAnswers(element, answersByQuestionId);
11
- return hasAnswers ? (React.createElement("div", { className: classNames('exam-question', {
12
- 'e-mrg-b-8 e-clearfix': level === 0,
13
- 'e-mrg-l-8 e-mrg-y-4': level > 0,
14
- }), id: displayNumber },
15
- renderChildNodes(element),
16
- React.createElement(AnnotationList, null))) : null;
17
- }
18
- function questionHasAnswers(element, answers) {
19
- const answerElems = findChildrenAnswers(element);
20
- return answerElems.some((e) => answers[getNumericAttribute(e, 'question-id')]);
21
- }
22
- export default React.memo(withQuestionContext(ResultsExamQuestion));
23
- //# sourceMappingURL=ResultsExamQuestion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestion.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestion.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,oBAAoB,CAAA;AACzE,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,SAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAC5E,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,UAAU,CAAC,CAAC,CAAC,CAClB,6BACE,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE;YACrC,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,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,EAAE,aAAa,CAAE,CAAC,CAAC,CAAA;AACjF,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface ResultsExamQuestionAutoScoreProps {
3
- score?: number;
4
- maxScore?: number;
5
- displayNumber?: string;
6
- }
7
- declare function ResultsExamQuestionAutoScore({ score, maxScore, displayNumber }: ResultsExamQuestionAutoScoreProps): JSX.Element;
8
- declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionAutoScore>;
9
- export default _default;
10
- //# sourceMappingURL=ResultsExamQuestionAutoScore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionAutoScore.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionAutoScore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,MAAM,WAAW,iCAAiC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,iBAAS,4BAA4B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,iCAAiC,eAS1G;;AAED,wBAAuD"}
@@ -1,16 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { Translation } from 'react-i18next';
3
- import { QuestionContext } from '../QuestionContext';
4
- import ResultsExamQuestionScoresContainer from './ResultsExamQuestionScoresContainer';
5
- function ResultsExamQuestionAutoScore({ score, maxScore, displayNumber }) {
6
- const { answers } = useContext(QuestionContext);
7
- const containerProps = { answers, displayNumber };
8
- return (React.createElement(ResultsExamQuestionScoresContainer, Object.assign({}, containerProps),
9
- typeof score === 'number' ? React.createElement("b", null, score) : React.createElement("div", { className: "e-result-scorecount-empty" }),
10
- ' ',
11
- maxScore ? `/ ${maxScore} ` : null,
12
- " ",
13
- React.createElement(Translation, null, (t) => t('points'))));
14
- }
15
- export default React.memo(ResultsExamQuestionAutoScore);
16
- //# sourceMappingURL=ResultsExamQuestionAutoScore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionAutoScore.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionAutoScore.tsx"],"names":[],"mappings":"AAAA,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;AAQrF,SAAS,4BAA4B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAqC;IACzG,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,cAAc,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,CAAA;IACjD,OAAO,CACL,oBAAC,kCAAkC,oBAAK,cAAc;QACnD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAAI,KAAK,CAAK,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,2BAA2B,GAAG;QAAE,GAAG;QAC/F,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI;;QAAE,oBAAC,WAAW,QAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAe,CACjD,CACtC,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Score } from '../../types/Score';
3
- export interface ResultsExamQuestionManualScoreProps {
4
- scores?: Score;
5
- maxScore?: number;
6
- displayNumber?: string;
7
- }
8
- declare function ResultsExamQuestionManualScore({ scores, maxScore, displayNumber }: ResultsExamQuestionManualScoreProps): JSX.Element;
9
- declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionManualScore>;
10
- export default _default;
11
- //# sourceMappingURL=ResultsExamQuestionManualScore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResultsExamQuestionManualScore.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsExamQuestionManualScore.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAoD,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE3F,MAAM,WAAW,mCAAmC;IAClD,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAQD,iBAAS,8BAA8B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,mCAAmC,eAa/G;;AAqFD,wBAAyD"}
@@ -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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G,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