@digabi/exam-engine-core 17.0.0-alpha.1 → 18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/DocumentTitle.d.ts +1 -1
- package/dist/components/DocumentTitle.d.ts.map +1 -1
- package/dist/components/context/AttachmentContext.d.ts +1 -1
- package/dist/components/context/AttachmentContext.d.ts.map +1 -1
- package/dist/createRenderChildNodes.d.ts +1 -1
- package/dist/createRenderChildNodes.d.ts.map +1 -1
- package/dist/dom-utils.d.ts +1 -1
- package/dist/dom-utils.d.ts.map +1 -1
- package/dist/i18n/fi-FI.d.ts +3 -3
- package/dist/i18n/fi-FI.d.ts.map +1 -1
- package/dist/main-bundle.js +1 -1
- package/dist/parser/parseExamStructure.d.ts +2 -2
- package/dist/parser/parseExamStructure.d.ts.map +1 -1
- package/dist/store/answers/reducer.d.ts +1 -1
- package/dist/store/answers/reducer.d.ts.map +1 -1
- package/dist/store/audio/reducer.d.ts +1 -1
- package/dist/store/audio/reducer.d.ts.map +1 -1
- package/dist/store/cas/reducer.d.ts +2 -2
- package/dist/store/cas/reducer.d.ts.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/types/ExamAnswer.d.ts +2 -2
- package/dist/types/ExamAnswer.d.ts.map +1 -1
- package/dist/types/ExamServerAPI.d.ts +6 -6
- package/dist/types/ExamServerAPI.d.ts.map +1 -1
- package/dist/types/GradingStructure.d.ts +1 -1
- package/dist/types/GradingStructure.d.ts.map +1 -1
- package/dist/types/Score.d.ts +3 -3
- package/dist/types/Score.d.ts.map +1 -1
- package/dist/url.d.ts +1 -1
- package/dist/url.d.ts.map +1 -1
- package/dist/validateAnswers.d.ts +1 -1
- package/dist/validateAnswers.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/grading/ChoiceAnswer.d.ts +0 -6
- package/dist/components/grading/ChoiceAnswer.d.ts.map +0 -1
- package/dist/components/grading/ChoiceAnswer.js +0 -57
- package/dist/components/grading/ChoiceAnswer.js.map +0 -1
- package/dist/components/grading/DropdownAnswer.d.ts +0 -6
- package/dist/components/grading/DropdownAnswer.d.ts.map +0 -1
- package/dist/components/grading/DropdownAnswer.js +0 -43
- package/dist/components/grading/DropdownAnswer.js.map +0 -1
- package/dist/components/grading/Grading.d.ts +0 -15
- package/dist/components/grading/Grading.d.ts.map +0 -1
- package/dist/components/grading/Grading.js +0 -69
- package/dist/components/grading/Grading.js.map +0 -1
- package/dist/components/grading/MultiLineAnswer.d.ts +0 -8
- package/dist/components/grading/MultiLineAnswer.d.ts.map +0 -1
- package/dist/components/grading/MultiLineAnswer.js +0 -21
- package/dist/components/grading/MultiLineAnswer.js.map +0 -1
- package/dist/components/grading/Question.d.ts +0 -5
- package/dist/components/grading/Question.d.ts.map +0 -1
- package/dist/components/grading/Question.js +0 -23
- package/dist/components/grading/Question.js.map +0 -1
- package/dist/components/grading/QuestionTitle.d.ts +0 -6
- package/dist/components/grading/QuestionTitle.d.ts.map +0 -1
- package/dist/components/grading/QuestionTitle.js +0 -21
- package/dist/components/grading/QuestionTitle.js.map +0 -1
- package/dist/components/grading/Results.d.ts +0 -15
- package/dist/components/grading/Results.d.ts.map +0 -1
- package/dist/components/grading/Results.js +0 -77
- package/dist/components/grading/Results.js.map +0 -1
- package/dist/components/grading/ScoredTextAnswer.d.ts +0 -6
- package/dist/components/grading/ScoredTextAnswer.d.ts.map +0 -1
- package/dist/components/grading/ScoredTextAnswer.js +0 -22
- package/dist/components/grading/ScoredTextAnswer.js.map +0 -1
- package/dist/components/grading/Section.d.ts +0 -5
- package/dist/components/grading/Section.d.ts.map +0 -1
- package/dist/components/grading/Section.js +0 -18
- package/dist/components/grading/Section.js.map +0 -1
- package/dist/components/grading/SingleLineAnswer.d.ts +0 -12
- package/dist/components/grading/SingleLineAnswer.d.ts.map +0 -1
- package/dist/components/grading/SingleLineAnswer.js +0 -23
- package/dist/components/grading/SingleLineAnswer.js.map +0 -1
- package/dist/components/grading/TextAnswer.d.ts +0 -7
- package/dist/components/grading/TextAnswer.d.ts.map +0 -1
- package/dist/components/grading/TextAnswer.js +0 -53
- package/dist/components/grading/TextAnswer.js.map +0 -1
- package/dist/components/grading/internal/AnnotationList.d.ts +0 -5
- package/dist/components/grading/internal/AnnotationList.d.ts.map +0 -1
- package/dist/components/grading/internal/AnnotationList.js +0 -43
- package/dist/components/grading/internal/AnnotationList.js.map +0 -1
- package/dist/components/grading/internal/QuestionAutoScore.d.ts +0 -10
- package/dist/components/grading/internal/QuestionAutoScore.d.ts.map +0 -1
- package/dist/components/grading/internal/QuestionAutoScore.js +0 -17
- package/dist/components/grading/internal/QuestionAutoScore.js.map +0 -1
- package/dist/components/grading/internal/QuestionManualScore.d.ts +0 -12
- package/dist/components/grading/internal/QuestionManualScore.d.ts.map +0 -1
- package/dist/components/grading/internal/QuestionManualScore.js +0 -61
- package/dist/components/grading/internal/QuestionManualScore.js.map +0 -1
- package/dist/components/grading/internal/QuestionScoresContainer.d.ts +0 -10
- package/dist/components/grading/internal/QuestionScoresContainer.d.ts.map +0 -1
- package/dist/components/grading/internal/QuestionScoresContainer.js +0 -12
- package/dist/components/grading/internal/QuestionScoresContainer.js.map +0 -1
- package/dist/editAnnotations.d.ts +0 -2
- package/dist/editAnnotations.d.ts.map +0 -1
- package/dist/editAnnotations.js +0 -8
- package/dist/editAnnotations.js.map +0 -1
- package/dist/editAnnotationsOld.d.ts +0 -3
- package/dist/editAnnotationsOld.d.ts.map +0 -1
- package/dist/editAnnotationsOld.js +0 -340
- package/dist/editAnnotationsOld.js.map +0 -1
@@ -52,7 +52,7 @@ export interface DropdownAnswerElement extends BaseElement {
|
|
52
52
|
questionId: number;
|
53
53
|
};
|
54
54
|
}
|
55
|
-
export
|
56
|
-
export
|
55
|
+
export type ExamElement = RootElement | SectionElement | QuestionElement | AnswerElement;
|
56
|
+
export type AnswerElement = TextAnswerElement | ScoredTextAnswerElement | ChoiceAnswerElement | DropdownAnswerElement;
|
57
57
|
export declare function parseExamStructure(doc: XMLDocument): RootElement;
|
58
58
|
//# sourceMappingURL=parseExamStructure.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parseExamStructure.d.ts","sourceRoot":"","sources":["../../src/parser/parseExamStructure.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,WAAW,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE;QACV,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,IAAI,EAAE,aAAa,CAAA;IACnB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,IAAI,EAAE,eAAe,CAAA;IACrB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,IAAI,EAAE,iBAAiB,CAAA;IACvB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,
|
1
|
+
{"version":3,"file":"parseExamStructure.d.ts","sourceRoot":"","sources":["../../src/parser/parseExamStructure.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,WAAW,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE;QACV,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,IAAI,EAAE,aAAa,CAAA;IACnB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,IAAI,EAAE,eAAe,CAAA;IACrB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,IAAI,EAAE,iBAAiB,CAAA;IACvB,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,GAAG,aAAa,CAAA;AAExF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAErH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAIhE"}
|
@@ -3,7 +3,7 @@ import * as actions from './actions';
|
|
3
3
|
import { ExamAnswer, QuestionId } from '../..';
|
4
4
|
import { ValidationError } from '../../validateAnswers';
|
5
5
|
import { RootElement } from '../../parser/parseExamStructure';
|
6
|
-
|
6
|
+
type AnswersAction = ActionType<typeof actions>;
|
7
7
|
export interface AnswersState {
|
8
8
|
answersById: Record<QuestionId, ExamAnswer>;
|
9
9
|
/** The (text) answer that is focused right now. Used for e.g. highlighting the correct hint in scored text answers. */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/answers/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAmB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE7D,
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/answers/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAmB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE7D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IAC3C,uHAAuH;IACvH,iBAAiB,EAAE,UAAU,GAAG,IAAI,CAAA;IACpC;;;;OAIG;IACH,gBAAgB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAA;IACjC;;;OAGG;IACH,iBAAiB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAA;IAC9B;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAA;IAC1B;;OAEG;IACH,gBAAgB,EAAE,eAAe,EAAE,CAAA;CACpC;AAgBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,0BAA6B,EAAE,MAAM,EAAE,aAAa,GAAG,YAAY,CA6B9G"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ActionType } from 'typesafe-actions';
|
2
2
|
import * as actions from './actions';
|
3
3
|
import { AudioPlaybackError, RestrictedAudioId } from '../..';
|
4
|
-
|
4
|
+
type AudioAction = ActionType<typeof actions>;
|
5
5
|
export interface Audio {
|
6
6
|
/** The source filename */
|
7
7
|
src: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE7D,
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/audio/reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE7D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE7C,MAAM,WAAW,KAAK;IACpB,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,iBAAiB,EAAE,kBAAkB,CAAC,CAAA;IAC9D,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;CACjD;AAQD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,wBAA2B,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,CA8CtG"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ActionType } from 'typesafe-actions';
|
2
2
|
import * as actions from './actions';
|
3
|
-
|
4
|
-
export
|
3
|
+
type CasAction = ActionType<typeof actions>;
|
4
|
+
export type CasState = {
|
5
5
|
casStatus: 'forbidden';
|
6
6
|
} | {
|
7
7
|
casStatus: 'allowing';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/cas/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AAEpC,
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/store/cas/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AAEpC,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE3C,MAAM,MAAM,QAAQ,GAChB;IAAE,SAAS,EAAE,WAAW,CAAA;CAAE,GAC1B;IAAE,SAAS,EAAE,UAAU,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CAAA;AAM5B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,sBAAyB,EAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAmB9F"}
|
package/dist/store/index.d.ts
CHANGED
@@ -64,7 +64,7 @@ declare const rootReducer: import("redux").Reducer<import("redux").CombinedState
|
|
64
64
|
type: "UPDATE_CAS_REMAINING";
|
65
65
|
payload: number;
|
66
66
|
}>;
|
67
|
-
export
|
67
|
+
export type AppState = ReturnType<typeof rootReducer>;
|
68
68
|
declare module 'react-redux' {
|
69
69
|
interface DefaultRootState extends AppState {
|
70
70
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,KAAK,EAAE,MAAM,OAAO,CAAA;AASrF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,IAAI,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIf,CAAA;AAQF,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA0D,KAAK,EAAE,MAAM,OAAO,CAAA;AASrF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,IAAI,CAAA;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIf,CAAA;AAQF,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAUrD,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,gBAAiB,SAAQ,QAAQ;KAAG;CAC/C;AAED,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,WAAW,EAC1B,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EAAE,UAAU,EAAE,EAC5B,4BAA4B,EAAE,4BAA4B,EAAE,EAC5D,aAAa,EAAE,aAAa,GAC3B,KAAK,CAAC,QAAQ,CAAC,CA6BjB"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export
|
1
|
+
export type QuestionId = number;
|
2
2
|
interface AnswerCommon {
|
3
3
|
questionId: QuestionId;
|
4
4
|
value: string;
|
@@ -16,6 +16,6 @@ export interface RichTextAnswer extends AnswerCommon {
|
|
16
16
|
export interface ChoiceAnswer extends AnswerCommon {
|
17
17
|
type: 'choice';
|
18
18
|
}
|
19
|
-
export
|
19
|
+
export type ExamAnswer = TextAnswer | RichTextAnswer | ChoiceAnswer;
|
20
20
|
export {};
|
21
21
|
//# sourceMappingURL=ExamAnswer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExamAnswer.d.ts","sourceRoot":"","sources":["../../src/types/ExamAnswer.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"ExamAnswer.d.ts","sourceRoot":"","sources":["../../src/types/ExamAnswer.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAE/B,UAAU,YAAY;IACpB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,IAAI,EAAE,UAAU,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,YAAY,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ExamAnswer, QuestionId } from './ExamAnswer';
|
2
|
-
export
|
2
|
+
export type SaveState = 'initial' | 'saving' | 'saved';
|
3
3
|
/**
|
4
4
|
* CAS status is a state machine with three states.
|
5
5
|
*
|
@@ -14,17 +14,17 @@ export declare type SaveState = 'initial' | 'saving' | 'saved';
|
|
14
14
|
* zero, we transition the state from from `'allowing'` to `'allowed'`. Cancelling
|
15
15
|
* the countdown transitions the state back from `'allowing'` to `'forbidden'`.
|
16
16
|
*/
|
17
|
-
export
|
18
|
-
export
|
19
|
-
export
|
20
|
-
export
|
17
|
+
export type CasStatus = InitialCasStatus | 'allowing';
|
18
|
+
export type InitialCasStatus = 'allowed' | 'forbidden';
|
19
|
+
export type RestrictedAudioId = number;
|
20
|
+
export type AudioPlaybackError =
|
21
21
|
/** The user has already accessed this restricted audio */
|
22
22
|
'already-accessed'
|
23
23
|
/** There already is an audio file playing */
|
24
24
|
| 'already-playing'
|
25
25
|
/** Other error, e.g. a network issue */
|
26
26
|
| 'other-error';
|
27
|
-
export
|
27
|
+
export type AudioPlaybackResponse = 'ok' | AudioPlaybackError;
|
28
28
|
export interface RestrictedAudioPlaybackStats {
|
29
29
|
/** An unique identifier for each restricted audio element */
|
30
30
|
restrictedAudioId: RestrictedAudioId;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExamServerAPI.d.ts","sourceRoot":"","sources":["../../src/types/ExamServerAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAErD,
|
1
|
+
{"version":3,"file":"ExamServerAPI.d.ts","sourceRoot":"","sources":["../../src/types/ExamServerAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AACtD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAA;AACrD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAA;AACtD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAA;AACtC,MAAM,MAAM,kBAAkB;AAC5B,0DAA0D;AACxD,kBAAkB;AACpB,6CAA6C;GAC3C,iBAAiB;AACnB,wCAAwC;GACtC,aAAa,CAAA;AACjB,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,kBAAkB,CAAA;AAE7D,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAA;IAC1D,mDAAmD;IACnD,UAAU,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACvC,sCAAsC;IACtC,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD;;;;OAIG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC1D;;;;;;OAMG;IACH,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACtH,uGAAuG;IACvG,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IACxG,gFAAgF;IAChF,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC9E"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export interface GradingStructure {
|
2
2
|
questions: GradingStructureQuestion[];
|
3
3
|
}
|
4
|
-
export
|
4
|
+
export type GradingStructureQuestion = TextQuestion | ChoiceGroupQuestion;
|
5
5
|
export interface TextQuestion {
|
6
6
|
type: 'text';
|
7
7
|
id: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GradingStructure.d.ts","sourceRoot":"","sources":["../../src/types/GradingStructure.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,wBAAwB,EAAE,CAAA;CACtC;AAED,
|
1
|
+
{"version":3,"file":"GradingStructure.d.ts","sourceRoot":"","sources":["../../src/types/GradingStructure.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,wBAAwB,EAAE,CAAA;CACtC;AAED,MAAM,MAAM,wBAAwB,GAAG,YAAY,GAAG,mBAAmB,CAAA;AAEzE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,aAAa,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAA;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd"}
|
package/dist/types/Score.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { QuestionId } from './ExamAnswer';
|
2
|
-
export
|
2
|
+
export type AnswerId = number;
|
3
3
|
export interface Score {
|
4
4
|
questionId: QuestionId;
|
5
5
|
answerId: AnswerId;
|
@@ -67,7 +67,7 @@ export interface RectAnnotation extends ShapeAnnotation {
|
|
67
67
|
* in the top left corner of the image and `(1, 1)` being in the bottom right
|
68
68
|
* corner of the image.
|
69
69
|
*/
|
70
|
-
export
|
70
|
+
export type ImageAnnotation = LineAnnotation | RectAnnotation;
|
71
71
|
export interface TextAnnotation extends BaseAnnotation {
|
72
72
|
/** Legacy exams don't have this property, so it's marked as optional. */
|
73
73
|
type?: 'text';
|
@@ -76,6 +76,6 @@ export interface TextAnnotation extends BaseAnnotation {
|
|
76
76
|
/** The length of the annotation in characters. Images are counted as 1 character. */
|
77
77
|
length: number;
|
78
78
|
}
|
79
|
-
export
|
79
|
+
export type Annotation = TextAnnotation | ImageAnnotation;
|
80
80
|
export {};
|
81
81
|
//# sourceMappingURL=Score.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Score.d.ts","sourceRoot":"","sources":["../../src/types/Score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,
|
1
|
+
{"version":3,"file":"Score.d.ts","sourceRoot":"","sources":["../../src/types/Score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAA;AAE7B,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,QAAQ,CAAA;IAClB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE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CAAA;AAE7D,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+GAA+G;IAC/G,UAAU,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,eAAe,CAAA"}
|
package/dist/url.d.ts
CHANGED
package/dist/url.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AAEA,
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAA;AAE1E;;GAEG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAM9D"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { RootElement } from './parser/parseExamStructure';
|
2
2
|
import { ExamAnswer, QuestionId } from './types/ExamAnswer';
|
3
3
|
import { AnsweringInstructionProps } from './components/AnsweringInstructions';
|
4
|
-
export
|
4
|
+
export type ValidationError = ExtraAnswer | AnswerTooLong;
|
5
5
|
export interface AnswerTooLong {
|
6
6
|
type: 'AnswerTooLong';
|
7
7
|
displayNumber: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validateAnswers.d.ts","sourceRoot":"","sources":["../src/validateAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAE9E,
|
1
|
+
{"version":3,"file":"validateAnswers.d.ts","sourceRoot":"","sources":["../src/validateAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAE9E,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,aAAa,CAAA;AAEzD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,eAAe,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,yBAAyB;IAC5D,IAAI,EAAE,aAAa,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;CACtB;AA0GD,wBAAgB,eAAe,CAC7B,aAAa,EAAE,WAAW,EAC1B,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAC1C,eAAe,EAAE,CAInB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@digabi/exam-engine-core",
|
3
|
-
"version": "
|
3
|
+
"version": "18.0.0",
|
4
4
|
"main": "dist/main-bundle.js",
|
5
5
|
"types": "dist/index.d.ts",
|
6
6
|
"author": "Matriculation Examination Board, Finland",
|
@@ -60,5 +60,5 @@
|
|
60
60
|
"webpack-bundle-analyzer": "^4.1.0",
|
61
61
|
"webpack-cli": "^4.9.2"
|
62
62
|
},
|
63
|
-
"gitHead": "
|
63
|
+
"gitHead": "73c673f138d9c52ebede94b83d93aa9117e43022"
|
64
64
|
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
-
declare function ChoiceAnswer({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof ChoiceAnswer>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=ChoiceAnswer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ChoiceAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/ChoiceAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAuEjE,iBAAS,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAyCtE;;AAED,wBAAuC"}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useContext } from 'react';
|
3
|
-
import { getNumericAttribute, mapChildElements, query } from '../../dom-utils';
|
4
|
-
import { useExamTranslation } from '../../i18n';
|
5
|
-
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
6
|
-
import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
|
7
|
-
import ResultsExamQuestionAutoScore from './internal/QuestionAutoScore';
|
8
|
-
function ChoiceAnswerOption({ renderChildNodes, selected, element, questionId, direction, isCorrect, }) {
|
9
|
-
const { t } = useExamTranslation();
|
10
|
-
const className = element.getAttribute('class');
|
11
|
-
const optionId = element.getAttribute('option-id');
|
12
|
-
const content = (React.createElement("div", { className: classNames('e-choice-answer-option e-column', className, {
|
13
|
-
'e-choice-answer-option--selected': selected,
|
14
|
-
}) }, renderChildNodes(element)));
|
15
|
-
const Content = ({ narrow = false }) => (React.createElement(React.Fragment, null,
|
16
|
-
React.createElement("input", { type: "radio", className: classNames('e-radio-button', { 'e-column e-column--narrow': narrow }), name: String(questionId), value: optionId, checked: selected, readOnly: true }),
|
17
|
-
content,
|
18
|
-
isCorrect && React.createElement(ScreenReaderOnly, null, t('screen-reader.correct-answer'))));
|
19
|
-
return direction === 'vertical' ? (React.createElement("div", { className: "e-mrg-b-1" },
|
20
|
-
React.createElement("label", { className: classNames('e-columns', {
|
21
|
-
'e-correct-answer-left': isCorrect,
|
22
|
-
'e-columns--inline': query(element, ['image', 'video']) == null /* Force full width for options containing responsive media */,
|
23
|
-
}) },
|
24
|
-
React.createElement(Content, { narrow: true })))) : (React.createElement("div", { className: "e-column e-mrg-b-1" },
|
25
|
-
React.createElement("label", { className: classNames('e-block e-text-center', { 'e-correct-answer-bottom': isCorrect }) },
|
26
|
-
React.createElement(Content, null))));
|
27
|
-
}
|
28
|
-
function ChoiceAnswer({ element, renderChildNodes }) {
|
29
|
-
const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
|
30
|
-
const questionId = getNumericAttribute(element, 'question-id');
|
31
|
-
const answer = answersByQuestionId[questionId];
|
32
|
-
const direction = element.getAttribute('direction') || 'vertical';
|
33
|
-
const className = element.getAttribute('class');
|
34
|
-
const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
|
35
|
-
const scoreValue = answer && choice.options.find((option) => option.id === Number(answer.value)).score;
|
36
|
-
const maxScore = getNumericAttribute(element, 'max-score');
|
37
|
-
return (React.createElement(React.Fragment, null,
|
38
|
-
scoreValue !== undefined && React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore }),
|
39
|
-
React.createElement("div", { className: classNames('e-choice-answer', className, {
|
40
|
-
'e-columns': direction === 'horizontal',
|
41
|
-
}) }, mapChildElements(element, (childElement) => {
|
42
|
-
const optionId = getNumericAttribute(childElement, 'option-id');
|
43
|
-
const selected = answer != null && Number(answer.value) === optionId;
|
44
|
-
const grading = choice.options.find((option) => option.id === optionId);
|
45
|
-
return (React.createElement(ChoiceAnswerOption, { ...{
|
46
|
-
element: childElement,
|
47
|
-
renderChildNodes,
|
48
|
-
questionId,
|
49
|
-
key: optionId,
|
50
|
-
direction,
|
51
|
-
selected,
|
52
|
-
isCorrect: grading.correct,
|
53
|
-
} }));
|
54
|
-
}))));
|
55
|
-
}
|
56
|
-
export default React.memo(ChoiceAnswer);
|
57
|
-
//# sourceMappingURL=ChoiceAnswer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ChoiceAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/ChoiceAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,mCAAmC,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,4BAA4B,MAAM,8BAA8B,CAAA;AASvE,SAAS,kBAAkB,CAAC,EAC1B,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,SAAS,EACT,SAAS,GACe;IACxB,MAAM,EAAE,CAAC,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;IAEnD,MAAM,OAAO,GAAG,CACd,6BACE,SAAS,EAAE,UAAU,CAAC,iCAAiC,EAAE,SAAS,EAAE;YAClE,kCAAkC,EAAE,QAAQ;SAC7C,CAAC,IAED,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;IACD,MAAM,OAAO,GAAkD,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACrF;QACE,+BACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,EAAE,2BAA2B,EAAE,MAAM,EAAE,CAAC,EAChF,IAAI,EAAE,MAAM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swer({ element, renderChildNodes }: ExamComponentProps): JSX.Element | null;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof DropdownAnswer>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=DropdownAnswer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DropdownAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/DropdownAnswer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AASjE,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,sBA2DxE;;AAED,wBAAyC"}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useContext } from 'react';
|
3
|
-
import { findChildElement, getNumericAttribute } from '../../dom-utils';
|
4
|
-
import { useExamTranslation } from '../../i18n';
|
5
|
-
import { shortDisplayNumber } from '../../shortDisplayNumber';
|
6
|
-
import { QuestionContext } from '../context/QuestionContext';
|
7
|
-
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
8
|
-
import { findMultiChoiceFromGradingStructure, ResultsContext } from '../context/ResultsContext';
|
9
|
-
import ResultsExamQuestionAutoScore from './internal/QuestionAutoScore';
|
10
|
-
function DropdownAnswer({ element, renderChildNodes }) {
|
11
|
-
const { t } = useExamTranslation();
|
12
|
-
const { answersByQuestionId, gradingStructure } = useContext(ResultsContext);
|
13
|
-
const { answers } = useContext(QuestionContext);
|
14
|
-
const questionId = getNumericAttribute(element, 'question-id');
|
15
|
-
const answer = answersByQuestionId[questionId];
|
16
|
-
const selectedOption = findChildElement(element, (childElement) => (answer === null || answer === void 0 ? void 0 : answer.value) === childElement.getAttribute('option-id'));
|
17
|
-
const choice = findMultiChoiceFromGradingStructure(gradingStructure, questionId);
|
18
|
-
if (selectedOption) {
|
19
|
-
const correctIds = choice.options.filter((o) => o.correct).map((o) => o.id);
|
20
|
-
const correctOptions = Array.from(element.children).filter((childElement) => correctIds.includes(getNumericAttribute(childElement, 'option-id')));
|
21
|
-
const isAnswerCorrect = correctIds.includes(getNumericAttribute(selectedOption, 'option-id'));
|
22
|
-
const displayNumber = shortDisplayNumber(element.getAttribute('display-number'));
|
23
|
-
const scoreValue = answer && choice.options.find((option) => option.id === Number(answer.value)).score;
|
24
|
-
const maxScore = getNumericAttribute(element, 'max-score');
|
25
|
-
return (React.createElement(React.Fragment, null,
|
26
|
-
answers.length > 1 && React.createElement("sup", null, displayNumber),
|
27
|
-
React.createElement("span", { className: classNames('e-dropdown-answer__answered', {
|
28
|
-
'e-dropdown-answer__answered--correct': isAnswerCorrect,
|
29
|
-
'e-dropdown-answer__answered--wrong': !isAnswerCorrect,
|
30
|
-
}) },
|
31
|
-
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
|
32
|
-
renderChildNodes(selectedOption),
|
33
|
-
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end')),
|
34
|
-
isAnswerCorrect && React.createElement(ScreenReaderOnly, null, t('screen-reader.correct-answer'))),
|
35
|
-
!isAnswerCorrect && (React.createElement("span", { className: "e-dropdown-answer__correct", "aria-hidden": true }, correctOptions.map((correctOption, i) => (React.createElement(React.Fragment, { key: i },
|
36
|
-
renderChildNodes(correctOption),
|
37
|
-
i < correctOptions.length - 1 && ', '))))),
|
38
|
-
scoreValue != null && (React.createElement(ResultsExamQuestionAutoScore, { score: scoreValue, maxScore: maxScore, displayNumber: displayNumber }))));
|
39
|
-
}
|
40
|
-
return null;
|
41
|
-
}
|
42
|
-
export default React.memo(DropdownAnswer);
|
43
|
-
//# sourceMappingURL=DropdownAnswer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DropdownAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/DropdownAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAA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AAI,IAC3D,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CACxC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,CAAC;gBACnB,gBAAgB,CAAC,aAAa,CAAC;gBAC/B,CAAC,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CACvB,CAClB,CAAC,CACG,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,cAAc,CAAC,CAAA"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { GradingStructure, Score } from '../..';
|
3
|
-
import { CommonExamProps } from '../exam/Exam';
|
4
|
-
export interface ResultsProps extends CommonExamProps {
|
5
|
-
/** Contains grading structure for the exam, and in addition scores and metadata (comments and annotations) */
|
6
|
-
gradingStructure: GradingStructure;
|
7
|
-
/** Custom grading text to be displayed for the whole exam. For example total grade for the exam. */
|
8
|
-
gradingText?: string;
|
9
|
-
/** Scores for exam answers */
|
10
|
-
scores: Score[];
|
11
|
-
singleGrading?: boolean;
|
12
|
-
}
|
13
|
-
declare const _default: React.MemoExoticComponent<React.ComponentType<import("../results/Results").ResultsProps>>;
|
14
|
-
export default _default;
|
15
|
-
//# sourceMappingURL=Grading.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Grading.d.ts","sourceRoot":"","sources":["../../../src/components/grading/Grading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAEpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAU/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAY9C,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,8GAA8G;IAC9G,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;;AA0ED,wBAA6E"}
|
@@ -1,69 +0,0 @@
|
|
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 ExamSectionTitle from '../exam/SectionTitle';
|
13
|
-
import Formula from '../shared/Formula';
|
14
|
-
import Image from '../shared/Image';
|
15
|
-
import RenderChildNodes from '../RenderChildNodes';
|
16
|
-
import { renderIf } from '../RenderIf';
|
17
|
-
import { ResultsContext, withResultsContext } from '../context/ResultsContext';
|
18
|
-
import Question from './Question';
|
19
|
-
import QuestionTitle from './QuestionTitle';
|
20
|
-
import Section from './Section';
|
21
|
-
import TextAnswer from './TextAnswer';
|
22
|
-
const renderChildNodes = createRenderChildNodes({
|
23
|
-
attachment: RenderChildNodes,
|
24
|
-
'attachment-link': mkAttachmentLink('plain'),
|
25
|
-
'attachment-links': mkAttachmentLinks('plain'),
|
26
|
-
'audio-group': RenderChildNodes,
|
27
|
-
formula: Formula,
|
28
|
-
question: Question,
|
29
|
-
hints: RenderChildNodes,
|
30
|
-
image: renderIf(({ element }) => queryAncestors(element, 'choice-answer') != null)(Image),
|
31
|
-
'question-title': QuestionTitle,
|
32
|
-
section: Section,
|
33
|
-
'section-title': ExamSectionTitle,
|
34
|
-
'text-answer': TextAnswer,
|
35
|
-
});
|
36
|
-
const Grading = () => {
|
37
|
-
const { date, dateTimeFormatter, dayCode, examCode, language, resolveAttachment, root, subjectLanguage } = useContext(CommonExamContext);
|
38
|
-
const examTitle = findChildElement(root, 'exam-title');
|
39
|
-
const examStylesheet = root.getAttribute('exam-stylesheet');
|
40
|
-
const i18n = useCached(() => initI18n(language, examCode, dayCode));
|
41
|
-
useEffect(changeLanguage(i18n, language));
|
42
|
-
useEffect(scrollToHash, []);
|
43
|
-
return (React.createElement(I18nextProvider, { i18n: i18n },
|
44
|
-
React.createElement("main", { className: "e-exam", lang: subjectLanguage },
|
45
|
-
React.createElement(React.StrictMode, null),
|
46
|
-
examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
|
47
|
-
"LOL",
|
48
|
-
React.createElement("div", { className: "e-columns e-columns--bottom-v e-mrg-b-4" },
|
49
|
-
examTitle && (React.createElement(DocumentTitle, { id: "title", className: "e-column e-mrg-b-0" },
|
50
|
-
renderChildNodes(examTitle),
|
51
|
-
date && ', ' + dateTimeFormatter.format(date))),
|
52
|
-
React.createElement(ScoresAndFinalGrade, null)),
|
53
|
-
renderChildNodes(root))));
|
54
|
-
};
|
55
|
-
function ScoresAndFinalGrade() {
|
56
|
-
const { gradingText, totalScore } = useContext(ResultsContext);
|
57
|
-
const { t } = useExamTranslation();
|
58
|
-
return (React.createElement("div", { className: "e-column--narrow" },
|
59
|
-
React.createElement("table", { className: "e-table e-table--borderless e-mrg-b-0" },
|
60
|
-
React.createElement("tbody", null,
|
61
|
-
React.createElement("tr", null,
|
62
|
-
React.createElement("th", { className: "e-pad-y-0 e-normal" }, t('grading-total')),
|
63
|
-
React.createElement("td", { className: "e-pad-y-0 e-semibold e-text-right" }, t('points', { count: totalScore }))),
|
64
|
-
gradingText && (React.createElement("tr", null,
|
65
|
-
React.createElement("th", { className: "e-pad-y-0 e-normal" }, t('grade')),
|
66
|
-
React.createElement("td", { className: "e-pad-y-0 e-semibold e-text-right" }, gradingText)))))));
|
67
|
-
}
|
68
|
-
export default React.memo(withResultsContext(withCommonExamContext(Grading)));
|
69
|
-
//# sourceMappingURL=Grading.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Grading.js","sourceRoot":"","sources":["../../../src/components/grading/Grading.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,gBAAgB,MAAM,sBAAsB,CAAA;AACnD,OAAO,OAAO,MAAM,mBAAmB,CAAA;AACvC,OAAO,KAAK,MAAM,iBAAiB,CAAA;AACnC,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAA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,CACF,CACJ,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MultiLineAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/grading/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAM7B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACpD,IAAI,EAAE,WAAW,GAAG,YAAY,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAwBA,CAAA"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import React, { useLayoutEffect, useRef } from 'react';
|
2
|
-
import { useExamTranslation } from '../../i18n';
|
3
|
-
import { renderAnnotations } from '../../renderAnnotations';
|
4
|
-
import { setupAnnotationEditing } from '../../editAnnotations';
|
5
|
-
import { ScreenReaderOnly } from '../ScreenReaderOnly';
|
6
|
-
export const MultiLineAnswer = ({ type, score, value }) => {
|
7
|
-
const { t } = useExamTranslation();
|
8
|
-
const answerRef = useRef(null);
|
9
|
-
useLayoutEffect(() => {
|
10
|
-
var _a, _b, _c, _d;
|
11
|
-
if (answerRef.current) {
|
12
|
-
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 : []);
|
13
|
-
setupAnnotationEditing(answerRef.current);
|
14
|
-
}
|
15
|
-
});
|
16
|
-
return (React.createElement("div", { className: "e-multiline-results-text-answer e-line-height-l e-pad-l-2 e-mrg-b-1" },
|
17
|
-
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-begin')),
|
18
|
-
type === 'rich-text' ? (React.createElement("div", { dangerouslySetInnerHTML: { __html: value || '' }, ref: answerRef })) : (React.createElement("div", { className: "e-pre-wrap", ref: answerRef }, value)),
|
19
|
-
React.createElement(ScreenReaderOnly, null, t('screen-reader.answer-end'))));
|
20
|
-
};
|
21
|
-
//# sourceMappingURL=MultiLineAnswer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MultiLineAnswer.js","sourceRoot":"","sources":["../../../src/components/grading/MultiLineAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,CAAC,MAAM,eAAe,GAIvB,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;YAC/G,sBAAsB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;SAC1C;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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Question.d.ts","sourceRoot":"","sources":["../../../src/components/grading/Question.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;;AA2BjE,wBAAwD"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import classNames from 'classnames';
|
2
|
-
import React, { useContext } from 'react';
|
3
|
-
import { findChildrenAnswers, getNumericAttribute } from '../../dom-utils';
|
4
|
-
import { QuestionContext, withQuestionContext } from '../context/QuestionContext';
|
5
|
-
import AnnotationList from './internal/AnnotationList';
|
6
|
-
import { ResultsContext } from '../context/ResultsContext';
|
7
|
-
function Question({ 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(Question));
|
23
|
-
//# sourceMappingURL=Question.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/grading/Question.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,4BAA4B,CAAA;AACjF,OAAO,cAAc,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAI1D,SAAS,QAAQ,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACjE,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,QAAQ,CAAC,CAAC,CAAA"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ExamComponentProps } from '../../createRenderChildNodes';
|
3
|
-
declare function QuestionTitle({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof QuestionTitle>;
|
5
|
-
export default _default;
|
6
|
-
//# sourceMappingURL=QuestionTitle.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"QuestionTitle.d.ts","sourceRoot":"","sources":["../../../src/components/grading/QuestionTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGjE,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAwBvE;;AAED,wBAAwC"}
|