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,
|
||||
|
||||
Reference in New Issue
Block a user