@digabi/exam-engine-core 19.15.3 → 19.15.4-image-paste-debugging.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/results/ResultsContext.test.js.map +1 -1
- package/dist/__tests__/testExamRendering.js.map +1 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/__tests__/validateAnswers.test.js.map +1 -1
- package/dist/components/AnswerToolbar.js.map +1 -1
- package/dist/components/AnsweringInstructions.js.map +1 -1
- package/dist/components/AttachmentContext.d.ts +14 -0
- package/dist/components/AttachmentContext.d.ts.map +1 -0
- package/dist/components/AttachmentContext.js +12 -0
- package/dist/components/AttachmentContext.js.map +1 -0
- package/dist/components/AttachmentLink.d.ts +6 -0
- package/dist/components/AttachmentLink.d.ts.map +1 -0
- package/dist/components/AttachmentLink.js +24 -0
- package/dist/components/AttachmentLink.js.map +1 -0
- package/dist/components/AttachmentLinkAnchor.d.ts +7 -0
- package/dist/components/AttachmentLinkAnchor.d.ts.map +1 -0
- package/dist/components/AttachmentLinkAnchor.js +4 -0
- package/dist/components/AttachmentLinkAnchor.js.map +1 -0
- package/dist/components/AttachmentLinks.d.ts +6 -0
- package/dist/components/AttachmentLinks.d.ts.map +1 -0
- package/dist/components/AttachmentLinks.js +58 -0
- package/dist/components/AttachmentLinks.js.map +1 -0
- package/dist/components/Attachments.d.ts +5 -0
- package/dist/components/Attachments.d.ts.map +1 -0
- package/dist/components/Attachments.js +43 -0
- package/dist/components/Attachments.js.map +1 -0
- package/dist/components/AttachmentsAttachment.d.ts +5 -0
- package/dist/components/AttachmentsAttachment.d.ts.map +1 -0
- package/dist/components/AttachmentsAttachment.js +8 -0
- package/dist/components/AttachmentsAttachment.js.map +1 -0
- package/dist/components/AttachmentsAttachmentTitle.d.ts +6 -0
- package/dist/components/AttachmentsAttachmentTitle.d.ts.map +1 -0
- package/dist/components/AttachmentsAttachmentTitle.js +12 -0
- package/dist/components/AttachmentsAttachmentTitle.js.map +1 -0
- package/dist/components/AttachmentsExternalMaterial.d.ts +9 -0
- package/dist/components/AttachmentsExternalMaterial.d.ts.map +1 -0
- package/dist/components/AttachmentsExternalMaterial.js +40 -0
- package/dist/components/AttachmentsExternalMaterial.js.map +1 -0
- package/dist/components/AttachmentsQuestion.d.ts +5 -0
- package/dist/components/AttachmentsQuestion.d.ts.map +1 -0
- package/dist/components/AttachmentsQuestion.js +16 -0
- package/dist/components/AttachmentsQuestion.js.map +1 -0
- package/dist/components/AttachmentsQuestionTitle.d.ts +6 -0
- package/dist/components/AttachmentsQuestionTitle.d.ts.map +1 -0
- package/dist/components/AttachmentsQuestionTitle.js +13 -0
- package/dist/components/AttachmentsQuestionTitle.js.map +1 -0
- package/dist/components/Audio.d.ts +6 -0
- package/dist/components/Audio.d.ts.map +1 -0
- package/dist/components/Audio.js +29 -0
- package/dist/components/Audio.js.map +1 -0
- package/dist/components/AudioGroup.d.ts +6 -0
- package/dist/components/AudioGroup.d.ts.map +1 -0
- package/dist/components/AudioGroup.js +9 -0
- package/dist/components/AudioGroup.js.map +1 -0
- package/dist/components/AudioPlaybackError.d.ts +7 -0
- package/dist/components/AudioPlaybackError.d.ts.map +1 -0
- package/dist/components/AudioPlaybackError.js +12 -0
- package/dist/components/AudioPlaybackError.js.map +1 -0
- package/dist/components/AudioTest.d.ts +6 -0
- package/dist/components/AudioTest.d.ts.map +1 -0
- package/dist/components/AudioTest.js +29 -0
- package/dist/components/AudioTest.js.map +1 -0
- package/dist/components/ChoiceAnswer.d.ts +12 -0
- package/dist/components/ChoiceAnswer.d.ts.map +1 -0
- package/dist/components/ChoiceAnswer.js +60 -0
- package/dist/components/ChoiceAnswer.js.map +1 -0
- package/dist/components/CommonExamContext.d.ts +16 -0
- package/dist/components/CommonExamContext.d.ts.map +1 -0
- package/dist/components/CommonExamContext.js +22 -0
- package/dist/components/CommonExamContext.js.map +1 -0
- package/dist/components/DocumentTitle.js.map +1 -1
- package/dist/components/DropdownAnswer.d.ts +12 -0
- package/dist/components/DropdownAnswer.d.ts.map +1 -0
- package/dist/components/DropdownAnswer.js +85 -0
- package/dist/components/DropdownAnswer.js.map +1 -0
- package/dist/components/Exam.d.ts +40 -0
- package/dist/components/Exam.d.ts.map +1 -0
- package/dist/components/Exam.js +106 -0
- package/dist/components/Exam.js.map +1 -0
- package/dist/components/ExamAttachment.d.ts +5 -0
- package/dist/components/ExamAttachment.d.ts.map +1 -0
- package/dist/components/ExamAttachment.js +8 -0
- package/dist/components/ExamAttachment.js.map +1 -0
- package/dist/components/ExamContext.d.ts +10 -0
- package/dist/components/ExamContext.d.ts.map +1 -0
- package/dist/components/ExamContext.js +11 -0
- package/dist/components/ExamContext.js.map +1 -0
- package/dist/components/ExamFooter.d.ts +6 -0
- package/dist/components/ExamFooter.d.ts.map +1 -0
- package/dist/components/ExamFooter.js +7 -0
- package/dist/components/ExamFooter.js.map +1 -0
- package/dist/components/ExamInstruction.d.ts +6 -0
- package/dist/components/ExamInstruction.d.ts.map +1 -0
- package/dist/components/ExamInstruction.js +6 -0
- package/dist/components/ExamInstruction.js.map +1 -0
- package/dist/components/ExamQuestion.d.ts +5 -0
- package/dist/components/ExamQuestion.d.ts.map +1 -0
- package/dist/components/ExamQuestion.js +16 -0
- package/dist/components/ExamQuestion.js.map +1 -0
- package/dist/components/ExamQuestionInstruction.d.ts +6 -0
- package/dist/components/ExamQuestionInstruction.d.ts.map +1 -0
- package/dist/components/ExamQuestionInstruction.js +6 -0
- package/dist/components/ExamQuestionInstruction.js.map +1 -0
- package/dist/components/ExamQuestionTitle.d.ts +6 -0
- package/dist/components/ExamQuestionTitle.d.ts.map +1 -0
- package/dist/components/ExamQuestionTitle.js +25 -0
- package/dist/components/ExamQuestionTitle.js.map +1 -0
- package/dist/components/ExamSection.d.ts +5 -0
- package/dist/components/ExamSection.d.ts.map +1 -0
- package/dist/components/ExamSection.js +30 -0
- package/dist/components/ExamSection.js.map +1 -0
- package/dist/components/ExamSectionTitle.d.ts +6 -0
- package/dist/components/ExamSectionTitle.d.ts.map +1 -0
- package/dist/components/ExamSectionTitle.js +21 -0
- package/dist/components/ExamSectionTitle.js.map +1 -0
- package/dist/components/ExternalMaterialList.d.ts +10 -0
- package/dist/components/ExternalMaterialList.d.ts.map +1 -0
- package/dist/components/ExternalMaterialList.js +31 -0
- package/dist/components/ExternalMaterialList.js.map +1 -0
- package/dist/components/File.d.ts +6 -0
- package/dist/components/File.d.ts.map +1 -0
- package/dist/components/File.js +15 -0
- package/dist/components/File.js.map +1 -0
- package/dist/components/Formula.d.ts +6 -0
- package/dist/components/Formula.d.ts.map +1 -0
- package/dist/components/Formula.js +12 -0
- package/dist/components/Formula.js.map +1 -0
- package/dist/components/Hints.d.ts +6 -0
- package/dist/components/Hints.d.ts.map +1 -0
- package/dist/components/Hints.js +32 -0
- package/dist/components/Hints.js.map +1 -0
- package/dist/components/Image.d.ts +6 -0
- package/dist/components/Image.d.ts.map +1 -0
- package/dist/components/Image.js +25 -0
- package/dist/components/Image.js.map +1 -0
- package/dist/components/ImageOverlay.d.ts +6 -0
- package/dist/components/ImageOverlay.d.ts.map +1 -0
- package/dist/components/ImageOverlay.js +45 -0
- package/dist/components/ImageOverlay.js.map +1 -0
- package/dist/components/ProgressBar.d.ts +6 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +18 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/QuestionContext.d.ts +14 -0
- package/dist/components/QuestionContext.d.ts.map +1 -0
- package/dist/components/QuestionContext.js +20 -0
- package/dist/components/QuestionContext.js.map +1 -0
- package/dist/components/Reference.d.ts +6 -0
- package/dist/components/Reference.d.ts.map +1 -0
- package/dist/components/Reference.js +63 -0
- package/dist/components/Reference.js.map +1 -0
- package/dist/components/References.d.ts +6 -0
- package/dist/components/References.d.ts.map +1 -0
- package/dist/components/References.js +23 -0
- package/dist/components/References.js.map +1 -0
- package/dist/components/ResponsiveMediaContainer.d.ts +17 -0
- package/dist/components/ResponsiveMediaContainer.d.ts.map +1 -0
- package/dist/components/ResponsiveMediaContainer.js +20 -0
- package/dist/components/ResponsiveMediaContainer.js.map +1 -0
- package/dist/components/RestrictedAudioPlayer.d.ts +11 -0
- package/dist/components/RestrictedAudioPlayer.d.ts.map +1 -0
- package/dist/components/RestrictedAudioPlayer.js +29 -0
- package/dist/components/RestrictedAudioPlayer.js.map +1 -0
- package/dist/components/RichTextAnswer.d.ts +31 -0
- package/dist/components/RichTextAnswer.d.ts.map +1 -0
- package/dist/components/RichTextAnswer.js +70 -0
- package/dist/components/RichTextAnswer.js.map +1 -0
- package/dist/components/SaveIndicator.d.ts +5 -0
- package/dist/components/SaveIndicator.d.ts.map +1 -0
- package/dist/components/SaveIndicator.js +15 -0
- package/dist/components/SaveIndicator.js.map +1 -0
- package/dist/components/Score.d.ts +6 -0
- package/dist/components/Score.d.ts.map +1 -0
- package/dist/components/Score.js +13 -0
- package/dist/components/Score.js.map +1 -0
- package/dist/components/Section.d.ts +3 -0
- package/dist/components/Section.d.ts.map +1 -0
- package/dist/components/Section.js +7 -0
- package/dist/components/Section.js.map +1 -0
- package/dist/components/SectionContext.d.ts +13 -0
- package/dist/components/SectionContext.d.ts.map +1 -0
- package/dist/components/SectionContext.js +21 -0
- package/dist/components/SectionContext.js.map +1 -0
- package/dist/components/SectionInstruction.d.ts +6 -0
- package/dist/components/SectionInstruction.d.ts.map +1 -0
- package/dist/components/SectionInstruction.js +6 -0
- package/dist/components/SectionInstruction.js.map +1 -0
- package/dist/components/TableOfContents.d.ts +13 -0
- package/dist/components/TableOfContents.d.ts.map +1 -0
- package/dist/components/TableOfContents.js +66 -0
- package/dist/components/TableOfContents.js.map +1 -0
- package/dist/components/TextAnswer.d.ts +6 -0
- package/dist/components/TextAnswer.d.ts.map +1 -0
- package/dist/components/TextAnswer.js +16 -0
- package/dist/components/TextAnswer.js.map +1 -0
- package/dist/components/TextAnswerInput.d.ts +37 -0
- package/dist/components/TextAnswerInput.d.ts.map +1 -0
- package/dist/components/TextAnswerInput.js +145 -0
- package/dist/components/TextAnswerInput.js.map +1 -0
- package/dist/components/Video.d.ts +6 -0
- package/dist/components/Video.d.ts.map +1 -0
- package/dist/components/Video.js +15 -0
- package/dist/components/Video.js.map +1 -0
- package/dist/components/attachments/ExternalMaterial.js.map +1 -1
- package/dist/components/context/ResultsContext.js.map +1 -1
- package/dist/components/exam/DropdownAnswer.js.map +1 -1
- package/dist/components/exam/Exam.js.map +1 -1
- package/dist/components/exam/ExternalMaterial.js.map +1 -1
- package/dist/components/exam/Hints.js.map +1 -1
- package/dist/components/exam/Question.js.map +1 -1
- package/dist/components/exam/RichTextAnswer.js.map +1 -1
- package/dist/components/exam/UndoHistoryEntry.js.map +1 -1
- package/dist/components/exam/UndoView.js.map +1 -1
- package/dist/components/exam/internal/ErrorIndicator.js.map +1 -1
- package/dist/components/exam/internal/SaveIndicator.js.map +1 -1
- package/dist/components/exam/internal/TextAnswerInput.js.map +1 -1
- package/dist/components/grading/AnswerCharacterCounter.js.map +1 -1
- package/dist/components/grading/GradingAnswer.js.map +1 -1
- package/dist/components/grading/editAnnotations.js.map +1 -1
- package/dist/components/grading/largeImageDetector.js.map +1 -1
- package/dist/components/grading-instructions/AutogradedAnswer.js.map +1 -1
- package/dist/components/grading-instructions/Recording.js.map +1 -1
- package/dist/components/results/AnnotationList.d.ts +5 -0
- package/dist/components/results/AnnotationList.d.ts.map +1 -0
- package/dist/components/results/AnnotationList.js +40 -0
- package/dist/components/results/AnnotationList.js.map +1 -0
- package/dist/components/results/MultiLineAnswer.js.map +1 -1
- package/dist/components/results/ResultsChoiceAnswer.d.ts +6 -0
- package/dist/components/results/ResultsChoiceAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsChoiceAnswer.js +60 -0
- package/dist/components/results/ResultsChoiceAnswer.js.map +1 -0
- package/dist/components/results/ResultsContext.d.ts +20 -0
- package/dist/components/results/ResultsContext.d.ts.map +1 -0
- package/dist/components/results/ResultsContext.js +68 -0
- package/dist/components/results/ResultsContext.js.map +1 -0
- package/dist/components/results/ResultsDropdownAnswer.d.ts +6 -0
- package/dist/components/results/ResultsDropdownAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsDropdownAnswer.js +41 -0
- package/dist/components/results/ResultsDropdownAnswer.js.map +1 -0
- package/dist/components/results/ResultsExamQuestion.d.ts +5 -0
- package/dist/components/results/ResultsExamQuestion.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestion.js +23 -0
- package/dist/components/results/ResultsExamQuestion.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +10 -0
- package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionAutoScore.js +16 -0
- package/dist/components/results/ResultsExamQuestionAutoScore.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts +11 -0
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionManualScore.js +62 -0
- package/dist/components/results/ResultsExamQuestionManualScore.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +9 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.js +8 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionTitle.d.ts +6 -0
- package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionTitle.js +22 -0
- package/dist/components/results/ResultsExamQuestionTitle.js.map +1 -0
- package/dist/components/results/ResultsExamSection.d.ts +5 -0
- package/dist/components/results/ResultsExamSection.d.ts.map +1 -0
- package/dist/components/results/ResultsExamSection.js +17 -0
- package/dist/components/results/ResultsExamSection.js.map +1 -0
- package/dist/components/results/ResultsScoredTextAnswer.d.ts +6 -0
- package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsScoredTextAnswer.js +22 -0
- package/dist/components/results/ResultsScoredTextAnswer.js.map +1 -0
- package/dist/components/results/ResultsSingleLineAnswer.d.ts +12 -0
- package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsSingleLineAnswer.js +12 -0
- package/dist/components/results/ResultsSingleLineAnswer.js.map +1 -0
- package/dist/components/results/ResultsTextAnswer.d.ts +6 -0
- package/dist/components/results/ResultsTextAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsTextAnswer.js +51 -0
- package/dist/components/results/ResultsTextAnswer.js.map +1 -0
- package/dist/components/results/SingleLineAnswer.js.map +1 -1
- package/dist/components/results/TextAnswer.js.map +1 -1
- package/dist/components/results/helpers.d.ts +9 -0
- package/dist/components/results/helpers.d.ts.map +1 -0
- package/dist/components/results/helpers.js +10 -0
- package/dist/components/results/helpers.js.map +1 -0
- package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
- package/dist/components/shared/AttachmentLinks.js.map +1 -1
- package/dist/components/shared/Reference.js.map +1 -1
- package/dist/components/shared/TableOfContents.js.map +1 -1
- package/dist/components/types.d.ts +110 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/components/types.js +1 -0
- package/dist/components/types.js.map +1 -0
- package/dist/components/withContext.d.ts +3 -0
- package/dist/components/withContext.d.ts.map +1 -0
- package/dist/components/withContext.js +12 -0
- package/dist/components/withContext.js.map +1 -0
- package/dist/createRenderChildNodes.js.map +1 -1
- package/dist/dom-utils.js.map +1 -1
- package/dist/fonts.js +2 -2
- package/dist/fonts.js.map +1 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/ids.js.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/dist/parser/parseExam.js.map +1 -1
- package/dist/renderAnnotations.js.map +1 -1
- package/dist/scrollToHash.js.map +1 -1
- package/dist/store/answers/reducer.js.map +1 -1
- package/dist/store/answers/sagas.js.map +1 -1
- package/dist/store/audio/reducer.js.map +1 -1
- package/dist/store/audio/sagas.js.map +1 -1
- package/dist/store/cas/reducer.js.map +1 -1
- package/dist/store/cas/sagas.js.map +1 -1
- package/dist/store/countdown.js.map +1 -1
- package/dist/store/selectors.js.map +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/validateAnswers.js.map +1 -1
- package/package.json +3 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AutogradedAnswer.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/AutogradedAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,gBAAgB,MAAM,4BAA4B,CAAA;AAEzD,MAAM,gBAAgB,GAAiC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IACvF,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAA;IACnF,MAAM,SAAS,GAAG,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAE5D,MAAM,OAAO,GAAG,CACd;QACG,SAAS,IAAI,IAAI,IAAI,oBAAC,gBAAgB,IAAO,SAAS,GAAM;QAC7D,gCAAK,gBAAgB,CAAC,OAAO,CAAC,CAAM;QACnC,mBAAmB,IAAI,oBAAC,wBAAwB,IAAO,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,GAAM,CAC3G,CACJ,CAAA;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;
|
1
|
+
{"version":3,"file":"AutogradedAnswer.js","sourceRoot":"","sources":["../../../src/components/grading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,EAAC,WAAW;YACxB,2BAAG,SAAS,EAAC,qBAAqB;gBAChC,8BAAM,SAAS,EAAC,0DAA0D;oBAAE,aAAa;wBAAS;gBACjG,IAAI,IAAI,gBAAgB,CAAC,IAAI,CAAC;;gBAAE,oBAAC,KAAK,IAAC,KAAK,EAAE,QAAQ,GAAI,CACzD;YACH,OAAO,CACJ,CACP,CAAA;IACH,CAAC;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Recording.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/Recording.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,CAAC,MAAM,SAAS,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IACtG,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAA;IAE/F,IAAI,aAAa,EAAE;
|
1
|
+
{"version":3,"file":"Recording.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/Recording.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,CAAC,MAAM,SAAS,GAAgD,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE;IACtG,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAA;IAE/F,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;QAClC,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAA;QAEvE,OAAO,CACL,iCAAS,SAAS,EAAC,mDAAmD;YACpE;gBACE,oCAAS,CAAC,CAAC,WAAW,CAAC,CAAU;;gBAAE,KAAK,IAAI,gCAAK,gBAAgB,CAAC,KAAK,CAAC,CAAM,CACtE;YACT,gBAAgB,CAAC,aAAa,CAAC,CACxB,CACX,CAAA;IACH,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,40 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAa5D,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE,uBACtC,OAAA,OAAO,CAAC,aAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,0CAAE,MAAM,kBAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,0CAAE,MAAM,CAAA,CAAC,CAAA,EAAA,CAAA;AAE1F,MAAM,SAAS,GAAG,CAAC,OAAkB,EAAE,MAAe,EAAE,EAAE,CACxD,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC,CAAC,CAAC,CAAC,EA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C,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MultiLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAIvB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,kBAAkB,EAAE,CAAA;IACxC,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAE9C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE;
|
1
|
+
{"version":3,"file":"MultiLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAIvB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,kBAAkB,EAAE,CAAA;IACxC,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAE9C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC,CAAA;QACjH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,qEAAqE,EAAE;YAC3F,WAAW,EAAE,CAAC,KAAK;SACpB,CAAC,sBACgB,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,CAAC,SAAS;QAEjF,oBAAC,gBAAgB,QAAE,CAAC,CAAC,4BAA4B,CAAC,CAAoB;QACrE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CACtB,6BAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,GAAI,CAC1E,CAAC,CAAC,CAAC,CACF,6BAAK,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,SAAS,IACvC,KAAK,CACF,CACP;QACD,oBAAC,gBAAgB,QAAE,CAAC,CAAC,0BAA0B,CAAC,CAAoB,CAChE,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,60 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
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C,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAE,CAAC,KAAK,CAAA;IACvG,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;IAE1D,OAAO,CACL;QACG,UAAU,KAAK,SAAS,IAAI,oBAAC,4BAA4B,IAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACpG,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;gBAClD,WAAW,EAAE,SAAS,KAAK,YAAY;aACxC,CAAC,IAED,gBAAgB,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC1C,MAAM,QAAQ,GAAG,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAE,CAAA;YAChE,MAAM,QAAQ,GAAG,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAA;YACpE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,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"}
|
@@ -0,0 +1,20 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,68 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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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AAE,YAAY,CAAC,CAAA;SACrD;aAAM;YACL,OAAO,iBAAiB,CAAC,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"}
|
@@ -0,0 +1,6 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,41 @@
|
|
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
|
@@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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"}
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,23 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,10 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,16 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,11 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,62 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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,C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AE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAe,CAC/B,CACV,CACP,CAAA;AACH,CAAC;AAOD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAoB;IAC5D,OAAO,8BAAM,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,SAAS,CAAC,IAAG,QAAQ,CAAQ,CAAA;AACxF,CAAC;AAED,SAAS,wBAAwB,CAAC,EAAE,KAAK,EAAmB;IAC1D,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAC1E,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAqB;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACjC,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,EAAE;QAC5B,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI;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"}
|
@@ -0,0 +1,9 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,8 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,6 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,22 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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,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