@digabi/exam-engine-core 18.0.1-alpha.0 → 18.3.2-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ const ResultsContext_1 = require("../../src/components/context/ResultsContext");
|
|
12
12
|
const dom_utils_1 = require("../../src/dom-utils");
|
13
13
|
const allScores = [
|
14
14
|
{
|
15
|
-
questionId:
|
15
|
+
questionId: 330,
|
16
16
|
answerId: 1,
|
17
17
|
autograding: { score: 3 },
|
18
18
|
},
|
@@ -35,7 +35,7 @@ const allScores = [
|
|
35
35
|
const answers = [
|
36
36
|
{
|
37
37
|
type: 'choice',
|
38
|
-
questionId:
|
38
|
+
questionId: 330,
|
39
39
|
value: '93',
|
40
40
|
displayNumber: '1.1',
|
41
41
|
},
|
@@ -145,7 +145,7 @@ describe('Total score calculation for ' + testExam, () => {
|
|
145
145
|
const choiceAnswer = {
|
146
146
|
type: 'choice',
|
147
147
|
questionId: 1,
|
148
|
-
value: '
|
148
|
+
value: '93',
|
149
149
|
displayNumber: '1.1',
|
150
150
|
};
|
151
151
|
expect((0, ResultsContext_1.calculateQuestionSumScore)(topLevelQuestions[0], result.gradingStructure, [], (0, lodash_es_1.keyBy)([choiceAnswer], 'questionId'))).toBe(3);
|
@@ -154,14 +154,14 @@ describe('Total score calculation for ' + testExam, () => {
|
|
154
154
|
const scoredTextAnswer = [
|
155
155
|
{
|
156
156
|
type: 'text',
|
157
|
-
questionId:
|
157
|
+
questionId: 83,
|
158
158
|
value: 'Willst du am Samstag mit ins Kino kommen',
|
159
159
|
characterCount: 33,
|
160
160
|
displayNumber: '18.1',
|
161
161
|
},
|
162
162
|
{
|
163
163
|
type: 'text',
|
164
|
-
questionId:
|
164
|
+
questionId: 84,
|
165
165
|
value: 'Bar Bar',
|
166
166
|
characterCount: 6,
|
167
167
|
displayNumber: '18.2',
|
@@ -169,13 +169,13 @@ describe('Total score calculation for ' + testExam, () => {
|
|
169
169
|
];
|
170
170
|
const scoredTextScore = [
|
171
171
|
{
|
172
|
-
questionId:
|
173
|
-
answerId:
|
172
|
+
questionId: 83,
|
173
|
+
answerId: 83,
|
174
174
|
autograding: { score: 2 },
|
175
175
|
},
|
176
176
|
{
|
177
|
-
questionId:
|
178
|
-
answerId:
|
177
|
+
questionId: 84,
|
178
|
+
answerId: 84,
|
179
179
|
autograding: { score: 0 },
|
180
180
|
},
|
181
181
|
];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ResultsContext.test.js","sourceRoot":"","sources":["../../../__tests__/results/ResultsContext.test.tsx"],"names":[],"mappings":";;;;;AAAA,+FAAsE;AACtE,iEAAqD;AACrD,yEAA6F;AAC7F,2BAAmC;AACnC,yCAAiC;AAEjC,gFAAwH;AACxH,mDAA8C;AAE9C,MAAM,SAAS,GAAY;IACzB;QACE,UAAU,EAAE,
|
1
|
+
{"version":3,"file":"ResultsContext.test.js","sourceRoot":"","sources":["../../../__tests__/results/ResultsContext.test.tsx"],"names":[],"mappings":";;;;;AAAA,+FAAsE;AACtE,iEAAqD;AACrD,yEAA6F;AAC7F,2BAAmC;AACnC,yCAAiC;AAEjC,gFAAwH;AACxH,mDAA8C;AAE9C,MAAM,SAAS,GAAY;IACzB;QACE,UAAU,EAAE,GAAG;QACf,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;KAC1B;IACD;QACE,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE;YACV,KAAK,EAAE,CAAC;SACT;QACD,SAAS,EAAE;YACT,MAAM,EAAE;gBACN,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;gBAC9B,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;gBAC9B,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;aAC/B;SACF;QACD,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,KAA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