diff --git a/backend/migrations-active/20260928000000-fix-bisaya-generic-sentence-chain-prompt.cjs b/backend/migrations-active/20260928000000-fix-bisaya-generic-sentence-chain-prompt.cjs new file mode 100644 index 0000000..04ce563 --- /dev/null +++ b/backend/migrations-active/20260928000000-fix-bisaya-generic-sentence-chain-prompt.cjs @@ -0,0 +1,25 @@ +'use strict'; + +/** + * The automatic sentence-chain generator used one fixed directions-question + * prompt for every multi-part cue. It therefore contradicted the word cards + * in unrelated lessons such as "Spielen & Freizeit". + */ +module.exports = { + async up(queryInterface) { + await queryInterface.sequelize.query(` + UPDATE community.vocab_grammar_exercise + SET question_data = jsonb_set( + question_data, + '{question}', + '"Ordne die Wortkarten zu den kurzen Formulierungen aus der Aufgabe."'::jsonb + ) + WHERE question_data->>'type' = 'sentence_building' + AND question_data->>'question' = 'Ordne die Wortkarten als drei Fragen: Wohin geht die Person? Wann geht sie los? Mit wem ist sie unterwegs?'; + `); + }, + + async down() { + // The previous prompt was incorrect and must not be restored. + } +}; diff --git a/backend/scripts/create-bisaya-course-content.js b/backend/scripts/create-bisaya-course-content.js index f87b545..01df944 100755 --- a/backend/scripts/create-bisaya-course-content.js +++ b/backend/scripts/create-bisaya-course-content.js @@ -688,7 +688,7 @@ function buildTaskSentenceExercise(lesson, didactics, pattern) { questionData: { ...sentenceExercise.questionData, question: sentenceTarget === scenarioCue - ? 'Ordne die Wortkarten als drei Fragen: Wohin geht die Person? Wann geht sie los? Mit wem ist sie unterwegs?' + ? 'Ordne die Wortkarten zu den kurzen Formulierungen aus der Aufgabe.' : sentenceExercise.questionData.question }, instruction: practicalTask?.text