From 86f3b4c24780aa8fe7b75e4e3308a7fe30b5c514 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 4 Sep 2026 16:07:49 +0200 Subject: [PATCH] feat(bisaya): update kitchen dialog exercise and add migration for alignment --- ...904000001-repair-bisaya-kitchen-dialog.cjs | 25 +++++++++++++++++++ .../scripts/create-bisaya-course-content.js | 12 ++++----- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 backend/migrations-active/20260904000001-repair-bisaya-kitchen-dialog.cjs diff --git a/backend/migrations-active/20260904000001-repair-bisaya-kitchen-dialog.cjs b/backend/migrations-active/20260904000001-repair-bisaya-kitchen-dialog.cjs new file mode 100644 index 0000000..098a66d --- /dev/null +++ b/backend/migrations-active/20260904000001-repair-bisaya-kitchen-dialog.cjs @@ -0,0 +1,25 @@ +'use strict'; + +/** Aligns the question "Where are they?" with its stored kitchen answer. */ +module.exports = { + async up(queryInterface) { + await queryInterface.sequelize.query(` + UPDATE community.vocab_grammar_exercise AS exercise + SET title = 'Personen in der Küche', + instruction = 'Jemand fragt, wo die Personen sind. Antworte, dass sie in der Küche sind.', + question_data = '{"type":"dialog_completion","question":"Welche Antwort passt?","dialog":["A: Asa sila?","B: ..."]}'::jsonb, + answer_data = '{"modelAnswer":"Naa sila sa kusina.","correct":["Naa sila sa kusina.","Naa sila sa kusina"]}'::jsonb, + explanation = '„Asa sila?“ fragt: Wo sind sie? „Naa sila sa kusina.“ bedeutet: Sie sind in der Küche.' + FROM community.vocab_course_lesson AS lesson + WHERE exercise.lesson_id = lesson.id + AND lesson.lesson_number = 12 + AND lesson.title = 'Haus & Familie' + AND exercise.exercise_number = 13 + AND exercise.title = 'Nach der Küche fragen'; + `); + }, + + async down() { + // Do not restore the semantically mismatched dialogue. + } +}; diff --git a/backend/scripts/create-bisaya-course-content.js b/backend/scripts/create-bisaya-course-content.js index cd4a9ee..66a5525 100755 --- a/backend/scripts/create-bisaya-course-content.js +++ b/backend/scripts/create-bisaya-course-content.js @@ -2429,23 +2429,21 @@ const BISAYA_EXERCISES = { explanation: '„Naa sila sa …“ = Sie sind in/am …' }, withTypeName('dialog_completion', { - title: 'Nach der Küche fragen', - instruction: 'Ergänze die passende Antwort (Ortsangaben wie didto/luyo kommen in der nächsten Lektion).', + title: 'Personen in der Küche', + instruction: 'Jemand fragt, wo die Personen sind. Antworte, dass sie in der Küche sind.', questionData: { type: 'dialog_completion', question: 'Welche Antwort passt?', - dialog: ['A: Asa ang kusina?', 'B: ...'] + dialog: ['A: Asa sila?', 'B: ...'] }, answerData: { modelAnswer: 'Naa sila sa kusina.', correct: [ 'Naa sila sa kusina.', - 'Naa siya sa kusina.', - 'Naa ko sa kusina.', - 'Sa kusina.' + 'Naa sila sa kusina' ] }, - explanation: 'Mit „Naa … sa kusina“ kannst du sagen, wo sich jemand befindet – dasselbe Muster wie „Naa sila sa kusina.“ in der Lektion.' + explanation: '„Asa sila?“ fragt: Wo sind sie? „Naa sila sa kusina.“ bedeutet: Sie sind in der Küche.' }), withTypeName('situational_response', { title: 'Zu Hause kurz beschreiben',