@digabi/exam-engine-core 19.2.0 → 19.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/grading/AnnotationPopup.d.ts +11 -0
- package/dist/components/grading/AnnotationPopup.d.ts.map +1 -0
- package/dist/components/grading/AnnotationPopup.js +20 -0
- package/dist/components/grading/AnnotationPopup.js.map +1 -0
- package/dist/components/grading/AnswerWithAnnotations.d.ts +11 -0
- package/dist/components/grading/AnswerWithAnnotations.d.ts.map +1 -0
- package/dist/components/grading/AnswerWithAnnotations.js +15 -0
- package/dist/components/grading/AnswerWithAnnotations.js.map +1 -0
- package/dist/components/grading/ChoiceAnswer.d.ts +6 -0
- package/dist/components/grading/ChoiceAnswer.d.ts.map +1 -0
- package/dist/components/grading/ChoiceAnswer.js +57 -0
- package/dist/components/grading/ChoiceAnswer.js.map +1 -0
- package/dist/components/grading/DropdownAnswer.d.ts +6 -0
- package/dist/components/grading/DropdownAnswer.d.ts.map +1 -0
- package/dist/components/grading/DropdownAnswer.js +43 -0
- package/dist/components/grading/DropdownAnswer.js.map +1 -0
- package/dist/components/grading/Grading.d.ts +4 -0
- package/dist/components/grading/Grading.d.ts.map +1 -0
- package/dist/components/grading/Grading.js +81 -0
- package/dist/components/grading/Grading.js.map +1 -0
- package/dist/components/grading/GradingAnswer.d.ts.map +1 -1
- package/dist/components/grading/GradingAnswer.js +1 -0
- package/dist/components/grading/GradingAnswer.js.map +1 -1
- package/dist/components/grading/MultiLineAnswer.d.ts +14 -0
- package/dist/components/grading/MultiLineAnswer.d.ts.map +1 -0
- package/dist/components/grading/MultiLineAnswer.js +61 -0
- package/dist/components/grading/MultiLineAnswer.js.map +1 -0
- package/dist/components/grading/Question.d.ts +5 -0
- package/dist/components/grading/Question.d.ts.map +1 -0
- package/dist/components/grading/Question.js +23 -0
- package/dist/components/grading/Question.js.map +1 -0
- package/dist/components/grading/QuestionTitle.d.ts +6 -0
- package/dist/components/grading/QuestionTitle.d.ts.map +1 -0
- package/dist/components/grading/QuestionTitle.js +21 -0
- package/dist/components/grading/QuestionTitle.js.map +1 -0
- package/dist/components/grading/Results.d.ts +15 -0
- package/dist/components/grading/Results.d.ts.map +1 -0
- package/dist/components/grading/Results.js +77 -0
- package/dist/components/grading/Results.js.map +1 -0
- package/dist/components/grading/ScoredTextAnswer.d.ts +6 -0
- package/dist/components/grading/ScoredTextAnswer.d.ts.map +1 -0
- package/dist/components/grading/ScoredTextAnswer.js +22 -0
- package/dist/components/grading/ScoredTextAnswer.js.map +1 -0
- package/dist/components/grading/Section.d.ts +5 -0
- package/dist/components/grading/Section.d.ts.map +1 -0
- package/dist/components/grading/Section.js +18 -0
- package/dist/components/grading/Section.js.map +1 -0
- package/dist/components/grading/SingleLineAnswer.d.ts +12 -0
- package/dist/components/grading/SingleLineAnswer.d.ts.map +1 -0
- package/dist/components/grading/SingleLineAnswer.js +23 -0
- package/dist/components/grading/SingleLineAnswer.js.map +1 -0
- package/dist/components/grading/TextAnswer.d.ts +7 -0
- package/dist/components/grading/TextAnswer.d.ts.map +1 -0
- package/dist/components/grading/TextAnswer.js +53 -0
- package/dist/components/grading/TextAnswer.js.map +1 -0
- package/dist/components/grading/editAnnotations.d.ts.map +1 -1
- package/dist/components/grading/editAnnotations.js +1 -2
- package/dist/components/grading/editAnnotations.js.map +1 -1
- package/dist/components/grading/internal/AnnotationList.d.ts +5 -0
- package/dist/components/grading/internal/AnnotationList.d.ts.map +1 -0
- package/dist/components/grading/internal/AnnotationList.js +43 -0
- package/dist/components/grading/internal/AnnotationList.js.map +1 -0
- package/dist/components/grading/internal/QuestionAutoScore.d.ts +10 -0
- package/dist/components/grading/internal/QuestionAutoScore.d.ts.map +1 -0
- package/dist/components/grading/internal/QuestionAutoScore.js +17 -0
- package/dist/components/grading/internal/QuestionAutoScore.js.map +1 -0
- package/dist/components/grading/internal/QuestionManualScore.d.ts +12 -0
- package/dist/components/grading/internal/QuestionManualScore.d.ts.map +1 -0
- package/dist/components/grading/internal/QuestionManualScore.js +61 -0
- package/dist/components/grading/internal/QuestionManualScore.js.map +1 -0
- package/dist/components/grading/internal/QuestionScoresContainer.d.ts +10 -0
- package/dist/components/grading/internal/QuestionScoresContainer.d.ts.map +1 -0
- package/dist/components/grading/internal/QuestionScoresContainer.js +12 -0
- package/dist/components/grading/internal/QuestionScoresContainer.js.map +1 -0
- package/dist/components/grading/largeImageDetector.js +1 -1
- package/dist/components/grading/largeImageDetector.js.map +1 -1
- package/dist/components/grading/largeImageResizer.d.ts +2 -0
- package/dist/components/grading/largeImageResizer.d.ts.map +1 -0
- package/dist/components/grading/largeImageResizer.js +33 -0
- package/dist/components/grading/largeImageResizer.js.map +1 -0
- package/dist/components/results/Results2.d.ts +15 -0
- package/dist/components/results/Results2.d.ts.map +1 -0
- package/dist/components/results/Results2.js +79 -0
- package/dist/components/results/Results2.js.map +1 -0
- package/dist/components/shared/AnnotationListComponent.d.ts +1 -0
- package/dist/components/shared/AnnotationListComponent.d.ts.map +1 -0
- package/dist/components/shared/AnnotationListComponent.js +2 -0
- package/dist/components/shared/AnnotationListComponent.js.map +1 -0
- package/dist/editAnnotations.d.ts +2 -0
- package/dist/editAnnotations.d.ts.map +1 -0
- package/dist/editAnnotations.js +8 -0
- package/dist/editAnnotations.js.map +1 -0
- package/dist/editAnnotationsOld.d.ts +3 -0
- package/dist/editAnnotationsOld.d.ts.map +1 -0
- package/dist/editAnnotationsOld.js +340 -0
- package/dist/editAnnotationsOld.js.map +1 -0
- package/dist/main-bundle.js +1 -1
- package/dist/main.css +1 -1
- package/dist/renderAnnotations.d.ts.map +1 -1
- package/dist/renderAnnotations.js +22 -18
- package/dist/renderAnnotations.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/grading-instructions/GradingInstructionsElements.d.ts +0 -3
- package/dist/components/grading-instructions/GradingInstructionsElements.d.ts.map +0 -1
- package/dist/components/grading-instructions/GradingInstructionsElements.js +0 -14
- package/dist/components/grading-instructions/GradingInstructionsElements.js.map +0 -1
- package/dist/gradingInstructionsElements.d.ts +0 -3
- package/dist/gradingInstructionsElements.d.ts.map +0 -1
- package/dist/gradingInstructionsElements.js +0 -14
- package/dist/gradingInstructionsElements.js.map +0 -1
@@ -0,0 +1,77 @@
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
2
|
+
import { I18nextProvider } from 'react-i18next';
|
3
|
+
import { createRenderChildNodes } from '../../createRenderChildNodes';
|
4
|
+
import { findChildElement, queryAncestors } from '../../dom-utils';
|
5
|
+
import { changeLanguage, initI18n, useExamTranslation } from '../../i18n';
|
6
|
+
import { scrollToHash } from '../../scrollToHash';
|
7
|
+
import { useCached } from '../../useCached';
|
8
|
+
import mkAttachmentLink from '../shared/AttachmentLink';
|
9
|
+
import mkAttachmentLinks from '../shared/AttachmentLinks';
|
10
|
+
import { CommonExamContext, withCommonExamContext } from '../context/CommonExamContext';
|
11
|
+
import DocumentTitle from '../DocumentTitle';
|
12
|
+
import ExamQuestionInstruction from '../exam/QuestionInstruction';
|
13
|
+
import ExamSectionTitle from '../exam/SectionTitle';
|
14
|
+
import Formula from '../shared/Formula';
|
15
|
+
import Image from '../shared/Image';
|
16
|
+
import RenderChildNodes from '../RenderChildNodes';
|
17
|
+
import { renderIf } from '../RenderIf';
|
18
|
+
import ResultsChoiceAnswer from './ChoiceAnswer';
|
19
|
+
import { ResultsContext, withResultsContext } from '../context/ResultsContext';
|
20
|
+
import DropdownAnswer from './DropdownAnswer';
|
21
|
+
import Question from './Question';
|
22
|
+
import QuestionTitle from './QuestionTitle';
|
23
|
+
import Section from './Section';
|
24
|
+
import ScoredTextAnswer from './ScoredTextAnswer';
|
25
|
+
import TextAnswer from './TextAnswer';
|
26
|
+
const renderChildNodes = createRenderChildNodes({
|
27
|
+
attachment: RenderChildNodes,
|
28
|
+
'attachment-link': mkAttachmentLink('plain'),
|
29
|
+
'attachment-links': mkAttachmentLinks('plain'),
|
30
|
+
'audio-group': RenderChildNodes,
|
31
|
+
'choice-answer': ResultsChoiceAnswer,
|
32
|
+
'dropdown-answer': DropdownAnswer,
|
33
|
+
formula: Formula,
|
34
|
+
question: Question,
|
35
|
+
hints: RenderChildNodes,
|
36
|
+
image: renderIf(({ element }) => queryAncestors(element, 'choice-answer') != null)(Image),
|
37
|
+
'question-instruction': ExamQuestionInstruction,
|
38
|
+
'question-title': QuestionTitle,
|
39
|
+
section: Section,
|
40
|
+
'section-title': ExamSectionTitle,
|
41
|
+
'text-answer': TextAnswer,
|
42
|
+
'scored-text-answer': ScoredTextAnswer,
|
43
|
+
'scored-text-answers': RenderChildNodes,
|
44
|
+
});
|
45
|
+
const Results = () => {
|
46
|
+
const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
|
47
|
+
const examTitle = findChildElement(root, 'exam-title');
|
48
|
+
const examStylesheet = root.getAttribute('exam-stylesheet');
|
49
|
+
const i18n = useCached(() => initI18n(language, examCode, dayCode));
|
50
|
+
useEffect(changeLanguage(i18n, language));
|
51
|
+
useEffect(scrollToHash, []);
|
52
|
+
return (React.createElement(I18nextProvider, { i18n: i18n },
|
53
|
+
React.createElement("main", { className: "e-exam", lang: subjectLanguage },
|
54
|
+
React.createElement(React.StrictMode, null),
|
55
|
+
examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
|
56
|
+
React.createElement("div", { className: "e-columns e-columns--bottom-v e-mrg-b-4" },
|
57
|
+
examTitle && (React.createElement(DocumentTitle, { id: "title", className: "e-column e-mrg-b-0" },
|
58
|
+
renderChildNodes(examTitle),
|
59
|
+
date && ', ' + dateTimeFormatter.format(date))),
|
60
|
+
React.createElement(ScoresAndFinalGrade, null)),
|
61
|
+
renderChildNodes(root))));
|
62
|
+
};
|
63
|
+
function ScoresAndFinalGrade() {
|
64
|
+
const { gradingText, totalScore } = useContext(ResultsContext);
|
65
|
+
const { t } = useExamTranslation();
|
66
|
+
return (React.createElement("div", { className: "e-column--narrow" },
|
67
|
+
React.createElement("table", { className: "e-table e-table--borderless e-mrg-b-0" },
|
68
|
+
React.createElement("tbody", null,
|
69
|
+
React.createElement("tr", null,
|
70
|
+
React.createElement("th", { className: "e-pad-y-0 e-normal" }, t('grading-total')),
|
71
|
+
React.createElement("td", { className: "e-pad-y-0 e-semibold e-text-right" }, t('points', { count: totalScore }))),
|
72
|
+
gradingText && (React.createElement("tr", null,
|
73
|
+
React.createElement("th", { className: "e-pad-y-0 e-normal" }, t('grade')),
|
74
|
+
React.createElement("td", { className: "e-pad-y-0 e-semibold e-text-right" }, gradingText)))))));
|
75
|
+
}
|
76
|
+
export default React.memo(withResultsContext(withCommonExamContext(Results)));
|
77
|
+
//# sourceMappingURL=Results.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Results.js","sourceRoot":"","sources":["../../../src/components/grading/Results.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,gBAAgB,MAAM,0BAA0B,CAAA;AACvD,OAAO,iBAAiB,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACvF,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAE5C,OAAO,uBAAuB,MAAM,6BAA6B,CAAA;AACjE,OAAO,gBAAgB,MAAM,sBAAsB,CAAA;AACnD,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,KAA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6BAAK,SAAS,EAAC,kBAAkB;QAC/B,+BAAO,SAAS,EAAC,uCAAuC;YACtD;gBACE;oBACE,4BAAI,SAAS,EAAC,oBAAoB,IAAE,CAAC,CAAC,eAAe,CAAC,CAAM;oBAC5D,4BAAI,SAAS,EAAC,mCAAmC,IAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAM,CACxF;gBACJ,WAAW,IAAI,CACd;oBACE,4BAAI,SAAS,EAAC,oBAAoB,IAAE,CAAC,CAAC,OAAO,CAAC,CAAM;oBACpD,4BAAI,SAAS,EAAC,mCAAmC,IAAE,WAAW,CAAM,CACjE,CACN,CACK,CACF,CACJ,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
+
declare function ScoredTextAnswer({ element }: ExamComponentProps): JSX.Element;
|
4
|
+
declare const _default: React.MemoExoticComponent<typeof ScoredTextAnswer>;
|
5
|
+
export default _default;
|
6
|
+
//# sourceMappingURL=ScoredTextAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ScoredTextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/ScoredTextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAOzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAmBxD;;AAED,wBAA2C"}
|
@@ -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 '../context/QuestionContext';
|
5
|
+
import { findScore, ResultsContext } from '../context/ResultsContext';
|
6
|
+
import ResultsExamQuestionAutoScore from './internal/QuestionAutoScore';
|
7
|
+
import ResultsSingleLineAnswer from './SingleLineAnswer';
|
8
|
+
function ScoredTextAnswer({ 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(ScoredTextAnswer);
|
22
|
+
//# sourceMappingURL=ScoredTextAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ScoredTextAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/ScoredTextAnswer.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,4BAA4B,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,4BAA4B,M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,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;;AAkBjE,wBAAsD"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { query } from '../../dom-utils';
|
3
|
+
import SectionElement from '../SectionElement';
|
4
|
+
import { SectionContext, withSectionContext } from '../context/SectionContext';
|
5
|
+
import { ResultsContext } from '../context/ResultsContext';
|
6
|
+
import { sectionTitleId } from '../../ids';
|
7
|
+
function Section({ 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(SectionElement, { "aria-labelledby": sectionTitleId(displayNumber) },
|
15
|
+
React.createElement("div", { className: "e-results-section-wrapper" }, renderChildNodes(element)))) : null;
|
16
|
+
}
|
17
|
+
export default React.memo(withSectionContext(Section));
|
18
|
+
//# sourceMappingURL=Section.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../src/components/grading/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,SAAS,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IAChE,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,cAAc,uBAAkB,cAAc,CAAC,aAAa,CAAC;QAC5D,6BAAK,SAAS,EAAC,2BAA2B,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAO,CAC7D,CAClB,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Score } from '../..';
|
3
|
+
declare function SingleLineAnswer({ 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 SingleLineAnswer>;
|
11
|
+
export default _default;
|
12
|
+
//# sourceMappingURL=SingleLineAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SingleLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/SingleLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,iBAAS,gBAAgB,CAAC,EACxB,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,wBAA2C"}
|
@@ -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 SingleLineAnswer({ 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(SingleLineAnswer);
|
23
|
+
//# sourceMappingURL=SingleLineAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SingleLineAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/SingleLineAnswer.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,gBAAgB,CAAC,EACxB,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,gBAAgB,CAAC,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TextAnswer } from '../..';
|
3
|
+
import { ExamComponentProps } from '../../createRenderChildNodes';
|
4
|
+
declare function TextAnswer({ element }: ExamComponentProps): JSX.Element;
|
5
|
+
declare const _default: React.MemoExoticComponent<typeof TextAnswer>;
|
6
|
+
export default _default;
|
7
|
+
//# sourceMappingURL=TextAnswer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/TextAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAYjE,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eAoDlD;;AAED,wBAAqC"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { getNumericAttribute } from '../../dom-utils';
|
3
|
+
import { useExamTranslation } from '../../i18n';
|
4
|
+
import { shortDisplayNumber } from '../../shortDisplayNumber';
|
5
|
+
import AnswerToolbar from '../AnswerToolbar';
|
6
|
+
import { QuestionContext } from '../context/QuestionContext';
|
7
|
+
import { findScore, ResultsContext } from '../context/ResultsContext';
|
8
|
+
import AnswerLengthInfo from '../shared/AnswerLengthInfo';
|
9
|
+
import ResultsExamQuestionManualScore from './internal/QuestionManualScore';
|
10
|
+
import { MultiLineAnswer } from './MultiLineAnswer';
|
11
|
+
import ResultsSingleLineAnswer from './SingleLineAnswer';
|
12
|
+
function TextAnswer({ element }) {
|
13
|
+
var _a;
|
14
|
+
const { answers } = useContext(QuestionContext);
|
15
|
+
const { answersByQuestionId, scores } = useContext(ResultsContext);
|
16
|
+
const { t } = useExamTranslation();
|
17
|
+
const questionId = getNumericAttribute(element, 'question-id');
|
18
|
+
const maxScore = getNumericAttribute(element, 'max-score');
|
19
|
+
const answer = answersByQuestionId[questionId];
|
20
|
+
const value = answer && answer.value;
|
21
|
+
const displayNumber = answers.length > 1 ? shortDisplayNumber(element.getAttribute('display-number')) : undefined;
|
22
|
+
const score = findScore(scores, questionId);
|
23
|
+
const comment = (_a = score === null || score === void 0 ? void 0 : score.pregrading) === null || _a === void 0 ? void 0 : _a.comment;
|
24
|
+
const type = (element.getAttribute('type') || 'single-line');
|
25
|
+
const maxLength = getNumericAttribute(element, 'max-length');
|
26
|
+
switch (type) {
|
27
|
+
case 'rich-text':
|
28
|
+
case 'multi-line': {
|
29
|
+
return (React.createElement(React.Fragment, null,
|
30
|
+
maxLength != null && React.createElement(AnswerLengthInfo, { ...{ maxLength } }),
|
31
|
+
React.createElement(ResultsExamQuestionManualScore, { multilineAnswer: true, scores: score, maxScore: maxScore }),
|
32
|
+
React.createElement(MultiLineAnswer, { ...{ type, value, score } }),
|
33
|
+
React.createElement(AnswerToolbar, { ...{
|
34
|
+
answer,
|
35
|
+
element,
|
36
|
+
} }),
|
37
|
+
comment && (React.createElement(React.Fragment, null,
|
38
|
+
React.createElement("h5", null, t('comment')),
|
39
|
+
React.createElement("p", { className: "e-italic" }, comment)))));
|
40
|
+
}
|
41
|
+
case 'single-line':
|
42
|
+
default:
|
43
|
+
return (React.createElement(ResultsSingleLineAnswer, { ...{
|
44
|
+
answers,
|
45
|
+
score,
|
46
|
+
displayNumber,
|
47
|
+
value,
|
48
|
+
} },
|
49
|
+
React.createElement(ResultsExamQuestionManualScore, { ...{ scores: score, maxScore, displayNumber } })));
|
50
|
+
}
|
51
|
+
}
|
52
|
+
export default React.memo(TextAnswer);
|
53
|
+
//# sourceMappingURL=TextAnswer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/TextAn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3,"file":"editAnnotations.d.ts","sourceRoot":"","sources":["../../../src/components/grading/editAnnotations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;;;EAgB5E;AAED,wBAAgB,sBAAsB,CAAC,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAGrG;AACD,wBAAgB,yCAAyC,CACvD,kBAAkB,EAAE,cAAc,EAAE,EACpC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,UAIf;AACD,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,sBAEtC;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,cAAc,WAAW,GAAG,IAAI,EAAE,CAQzE;AAED,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,QAczG;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CAqCrD;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,KAAK,WAM1D;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,gBA0BzG;AAqBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,
|
1
|
+
{"version":3,"file":"editAnnotations.d.ts","sourceRoot":"","sources":["../../../src/components/grading/editAnnotations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,uBAAuB,CAAC,c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CAAC,cAAc,EAAE,UAAU,CAAC,EAC/C,KAAK,EAAE,gBAAgB,GACtB,kBAAkB,CAUpB"}
|
@@ -124,8 +124,7 @@ function getOverlappingAnnotations(annotations, newAnnotation) {
|
|
124
124
|
}
|
125
125
|
export function getImageStartIndex($image, $answerText) {
|
126
126
|
const range = document.createRange();
|
127
|
-
|
128
|
-
range.selectNode(referenceNode);
|
127
|
+
range.selectNode($image);
|
129
128
|
return textAnnotationFromRange($answerText, range).startIndex;
|
130
129
|
}
|
131
130
|
export function annotationFromMousePosition(e, { bbox, attachmentIndex, startX, startY, clientX, clientY }) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"editAnnotations.js","sourceRoot":"","sources":["../../../src/components/grading/editAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAI9B,MAAM,UAAU,uBAAuB,CAAC,cAAuB,EAAE,KAAY;IAC3E,MAAM,WAAW,GAAG,aAAa,CAAC,cAAc,CAAC,CAAA;IACjD,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAC3F,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IACzF,OAAO;QACL,UAAU,EAAE,gBAAgB;QAC5B,MAAM,EAAE,kBAAkB,GAAG,gBAAgB;KAC9C,CAAA;IAED,SAAS,yBAAyB,CAAC,cAAoB,EAAE,MAAc;QACrE,MAAM,cAAc,GAAG,cAAc,KAAK,cAAc,CAAA;QACxD,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAA;QACrF,MAAM,YAAY,GAAW,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;QACxD,MAAM,oBAAoB,GAA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AAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAA;IACxD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;AACpE,CAAC;AAED,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;AACzB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AnnotationList.d.ts","sourceRoot":"","sources":["../../../../src/components/grading/internal/AnnotationList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AA0CzC,iBAAS,qBAAqB,uBAoD7B;;AAED,wBAAgD"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import * as _ from 'lodash-es';
|
2
|
+
import React, { useContext } from 'react';
|
3
|
+
import { getNumericAttribute } from '../../../dom-utils';
|
4
|
+
import { useExamTranslation } from '../../../i18n';
|
5
|
+
import { shortDisplayNumber } from '../../../shortDisplayNumber';
|
6
|
+
import { mapMaybe } from '../../../utils';
|
7
|
+
import { QuestionContext } from '../../context/QuestionContext';
|
8
|
+
import { findScore, ResultsContext } from '../../context/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 } = useExamTranslation();
|
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]) => {
|
26
|
+
var _a, _b, _c;
|
27
|
+
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) => {
|
28
|
+
const numbering = getPrefix(answers, answer) + String(listNumberOffset + i + 1) + ')';
|
29
|
+
const message = annotation.message;
|
30
|
+
return { numbering, message };
|
31
|
+
})) !== null && _c !== void 0 ? _c : [];
|
32
|
+
});
|
33
|
+
const pregradingAnnotations = getListOfAnnotations(answersAndScores, 'pregrading');
|
34
|
+
const censoringAnnotations = getListOfAnnotations(answersAndScores, 'censoring', pregradingAnnotations.length);
|
35
|
+
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" },
|
36
|
+
React.createElement(AnnotationListComponent, { annotations: pregradingAnnotations }))) : (React.createElement(React.Fragment, null,
|
37
|
+
React.createElement("div", { className: "e-column e-column--6" },
|
38
|
+
React.createElement(AnnotationListComponent, { i18nTitleKey: 'grading.pregrading-annotations', annotations: pregradingAnnotations })),
|
39
|
+
React.createElement("div", { className: "e-column e-column--6" },
|
40
|
+
React.createElement(AnnotationListComponent, { i18nTitleKey: 'grading.censor-annotations', annotations: censoringAnnotations })))))) : null;
|
41
|
+
}
|
42
|
+
export default React.memo(ResultsAnnotationList);
|
43
|
+
//# sourceMappingURL=AnnotationList.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AnnotationList.js","sourceRoot":"","sources":["../../../../src/components/grading/internal/AnnotationList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAYxE,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE,uBACtC,OAAA,OAAO,CAAC,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,WAAW,0CAAE,MAAM,MAAI,MAAA,MAAA,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,EAAE,C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K,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface QuestionAutoScoreProps {
|
3
|
+
score?: number;
|
4
|
+
maxScore?: number;
|
5
|
+
displayNumber?: string;
|
6
|
+
}
|
7
|
+
declare function QuestionAutoScore({ score, maxScore, displayNumber }: QuestionAutoScoreProps): JSX.Element;
|
8
|
+
declare const _default: React.MemoExoticComponent<typeof QuestionAutoScore>;
|
9
|
+
export default _default;
|
10
|
+
//# sourceMappingURL=QuestionAutoScore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionAutoScore.d.ts","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionAutoScore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,iBAAS,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,sBAAsB,eAUpF;;AAED,wBAA4C"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React, { useContext } from 'react';
|
2
|
+
import { useExamTranslation } from '../../../i18n';
|
3
|
+
import { QuestionContext } from '../../context/QuestionContext';
|
4
|
+
import ResultsExamQuestionScoresContainer from './QuestionScoresContainer';
|
5
|
+
function QuestionAutoScore({ score, maxScore, displayNumber }) {
|
6
|
+
const { answers } = useContext(QuestionContext);
|
7
|
+
const { t } = useExamTranslation();
|
8
|
+
const containerProps = { answers, displayNumber };
|
9
|
+
return (React.createElement(ResultsExamQuestionScoresContainer, { ...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', { count: '' })));
|
15
|
+
}
|
16
|
+
export default React.memo(QuestionAutoScore);
|
17
|
+
//# sourceMappingURL=QuestionAutoScore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionAutoScore.js","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionAutoScore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,kCAAkC,MAAM,2BAA2B,CAAA;AAQ1E,SAAS,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAA0B;IACnF,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,OAAK,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,EAAE,EAAE,KAAK,EAAE,EAAmB,EAAE,CAAC,CAC9C,CACtC,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Score } from '../../../index';
|
3
|
+
export interface QuestionManualScoreProps {
|
4
|
+
scores?: Score;
|
5
|
+
maxScore?: number;
|
6
|
+
displayNumber?: string;
|
7
|
+
multilineAnswer?: boolean;
|
8
|
+
}
|
9
|
+
declare function QuestionManualScore({ scores, maxScore, displayNumber, multilineAnswer }: QuestionManualScoreProps): JSX.Element;
|
10
|
+
declare const _default: React.MemoExoticComponent<typeof QuestionManualScore>;
|
11
|
+
export default _default;
|
12
|
+
//# sourceMappingURL=QuestionManualScore.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionManualScore.d.ts","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionManualScore.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAoD,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAKxF,MAAM,WAAW,wBAAwB;IACvC,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,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,wBAAwB,eAiB1G;;AAoFD,wBAA8C"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import classNames from 'classnames';
|
2
|
+
import React, { useContext } from 'react';
|
3
|
+
import { useExamTranslation } from '../../../i18n';
|
4
|
+
import { QuestionContext } from '../../context/QuestionContext';
|
5
|
+
import ResultsExamQuestionScoresContainer from './QuestionScoresContainer';
|
6
|
+
function QuestionManualScore({ 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, { ...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, { ...{ 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, { 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', { count: '' })));
|
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(QuestionManualScore);
|
61
|
+
//# sourceMappingURL=QuestionManualScore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionManualScore.js","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionManualScore.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,eAAe,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,kCAAkC,MAAM,2BAA2B,CAAA;AAe1E,SAAS,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAA4B;;IACzG,MAAM,EAAE,OAA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AAoB;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,mBAAmB,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare function QuestionScoresContainer({ 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 QuestionScoresContainer>;
|
9
|
+
export default _default;
|
10
|
+
//# sourceMappingURL=QuestionScoresContainer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionScoresContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,iBAAS,uBAAuB,CAAC,EAC/B,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,wBAAkD"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import classnames from 'classnames';
|
3
|
+
function QuestionScoresContainer({ 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(QuestionScoresContainer);
|
12
|
+
//# sourceMappingURL=QuestionScoresContainer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QuestionScoresContainer.js","sourceRoot":"","sources":["../../../../src/components/grading/internal/QuestionScoresContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,SAAS,uBAAuB,CAAC,EAC/B,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,uBAAuB,CAAC,CAAA"}
|
@@ -13,7 +13,7 @@ export async function waitUntilImagesDone() {
|
|
13
13
|
throw Error('Images not loaded');
|
14
14
|
}
|
15
15
|
export function updateLargeImageWarnings(answer) {
|
16
|
-
const images = answer.querySelectorAll('img');
|
16
|
+
const images = (answer === null || answer === void 0 ? void 0 : answer.querySelectorAll('img')) || [];
|
17
17
|
remainingImages = images.length;
|
18
18
|
images.forEach((img) => {
|
19
19
|
if (img.complete) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"largeImageDetector.js","sourceRoot":"","sources":["../../../src/components/grading/largeImageDetector.ts"],"names":[],"mappings":"AAAA,IAAI,eAAuB,CAAA;AAE3B,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,KAAK,GAAG,IAAI,CAAA;IAChB,OAAO,KAAK,GAAG,CAAC,EAAE;QAChB,KAAK,EAAE,CAAA;QACP,IAAI,eAAe,KAAK,CAAC,EAAE;YACzB,OAAM;SACP;aAAM;YACL,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;SACzD;KACF;IACD,MAAM,KAAK,CAAC,mBAAmB,CAAC,CAAA;AAClC,CAAC;AACD,MAAM,UAAU,wBAAwB,CAAC,MAAe;IACtD,MAAM,MAAM,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"largeImageDetector.js","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