alexsys-exam-renderer 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -353,31 +353,31 @@ function pt(e, t) {
|
|
|
353
353
|
let n = me(e), r = he(e), i = e.questions.filter(ge).map((e) => ({
|
|
354
354
|
maxScore: n ? pe(e) : 0,
|
|
355
355
|
units: mt(e, t)
|
|
356
|
-
})), a =
|
|
357
|
-
let r = n ? t.
|
|
358
|
-
return t.units.map((t) => {
|
|
359
|
-
let
|
|
356
|
+
})), a = Ut(i, (e) => e.units.length), o = n ? [] : bt(r, a), s = 0, c = i.flatMap((t) => {
|
|
357
|
+
let r = n ? bt(t.maxScore, t.units.length) : [];
|
|
358
|
+
return t.units.map((t, i) => {
|
|
359
|
+
let a = Wt(t.maxScore ?? (n ? r[i] ?? 0 : o[s++] ?? 0));
|
|
360
360
|
return {
|
|
361
361
|
...t,
|
|
362
|
-
maxScore:
|
|
363
|
-
score: t.status === "correct" ?
|
|
362
|
+
maxScore: a,
|
|
363
|
+
score: t.status === "correct" ? a : 0,
|
|
364
364
|
sectionId: e.id
|
|
365
365
|
};
|
|
366
366
|
});
|
|
367
|
-
}),
|
|
367
|
+
}), l = Ht(c, "correct"), u = Ht(c, "incorrect"), d = Ht(c, "unanswered"), f = u + d;
|
|
368
368
|
return {
|
|
369
369
|
badge: e.badge,
|
|
370
|
-
correctCount:
|
|
370
|
+
correctCount: l,
|
|
371
371
|
id: e.id,
|
|
372
|
-
incorrectCount:
|
|
372
|
+
incorrectCount: u,
|
|
373
373
|
maxScore: r,
|
|
374
|
-
notCorrectCount:
|
|
375
|
-
score: Wt(Ut(
|
|
374
|
+
notCorrectCount: f,
|
|
375
|
+
score: Wt(Ut(c, (e) => e.score)),
|
|
376
376
|
title: e.title,
|
|
377
377
|
tone: e.tone,
|
|
378
|
-
totalUnits:
|
|
379
|
-
unansweredCount:
|
|
380
|
-
units:
|
|
378
|
+
totalUnits: c.length,
|
|
379
|
+
unansweredCount: d,
|
|
380
|
+
units: c
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
383
|
function mt(e, t) {
|