@digabi/exam-engine-core 16.2.3 → 16.4.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/tsconfig.tsbuildinfo +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 +5 -0
- package/dist/components/AttachmentLink.d.ts.map +1 -0
- package/dist/components/AttachmentLink.js +28 -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 +5 -0
- package/dist/components/AttachmentLinks.d.ts.map +1 -0
- package/dist/components/AttachmentLinks.js +62 -0
- package/dist/components/AttachmentLinks.js.map +1 -0
- package/dist/components/Attachments.d.ts +6 -0
- package/dist/components/Attachments.d.ts.map +1 -0
- package/dist/components/Attachments.js +55 -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 +17 -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 +31 -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 +13 -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 +62 -0
- package/dist/components/ChoiceAnswer.js.map +1 -0
- package/dist/components/CommonExamContext.d.ts +19 -0
- package/dist/components/CommonExamContext.d.ts.map +1 -0
- package/dist/components/CommonExamContext.js +25 -0
- package/dist/components/CommonExamContext.js.map +1 -0
- package/dist/components/DropdownAnswer.d.ts +12 -0
- package/dist/components/DropdownAnswer.d.ts.map +1 -0
- package/dist/components/DropdownAnswer.js +100 -0
- package/dist/components/DropdownAnswer.js.map +1 -0
- package/dist/components/ErrorIndicator.d.ts +4 -0
- package/dist/components/ErrorIndicator.d.ts.map +1 -0
- package/dist/components/ErrorIndicator.js +43 -0
- package/dist/components/ErrorIndicator.js.map +1 -0
- package/dist/components/Exam.d.ts +32 -0
- package/dist/components/Exam.d.ts.map +1 -0
- package/dist/components/Exam.js +103 -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 +5 -0
- package/dist/components/ExamQuestionTitle.d.ts.map +1 -0
- package/dist/components/ExamQuestionTitle.js +24 -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 +31 -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 +22 -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 +33 -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 +13 -0
- package/dist/components/Formula.js.map +1 -0
- package/dist/components/Hints.d.ts +5 -0
- package/dist/components/Hints.d.ts.map +1 -0
- package/dist/components/Hints.js +30 -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 +28 -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 +44 -0
- package/dist/components/ImageOverlay.js.map +1 -0
- package/dist/components/ProgressBar.d.ts +7 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +19 -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 +71 -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 +25 -0
- package/dist/components/References.js.map +1 -0
- package/dist/components/ResponsiveMediaContainer.d.ts +18 -0
- package/dist/components/ResponsiveMediaContainer.d.ts.map +1 -0
- package/dist/components/ResponsiveMediaContainer.js +21 -0
- package/dist/components/ResponsiveMediaContainer.js.map +1 -0
- package/dist/components/RestrictedAudioPlayer.d.ts +12 -0
- package/dist/components/RestrictedAudioPlayer.d.ts.map +1 -0
- package/dist/components/RestrictedAudioPlayer.js +32 -0
- package/dist/components/RestrictedAudioPlayer.js.map +1 -0
- package/dist/components/RichTextAnswer.d.ts +33 -0
- package/dist/components/RichTextAnswer.d.ts.map +1 -0
- package/dist/components/RichTextAnswer.js +61 -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 +16 -0
- package/dist/components/SaveIndicator.js.map +1 -0
- package/dist/components/Score.d.ts +8 -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 +4 -0
- package/dist/components/Section.d.ts.map +1 -0
- package/dist/components/Section.js +8 -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 +17 -0
- package/dist/components/TextAnswer.js.map +1 -0
- package/dist/components/TextAnswerInput.d.ts +36 -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/exam/RichTextAnswer.d.ts.map +1 -1
- package/dist/components/exam/RichTextAnswer.js +7 -9
- package/dist/components/exam/RichTextAnswer.js.map +1 -1
- package/dist/components/exam/TableOfContents.d.ts +13 -0
- package/dist/components/exam/TableOfContents.d.ts.map +1 -0
- package/dist/components/exam/TableOfContents.js +66 -0
- package/dist/components/exam/TableOfContents.js.map +1 -0
- package/dist/components/grading-instruction/AnswerGradingInstruction.d.ts +5 -0
- package/dist/components/grading-instruction/AnswerGradingInstruction.d.ts.map +1 -0
- package/dist/components/grading-instruction/AnswerGradingInstruction.js +6 -0
- package/dist/components/grading-instruction/AnswerGradingInstruction.js.map +1 -0
- package/dist/components/grading-instruction/Audio.d.ts +5 -0
- package/dist/components/grading-instruction/Audio.d.ts.map +1 -0
- package/dist/components/grading-instruction/Audio.js +6 -0
- package/dist/components/grading-instruction/Audio.js.map +1 -0
- package/dist/components/grading-instruction/AudioTitle.d.ts +5 -0
- package/dist/components/grading-instruction/AudioTitle.d.ts.map +1 -0
- package/dist/components/grading-instruction/AudioTitle.js +10 -0
- package/dist/components/grading-instruction/AudioTitle.js.map +1 -0
- package/dist/components/grading-instruction/AutogradedAnswer.d.ts +5 -0
- package/dist/components/grading-instruction/AutogradedAnswer.d.ts.map +1 -0
- package/dist/components/grading-instruction/AutogradedAnswer.js +31 -0
- package/dist/components/grading-instruction/AutogradedAnswer.js.map +1 -0
- package/dist/components/grading-instruction/AutogradedAnswerOption.d.ts +5 -0
- package/dist/components/grading-instruction/AutogradedAnswerOption.d.ts.map +1 -0
- package/dist/components/grading-instruction/AutogradedAnswerOption.js +14 -0
- package/dist/components/grading-instruction/AutogradedAnswerOption.js.map +1 -0
- package/dist/components/grading-instruction/ExamGradingInstruction.d.ts +5 -0
- package/dist/components/grading-instruction/ExamGradingInstruction.d.ts.map +1 -0
- package/dist/components/grading-instruction/ExamGradingInstruction.js +6 -0
- package/dist/components/grading-instruction/ExamGradingInstruction.js.map +1 -0
- package/dist/components/grading-instruction/GradingInstruction.d.ts +5 -0
- package/dist/components/grading-instruction/GradingInstruction.d.ts.map +1 -0
- package/dist/components/grading-instruction/GradingInstruction.js +85 -0
- package/dist/components/grading-instruction/GradingInstruction.js.map +1 -0
- package/dist/components/grading-instruction/Question.d.ts +5 -0
- package/dist/components/grading-instruction/Question.d.ts.map +1 -0
- package/dist/components/grading-instruction/Question.js +12 -0
- package/dist/components/grading-instruction/Question.js.map +1 -0
- package/dist/components/grading-instruction/QuestionTitle.d.ts +5 -0
- package/dist/components/grading-instruction/QuestionTitle.d.ts.map +1 -0
- package/dist/components/grading-instruction/QuestionTitle.js +19 -0
- package/dist/components/grading-instruction/QuestionTitle.js.map +1 -0
- package/dist/components/grading-instruction/Section.d.ts +5 -0
- package/dist/components/grading-instruction/Section.d.ts.map +1 -0
- package/dist/components/grading-instruction/Section.js +10 -0
- package/dist/components/grading-instruction/Section.js.map +1 -0
- package/dist/components/grading-instruction/SectionTitle.d.ts +5 -0
- package/dist/components/grading-instruction/SectionTitle.d.ts.map +1 -0
- package/dist/components/grading-instruction/SectionTitle.js +16 -0
- package/dist/components/grading-instruction/SectionTitle.js.map +1 -0
- 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 +43 -0
- package/dist/components/results/AnnotationList.js.map +1 -0
- package/dist/components/results/GradingStructure.d.ts +5 -0
- package/dist/components/results/GradingStructure.d.ts.map +1 -0
- package/dist/components/results/GradingStructure.js +21 -0
- package/dist/components/results/GradingStructure.js.map +1 -0
- package/dist/components/results/Hvp.d.ts +15 -0
- package/dist/components/results/Hvp.d.ts.map +1 -0
- package/dist/components/results/Hvp.js +73 -0
- package/dist/components/results/Hvp.js.map +1 -0
- package/dist/components/results/HvpTextAnswer.d.ts +6 -0
- package/dist/components/results/HvpTextAnswer.d.ts.map +1 -0
- package/dist/components/results/HvpTextAnswer.js +51 -0
- package/dist/components/results/HvpTextAnswer.js.map +1 -0
- 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 +57 -0
- package/dist/components/results/ResultsChoiceAnswer.js.map +1 -0
- package/dist/components/results/ResultsContext.d.ts +18 -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 +43 -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 +17 -0
- package/dist/components/results/ResultsExamQuestionAutoScore.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts +12 -0
- package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionManualScore.js +61 -0
- package/dist/components/results/ResultsExamQuestionManualScore.js.map +1 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +10 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +1 -0
- package/dist/components/results/ResultsExamQuestionScoresContainer.js +12 -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 +21 -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 +18 -0
- package/dist/components/results/ResultsExamSection.js.map +1 -0
- package/dist/components/results/ResultsMultiLineAnswer.d.ts +8 -0
- package/dist/components/results/ResultsMultiLineAnswer.d.ts.map +1 -0
- package/dist/components/results/ResultsMultiLineAnswer.js +19 -0
- package/dist/components/results/ResultsMultiLineAnswer.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 +23 -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 +50 -0
- package/dist/components/results/ResultsTextAnswer.js.map +1 -0
- 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 +11 -0
- package/dist/components/results/helpers.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/main-bundle.js +9 -17
- package/dist/main.css +1 -1
- package/dist/types/GradingStructure.d.ts +1 -0
- package/dist/types/GradingStructure.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/components/grading-instructions/RecordingTitle.d.ts +0 -5
- package/dist/components/grading-instructions/RecordingTitle.d.ts.map +0 -1
- package/dist/components/grading-instructions/RecordingTitle.js +0 -11
- package/dist/components/grading-instructions/RecordingTitle.js.map +0 -1
- package/dist/components/shared/ImageTitle.d.ts +0 -5
- package/dist/components/shared/ImageTitle.d.ts.map +0 -1
- package/dist/components/shared/ImageTitle.js +0 -7
- package/dist/components/shared/ImageTitle.js.map +0 -1
@@ -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,EAEL,iBAAiB,EAEjB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,KAAK,EACN,MAAM,OAAO,CAAA;AAEd,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,GAClD,MAAM,CAMR;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,GAC1C,MAAM,CAgCR"}
|
@@ -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":[],"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CAAC,UAAkB,EAAE,EAAE;;QAC/C,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;QAC3C,OAAO,KAAK;YACV,CAAC,CAAC,CAAA,MAAA,CAAC,KAAK,CAAC,UAAU,EAAE,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,0CAAE,KAAK,KAAI,CAAC;YAC/G,CAAC,CAAC,CAAC,CAAA;IACP,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CACpB,mBAAmB,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAClD,MAAM,UAAU,GAAG,mBAAmB,CAAC,MAAM,EAAE,aAAa,CAAE,CAAA;QAC9D,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,CAAA;QAC5C,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,CAAC,CAAA;SACT;QACD,IAAI,YAAY,CAAC,IAAI,KAAK,QAAQ,EAAE;YAClC,OAAO,mBAAmB,CAAC,UAAU,EAAE,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, renderChildNodes }: 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,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAUjE,iBAAS,qBAAqB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,sBAsD/E;;AAED,wBAAgD"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import * as _ from 'lodash-es';
|
3
|
+
import React, { useContext } from 'react';
|
4
|
+
import { findChildElement, getNumericAttribute } from '../../dom-utils';
|
5
|
+
import { useExamTranslation } from '../../i18n';
|
6
|
+
import { shortDisplayNumber } from '../../shortDisplayNumber';
|
7
|
+
import { intersperse } from '../../utils';
|
8
|
+
import { QuestionContext } from '../QuestionContext';
|
9
|
+
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
10
|
+
import { findMultiChoiceFromGradingStructure, ResultsContext } from './ResultsContext';
|
11
|
+
import ResultsExamQuestionAutoScore from './ResultsExamQuestionAutoScore';
|
12
|
+
function ResultsDropdownAnswer({ element, renderChildNodes }) {
|
13
|
+
const { t } = useExamTranslation();
|
14
|
+
const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
|
15
|
+
const { answers } = useContext(QuestionContext);
|
16
|
+
const questionId = getNumericAttribute(element, 'question-id');
|
17
|
+
const answer = answersByQuestionId[questionId];
|
18
|
+
const selectedOption = findChildElement(element, (childElement) => (answer === null || answer === void 0 ? void 0 : answer.value) === childElement.getAttribute('option-id'));
|
19
|
+
const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
|
20
|
+
if (selectedOption) {
|
21
|
+
const correctIds = choice.options.filter((o) => o.correct).map((o) => o.id);
|
22
|
+
const correctOptions = Array.from(element.children).filter((childElement) => correctIds.includes(getNumericAttribute(childElement, 'option-id')));
|
23
|
+
const isAnswerCorrect = correctIds.includes(getNumericAttribute(selectedOption, 'option-id'));
|
24
|
+
const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
|
25
|
+
const scoreValue = answer && choice.options.find((option) => option.id === Number(answer.value)).score;
|
26
|
+
const maxScore = getNumericAttribute(element, 'max-score');
|
27
|
+
return (React.createElement(React.Fragment, null,
|
28
|
+
answers.length > 1 && React.createElement("sup", null, displayNumber),
|
29
|
+
React.createElement("span", { className: classNames('e-dropdown-answer__answered', {
|
30
|
+
'e-dropdown-answer__answered--correct': isAnswerCorrect,
|
31
|
+
'e-dropdown-answer__answered--wrong': !isAnswerCorrect,
|
32
|
+
}) },
|
33
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
|
34
|
+
renderChildNodes(selectedOption),
|
35
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end')),
|
36
|
+
isAnswerCorrect && React.createElement(ScreenReaderOnly, null, t('screen-reader.correct-answer'))),
|
37
|
+
!isAnswerCorrect && (React.createElement("span", { className: "e-dropdown-answer__correct", "aria-hidden": true }, intersperse(', ', _.flatMap(correctOptions, _.unary(renderChildNodes))))),
|
38
|
+
scoreValue != null && (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber }))));
|
39
|
+
}
|
40
|
+
return null;
|
41
|
+
}
|
42
|
+
export default React.memo(ResultsDropdownAnswer);
|
43
|
+
//# sourceMappingURL=ResultsDropdownAnswer.js.map
|
@@ -0,0 +1 @@
|
|
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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B,CACvF;YACN,CAAC,eAAe,IAAI,CACnB,8BAAM,SAAS,EAAC,4BAA4B,iBAAc,IAAI,IAC3D,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAqB,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CACvF,CACR;YACA,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"}
|
@@ -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,eAU1G;;AAED,wBAAuD"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { useExamTranslation } from '../../i18n';
|
3
|
+
import { QuestionContext } from '../QuestionContext';
|
4
|
+
import ResultsExamQuestionScoresContainer from './ResultsExamQuestionScoresContainer';
|
5
|
+
function ResultsExamQuestionAutoScore({ score, maxScore, displayNumber }) {
|
6
|
+
const { answers } = useContext(QuestionContext);
|
7
|
+
const { t } = useExamTranslation();
|
8
|
+
const containerProps = { answers, displayNumber };
|
9
|
+
return (React.createElement(ResultsExamQuestionScoresContainer, Object.assign({}, containerProps),
|
10
|
+
typeof score === 'number' ? React.createElement("b", null, score) : React.createElement("div", { className: "e-result-scorecount-empty" }),
|
11
|
+
' ',
|
12
|
+
maxScore ? `/ ${maxScore} ` : null,
|
13
|
+
" ",
|
14
|
+
t('points')));
|
15
|
+
}
|
16
|
+
export default React.memo(ResultsExamQuestionAutoScore);
|
17
|
+
//# 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,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,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,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,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;;QAAG,CAAC,CAAC,QAAQ,CAAC,CACd,CACtC,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Score } from '../..';
|
3
|
+
export interface ResultsExamQuestionManualScoreProps {
|
4
|
+
scores?: Score;
|
5
|
+
maxScore?: number;
|
6
|
+
displayNumber?: string;
|
7
|
+
multilineAnswer?: boolean;
|
8
|
+
}
|
9
|
+
declare function ResultsExamQuestionManualScore({ scores, maxScore, displayNumber, multilineAnswer, }: ResultsExamQuestionManualScoreProps): JSX.Element;
|
10
|
+
declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionManualScore>;
|
11
|
+
export default _default;
|
12
|
+
//# 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;AACzC,OAAO,EAAoD,KAAK,EAAE,MAAM,OAAO,CAAA;AAK/E,MAAM,WAAW,mCAAmC;IAClD,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAQD,iBAAS,8BAA8B,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,aAAa,EACb,eAAe,GAChB,EAAE,mCAAmC,eAiBrC;;AAoFD,wBAAyD"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import React, { useContext } from 'react';
|
3
|
+
import { useExamTranslation } from '../../i18n';
|
4
|
+
import { QuestionContext } from '../QuestionContext';
|
5
|
+
import ResultsExamQuestionScoresContainer from './ResultsExamQuestionScoresContainer';
|
6
|
+
function ResultsExamQuestionManualScore({ scores, maxScore, displayNumber, multilineAnswer, }) {
|
7
|
+
var _a, _b, _c, _d, _e;
|
8
|
+
const { answers } = useContext(QuestionContext);
|
9
|
+
const containerProps = { answers, displayNumber, multilineAnswer };
|
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), ((_c = scores === null || scores === void 0 ? void 0 : scores.pregrading) === null || _c === void 0 ? void 0 : _c.score) == null && !((_e = (_d = scores === null || scores === void 0 ? void 0 : scores.censoring) === null || _d === void 0 ? void 0 : _d.scores) === null || _e === void 0 ? void 0 : _e.length) ? (React.createElement(NoPregrading, Object.assign({}, { maxScore }))) : (React.createElement(React.Fragment, null,
|
12
|
+
renderNormalizedScores(scores, maxScore),
|
13
|
+
shortCode && React.createElement(NonAnswer, { shortCode: shortCode })))));
|
14
|
+
}
|
15
|
+
function renderNormalizedScores(scores, maxScore) {
|
16
|
+
const normalizedScores = [
|
17
|
+
scores.inspection && normalizeInspectionScore(scores.inspection),
|
18
|
+
...(scores.censoring ? normalizeCensoringScores(scores.censoring) : []),
|
19
|
+
scores.pregrading && normalizePregradingScore(scores.pregrading),
|
20
|
+
].filter(Boolean);
|
21
|
+
return normalizedScores.map((score, i) => React.createElement(ScoreRow, Object.assign({ key: i }, score, { latest: i === 0, maxScore: maxScore })));
|
22
|
+
}
|
23
|
+
function NoPregrading({ maxScore }) {
|
24
|
+
const { t } = useExamTranslation();
|
25
|
+
return (React.createElement(React.Fragment, null,
|
26
|
+
React.createElement("span", { className: "e-result-scorecount-empty" }),
|
27
|
+
maxScore && ` / ${maxScore} `,
|
28
|
+
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-darkgrey 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" }, type)));
|
43
|
+
}
|
44
|
+
function ScoreColumn({ className, children }) {
|
45
|
+
return React.createElement("span", { className: classNames('e-mrg-r-1 e-nowrap', className) }, children);
|
46
|
+
}
|
47
|
+
function normalizePregradingScore({ score }) {
|
48
|
+
return score !== undefined ? { score, shortCode: '', type: 'va' } : null;
|
49
|
+
}
|
50
|
+
function normalizeCensoringScores(score) {
|
51
|
+
return score.scores.map((s, i) => ({
|
52
|
+
score: s.score,
|
53
|
+
shortCode: s.shortCode || '',
|
54
|
+
type: `${score.scores.length - i}.s`,
|
55
|
+
}));
|
56
|
+
}
|
57
|
+
function normalizeInspectionScore(score) {
|
58
|
+
return { score: score.score, shortCode: score.shortCodes ? score.shortCodes.join(', ') : '', type: 'ta' };
|
59
|
+
}
|
60
|
+
export default React.memo(ResultsExamQuestionManualScore);
|
61
|
+
//# 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;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,kCAAkC,MAAM,sCAAsC,CAAA;AAerF,SAAS,8BAA8B,CAAC,EACtC,MAAM,EACN,QAAQ,EACR,aAAa,EACb,eAAe,GACqB;;IACpC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,cAAc,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAA;IAClE,MAAM,SAAS,GAAG,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,gBAAgB,0CAAE,SAAS,CAAA;IAEhE,OAAO,CACL,oBAAC,kCAAkC,oBAAK,cAAc,GACnD,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,0CAAE,KAAK,KAAI,IAAI,IAAI,CAAC,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,MAAM,0CAAE,MAAM,CAAA,CAAC,CAAC,CAAC,CACzE,oBAAC,YAAY,oBAAK,EAAE,QAAQ,EAAE,EAAI,CACnC,CAAC,CAAC,CAAC,CACF;QACG,sBAAsB,CAAC,MAAM,EAAE,QAAQ,CAAC;QACxC,SAAS,IAAI,oBAAC,SAAS,IAAC,SAAS,EAAE,SAAS,GAAI,CAChD,CACJ,CACkC,CACtC,CAAA;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAa,EAAE,QAAiB;I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AAI,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,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare function ResultsExamQuestionScoresContainer({ answers, displayNumber, children, multilineAnswer, }: {
|
3
|
+
answers: Element[];
|
4
|
+
displayNumber?: string;
|
5
|
+
children: React.ReactNode;
|
6
|
+
multilineAnswer?: boolean;
|
7
|
+
}): JSX.Element;
|
8
|
+
declare const _default: React.MemoExoticComponent<typeof ResultsExamQuestionScoresContainer>;
|
9
|
+
export default _default;
|
10
|
+
//# 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;AAGzB,iBAAS,kCAAkC,CAAC,EAC1C,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,GAChB,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,eAiBA;;AAED,wBAA6D"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import classnames from 'classnames';
|
3
|
+
function ResultsExamQuestionScoresContainer({ answers, displayNumber, children, multilineAnswer, }) {
|
4
|
+
return (React.createElement("div", { className: classnames('e-result-scorecount', 'e-float-right', {
|
5
|
+
'e-result-scorecount-multiline-answer': multilineAnswer,
|
6
|
+
}) },
|
7
|
+
React.createElement("div", { className: "e-result-scorecount-border-wrap" },
|
8
|
+
answers.length > 1 && displayNumber && (React.createElement("sup", { className: "e-result-scorecount-sup e-mrg-r-1", "aria-hidden": "true" }, displayNumber)),
|
9
|
+
children)));
|
10
|
+
}
|
11
|
+
export default React.memo(ResultsExamQuestionScoresContainer);
|
12
|
+
//# 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;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,SAAS,kCAAkC,CAAC,EAC1C,OAAO,EACP,aAAa,EACb,QAAQ,EACR,eAAe,GAMhB;IACC,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,eAAe,EAAE;YAC5D,sCAAsC,EAAE,eAAe;SACxD,CAAC;QAEF,6BAAK,SAAS,EAAC,iCAAiC;YAC7C,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,IAAI,CACtC,6BAAK,SAAS,EAAC,mCAAmC,iBAAa,MAAM,IAClE,aAAa,CACV,CACP;YACA,QAAQ,CACL,CACF,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;AAGjE,iBAAS,wBAAwB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAwBlF;;AAED,wBAAmD"}
|
@@ -0,0 +1,21 @@
|
|
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
|
+
import { formatQuestionDisplayNumber } from '../../formatting';
|
7
|
+
function ResultsExamQuestionTitle({ element, renderChildNodes }) {
|
8
|
+
const { displayNumber, level, maxAnswers, childQuestions } = useContext(QuestionContext);
|
9
|
+
const Tag = `h${Math.min(3 + level, 6)}`;
|
10
|
+
return (React.createElement(React.Fragment, null,
|
11
|
+
React.createElement(Tag, { className: classNames('exam-question-title', { 'e-normal e-font-size-m': level > 0 }) },
|
12
|
+
React.createElement("strong", { className: classNames('exam-question-title__display-number', {
|
13
|
+
'exam-question-title__display-number--indented': level > 0,
|
14
|
+
}) }, formatQuestionDisplayNumber(displayNumber) + ' '),
|
15
|
+
renderChildNodes(element)),
|
16
|
+
maxAnswers != null && childQuestions.length > 0 && (React.createElement("p", { className: "e-italic" },
|
17
|
+
React.createElement(NotificationIcon, null),
|
18
|
+
React.createElement(AnsweringInstructions, Object.assign({}, { maxAnswers, childQuestions, type: 'question' }))))));
|
19
|
+
}
|
20
|
+
export default React.memo(ResultsExamQuestionTitle);
|
21
|
+
//# 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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ResultsExamSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;;AAkBjE,wBAAiE"}
|
@@ -0,0 +1,18 @@
|
|
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
|
+
import { sectionTitleId } from '../../ids';
|
7
|
+
function ResultsExamSection({ element, renderChildNodes }) {
|
8
|
+
const { displayNumber } = useContext(SectionContext);
|
9
|
+
const { answersByQuestionId } = useContext(ResultsContext);
|
10
|
+
const containsAnswers = query(element, (e) => {
|
11
|
+
const maybeQuestionId = e.getAttribute('question-id');
|
12
|
+
return maybeQuestionId != null && Object.prototype.hasOwnProperty.call(answersByQuestionId, maybeQuestionId);
|
13
|
+
});
|
14
|
+
return containsAnswers ? (React.createElement(Section, { "aria-labelledby": sectionTitleId(displayNumber) },
|
15
|
+
React.createElement("div", { className: "e-results-section-wrapper" }, renderChildNodes(element)))) : null;
|
16
|
+
}
|
17
|
+
export default React.memo(withSectionContext(ResultsExamSection));
|
18
|
+
//# sourceMappingURL=ResultsExamSection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsExamSection.js","sourceRoot":"","sources":["../../../src/components/results/ResultsExamSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,SAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACpD,MAAM,EAAE,mBAAmB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAC1D,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QAC3C,MAAM,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;QACrD,OAAO,eAAe,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAA;IAC9G,CAAC,CAAC,CAAA;IAEF,OAAO,eAAe,CAAC,CAAC,CAAC,CACvB,oBAAC,OAAO,uBAAkB,cAAc,CAAC,aAAa,CAAC;QACrD,6BAAK,SAAS,EAAC,2BAA2B,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAO,CACpE,CACX,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsMultiLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsMultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC3D,IAAI,EAAE,WAAW,GAAG,YAAY,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAuBA,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { useLayoutEffect, useRef } from 'react';
|
2
|
+
import { useExamTranslation } from '../../i18n';
|
3
|
+
import { renderAnnotations } from '../../renderAnnotations';
|
4
|
+
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
5
|
+
export const ResultsMultiLineAnswer = ({ type, score, value }) => {
|
6
|
+
const { t } = useExamTranslation();
|
7
|
+
const answerRef = useRef(null);
|
8
|
+
useLayoutEffect(() => {
|
9
|
+
var _a, _b, _c, _d;
|
10
|
+
if (answerRef.current) {
|
11
|
+
renderAnnotations(answerRef.current, (_b = (_a = score === null || score === void 0 ? void 0 : score.pregrading) === null || _a === void 0 ? void 0 : _a.annotations) !== null && _b !== void 0 ? _b : [], (_d = (_c = score === null || score === void 0 ? void 0 : score.censoring) === null || _c === void 0 ? void 0 : _c.annotations) !== null && _d !== void 0 ? _d : []);
|
12
|
+
}
|
13
|
+
});
|
14
|
+
return (React.createElement("div", { className: "e-multiline-results-text-answer e-line-height-l e-pad-l-2 e-mrg-b-1" },
|
15
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
|
16
|
+
type === 'rich-text' ? (React.createElement("div", { dangerouslySetInnerHTML: { __html: value || '' }, ref: answerRef })) : (React.createElement("div", { className: "e-pre-wrap", ref: answerRef }, value)),
|
17
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end'))));
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=ResultsMultiLineAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsMultiLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsMultiLineAnswer.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;AAEtD,MAAM,CAAC,MAAM,sBAAsB,GAI9B,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9B,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAE9C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC,CAAA;SAChH;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,qEAAqE;QAClF,oBAAC,gBAAgB,QAAE,CAAC,CAAC,4BAA4B,CAAC,CAAoB;QACrE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,CACtB,6BAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,GAAI,CAC1E,CAAC,CAAC,CAAC,CACF,6BAAK,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,SAAS,IACvC,KAAK,CACF,CACP;QACD,oBAAC,gBAAgB,QAAE,CAAC,CAAC,0BAA0B,CAAC,CAAoB,CAChE,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
+
declare function ResultsScoredTextAnswer({ element }: ExamComponentProps): JSX.Element;
|
4
|
+
declare const _default: React.MemoExoticComponent<typeof ResultsScoredTextAnswer>;
|
5
|
+
export default _default;
|
6
|
+
//# sourceMappingURL=ResultsScoredTextAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsScoredTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsScoredTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAOzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,uBAAuB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAmB/D;;AAED,wBAAkD"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { getNumericAttribute } from '../../dom-utils';
|
3
|
+
import { shortDisplayNumber } from '../../shortDisplayNumber';
|
4
|
+
import { QuestionContext } from '../QuestionContext';
|
5
|
+
import { findScore, ResultsContext } from './ResultsContext';
|
6
|
+
import ResultsExamQuestionAutoScore from './ResultsExamQuestionAutoScore';
|
7
|
+
import ResultsSingleLineAnswer from './ResultsSingleLineAnswer';
|
8
|
+
function ResultsScoredTextAnswer({ element }) {
|
9
|
+
var _a;
|
10
|
+
const { answers } = useContext(QuestionContext);
|
11
|
+
const { answersByQuestionId, scores } = useContext(ResultsContext);
|
12
|
+
const questionId = getNumericAttribute(element, 'question-id');
|
13
|
+
const maxScore = getNumericAttribute(element, 'max-score');
|
14
|
+
const answer = answersByQuestionId[questionId];
|
15
|
+
const value = answer && answer.value;
|
16
|
+
const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
|
17
|
+
const autogradingScore = (_a = findScore(scores, questionId)) === null || _a === void 0 ? void 0 : _a.autograding;
|
18
|
+
return (React.createElement(ResultsSingleLineAnswer, { answers: answers, displayNumber: displayNumber, value: value },
|
19
|
+
React.createElement(ResultsExamQuestionAutoScore, { score: autogradingScore === null || autogradingScore === void 0 ? void 0 : autogradingScore.score, maxScore: maxScore, displayNumber: answers.length > 1 ? displayNumber : undefined })));
|
20
|
+
}
|
21
|
+
export default React.memo(ResultsScoredTextAnswer);
|
22
|
+
//# sourceMappingURL=ResultsScoredTextAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsScoredTextAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsScoredTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,4BAA4B,MAAM,gCAAgC,CAAA;AACzE,OAAO,uBAAuB,MAAM,2BAA2B,CAAA;AAI/D,SAAS,uBAAuB,CAAC,EAAE,OAAO,EAAsB;;IAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IAClE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAE,CAAA;IAC3D,MAAM,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAA2B,CAAA;IACxE,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAA;IACpC,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC,CAAA;IACjF,MAAM,gBAAgB,GAAG,MAAA,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,0CAAE,WAAW,CAAA;IAEnE,OAAO,CACL,oBAAC,uBAAuB,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK;QACnF,oBAAC,4BAA4B,IAC3B,KAAK,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,EAC9B,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,GAC7D,CACsB,CAC3B,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Score } from '../..';
|
3
|
+
declare function ResultsSingleLineAnswer({ displayNumber, score, value, children, }: {
|
4
|
+
answers: Element[];
|
5
|
+
score?: Score;
|
6
|
+
displayNumber?: string;
|
7
|
+
value: string | undefined;
|
8
|
+
children: React.ReactNode;
|
9
|
+
}): JSX.Element;
|
10
|
+
declare const _default: React.MemoExoticComponent<typeof ResultsSingleLineAnswer>;
|
11
|
+
export default _default;
|
12
|
+
//# sourceMappingURL=ResultsSingleLineAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsSingleLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsSingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,iBAAS,uBAAuB,CAAC,EAC/B,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,eAuBA;;AAED,wBAAkD"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React, { useLayoutEffect, useRef } from 'react';
|
2
|
+
import { useExamTranslation } from '../../i18n';
|
3
|
+
import { renderAnnotations } from '../../renderAnnotations';
|
4
|
+
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
5
|
+
function ResultsSingleLineAnswer({ displayNumber, score, value, children, }) {
|
6
|
+
const { t } = useExamTranslation();
|
7
|
+
const answerRef = useRef(null);
|
8
|
+
useLayoutEffect(() => {
|
9
|
+
var _a, _b, _c, _d;
|
10
|
+
if (answerRef.current) {
|
11
|
+
renderAnnotations(answerRef.current, (_b = (_a = score === null || score === void 0 ? void 0 : score.pregrading) === null || _a === void 0 ? void 0 : _a.annotations) !== null && _b !== void 0 ? _b : [], (_d = (_c = score === null || score === void 0 ? void 0 : score.censoring) === null || _c === void 0 ? void 0 : _c.annotations) !== null && _d !== void 0 ? _d : []);
|
12
|
+
}
|
13
|
+
});
|
14
|
+
return (React.createElement(React.Fragment, null,
|
15
|
+
displayNumber && React.createElement("sup", null, displayNumber),
|
16
|
+
React.createElement("span", { className: "text-answer text-answer--single-line" },
|
17
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
|
18
|
+
React.createElement("span", { className: "e-inline-block", ref: answerRef }, value),
|
19
|
+
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end'))),
|
20
|
+
children));
|
21
|
+
}
|
22
|
+
export default React.memo(ResultsSingleLineAnswer);
|
23
|
+
//# sourceMappingURL=ResultsSingleLineAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsSingleLineAnswer.js","sourceRoot":"","sources":["../../../src/components/results/ResultsSingleLineAnswer.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;AAEtD,SAAS,uBAAuB,CAAC,EAC/B,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,GAOT;IACC,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAE/C,eAAe,CAAC,GAAG,EAAE;;QACnB,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,mCAAI,EAAE,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,WAAW,mCAAI,EAAE,CAAC,CAAA;SAChH;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,CACL;QACG,aAAa,IAAI,iCAAM,aAAa,CAAO;QAC5C,8BAAM,SAAS,EAAC,sCAAsC;YACpD,oBAAC,gBAAgB,QAAE,CAAC,CAAC,4BAA4B,CAAC,CAAoB;YACtE,8BAAM,SAAS,EAAC,gBAAgB,EAAC,GAAG,EAAE,SAAS,IAC5C,KAAK,CACD;YACP,oBAAC,gBAAgB,QAAE,CAAC,CAAC,0BAA0B,CAAC,CAAoB,CAC/D;QACN,QAAQ,CACR,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
+
declare function ResultsTextAnswer({ element }: ExamComponentProps): JSX.Element;
|
4
|
+
declare const _default: React.MemoExoticComponent<typeof ResultsTextAnswer>;
|
5
|
+
export default _default;
|
6
|
+
//# sourceMappingURL=ResultsTextAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ResultsTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/results/ResultsTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAWjE,iBAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAkDzD;;AAED,wBAA4C"}
|