feat(bisaya): update choice exercise question format and add question number to review
This commit is contained in:
@@ -529,6 +529,14 @@ function buildChoiceExercise(lesson, didactics, pattern, allPatterns, variant =
|
||||
const seed = simpleHash(`${lesson.title}:${pattern}:${variant}`);
|
||||
const options = rotateArray([pattern, ...distractors], seed % 4);
|
||||
const correctAnswer = options.indexOf(pattern);
|
||||
const normalizedPattern = normalizeCorePatternEntry(
|
||||
didactics.corePatterns.find((entry) => corePatternTarget(entry) === pattern)
|
||||
);
|
||||
// A free speaking prompt can have several valid answers. It must never be
|
||||
// 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);
|
||||
|
||||
return {
|
||||
exerciseTypeId: 2,
|
||||
@@ -536,7 +544,7 @@ function buildChoiceExercise(lesson, didactics, pattern, allPatterns, variant =
|
||||
instruction: 'Wähle die natürlichste Formulierung für die Situation oder den Schwerpunkt der Lektion.',
|
||||
questionData: {
|
||||
type: 'multiple_choice',
|
||||
question: getChoiceQuestion(lesson, didactics),
|
||||
question,
|
||||
options
|
||||
},
|
||||
answerData: {
|
||||
|
||||
Reference in New Issue
Block a user