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) {
|
function pickDistractors(pattern, allPatterns, count) {
|
||||||
return allPatterns
|
return allPatterns
|
||||||
.filter((entry) => entry !== pattern)
|
.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.
|
// used as the question for a single-answer multiple-choice exercise.
|
||||||
const question = normalizedPattern?.gloss
|
const question = normalizedPattern?.gloss
|
||||||
? `Wie sagt man auf Bisaya: „${normalizedPattern.gloss}“?`
|
? `Wie sagt man auf Bisaya: „${normalizedPattern.gloss}“?`
|
||||||
: getChoiceQuestion(lesson, didactics);
|
: getConcreteChoiceQuestion(lesson, didactics, pattern);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
exerciseTypeId: 2,
|
exerciseTypeId: 2,
|
||||||
|
|||||||
@@ -445,9 +445,9 @@ export default {
|
|||||||
return Array.isArray(this.srsDueItems) ? this.srsDueItems.length : 0;
|
return Array.isArray(this.srsDueItems) ? this.srsDueItems.length : 0;
|
||||||
},
|
},
|
||||||
srsDailyCount() {
|
srsDailyCount() {
|
||||||
if (Number.isFinite(Number(this.srsTodayRemaining))) {
|
// Der Server ist die maßgebliche Quelle für fällige Begriffe. Ein alter
|
||||||
return Math.max(0, Number(this.srsTodayRemaining));
|
// localStorage-Sitzungsstand darf eine neue oder erneut fällige
|
||||||
}
|
// Tageswiederholung nicht unsichtbar machen.
|
||||||
return Math.min(this.srsDueCount, this.srsDailyLimit);
|
return Math.min(this.srsDueCount, this.srsDailyLimit);
|
||||||
},
|
},
|
||||||
hardVocabCount() {
|
hardVocabCount() {
|
||||||
|
|||||||
Reference in New Issue
Block a user