feat(bisaya): add concrete choice question handling and update daily count logic for clarity
All checks were successful
Deploy to production / deploy (push) Successful in 3m8s
All checks were successful
Deploy to production / deploy (push) Successful in 3m8s
This commit is contained in:
@@ -519,6 +519,14 @@ function getChoiceQuestion(lesson, didactics) {
|
||||
}
|
||||
}
|
||||
|
||||
function getConcreteChoiceQuestion(lesson, didactics, pattern) {
|
||||
const normalizedPattern = normalizeText(pattern).toLocaleLowerCase('de');
|
||||
if (normalizedPattern === 'mas maayo na ka?') {
|
||||
return 'Eine Person war krank. Du möchtest fragen, ob es ihr inzwischen besser geht. Welche Formulierung passt?';
|
||||
}
|
||||
return getChoiceQuestion(lesson, didactics);
|
||||
}
|
||||
|
||||
function pickDistractors(pattern, allPatterns, count) {
|
||||
return allPatterns
|
||||
.filter((entry) => entry !== pattern)
|
||||
@@ -539,7 +547,7 @@ function buildChoiceExercise(lesson, didactics, pattern, allPatterns, variant =
|
||||
// used as the question for a single-answer multiple-choice exercise.
|
||||
const question = normalizedPattern?.gloss
|
||||
? `Wie sagt man auf Bisaya: „${normalizedPattern.gloss}“?`
|
||||
: getChoiceQuestion(lesson, didactics);
|
||||
: getConcreteChoiceQuestion(lesson, didactics, pattern);
|
||||
|
||||
return {
|
||||
exerciseTypeId: 2,
|
||||
|
||||
@@ -445,9 +445,9 @@ export default {
|
||||
return Array.isArray(this.srsDueItems) ? this.srsDueItems.length : 0;
|
||||
},
|
||||
srsDailyCount() {
|
||||
if (Number.isFinite(Number(this.srsTodayRemaining))) {
|
||||
return Math.max(0, Number(this.srsTodayRemaining));
|
||||
}
|
||||
// Der Server ist die maßgebliche Quelle für fällige Begriffe. Ein alter
|
||||
// localStorage-Sitzungsstand darf eine neue oder erneut fällige
|
||||
// Tageswiederholung nicht unsichtbar machen.
|
||||
return Math.min(this.srsDueCount, this.srsDailyLimit);
|
||||
},
|
||||
hardVocabCount() {
|
||||
|
||||
Reference in New Issue
Block a user