feat(bisaya): enhance speaking prompts and practical tasks for lesson 46
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
/** Aligns the generated word order task with its promised three-question scene. */
|
||||
module.exports = {
|
||||
async up(queryInterface) {
|
||||
await queryInterface.sequelize.query(`
|
||||
UPDATE community.vocab_grammar_exercise AS exercise
|
||||
SET question_data = '{"type":"sentence_building","question":"Baue eine natürliche Fragekette mit drei kurzen Fragen.","tokens":["Asa","ka","padulong","Kanus-a","ka","moadto","Kinsa","imong","kuyog"]}'::jsonb,
|
||||
answer_data = '{"correct":["Asa ka padulong? Kanus-a ka moadto? Kinsa imong kuyog?"]}'::jsonb,
|
||||
explanation = 'Die Fragekette lautet: "Asa ka padulong? Kanus-a ka moadto? Kinsa imong kuyog?"'
|
||||
FROM community.vocab_course_lesson AS lesson
|
||||
WHERE exercise.lesson_id = lesson.id
|
||||
AND lesson.lesson_number = 46
|
||||
AND lesson.title = 'Fragen im Alltag vertiefen'
|
||||
AND exercise.title = 'Fragen im Alltag vertiefen: Satz aus dem Alltag bauen';
|
||||
`);
|
||||
},
|
||||
async down() {
|
||||
// Do not restore the mismatched single-sentence task.
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
|
||||
/** Makes the production tasks explicit instead of naming only grammar categories. */
|
||||
module.exports = {
|
||||
async up(queryInterface) {
|
||||
await queryInterface.sequelize.query(`
|
||||
UPDATE community.vocab_grammar_exercise AS exercise
|
||||
SET question_data = jsonb_set(
|
||||
exercise.question_data,
|
||||
'{question}',
|
||||
to_jsonb('Ordne die Wortkarten als drei Fragen: Wohin geht die Person? Wann geht sie los? Mit wem ist sie unterwegs?'::text)
|
||||
)
|
||||
FROM community.vocab_course_lesson AS lesson
|
||||
WHERE exercise.lesson_id = lesson.id
|
||||
AND lesson.lesson_number = 46
|
||||
AND lesson.title = 'Fragen im Alltag vertiefen'
|
||||
AND exercise.title = 'Fragen im Alltag vertiefen: Satz aus dem Alltag bauen';
|
||||
|
||||
UPDATE community.vocab_grammar_exercise AS exercise
|
||||
SET question_data = jsonb_set(
|
||||
exercise.question_data,
|
||||
'{question}',
|
||||
to_jsonb('Eine Person geht gleich los. Frage sie auf Bisaya nacheinander: Wohin geht sie? Wann geht sie los? Mit wem ist sie unterwegs? Sprich oder schreibe alle drei Fragen.'::text)
|
||||
)
|
||||
FROM community.vocab_course_lesson AS lesson
|
||||
WHERE exercise.lesson_id = lesson.id
|
||||
AND lesson.lesson_number = 46
|
||||
AND lesson.title = 'Fragen im Alltag vertiefen'
|
||||
AND exercise.title = 'Fragen im Alltag vertiefen: Laut sprechen';
|
||||
`);
|
||||
},
|
||||
async down() {
|
||||
// The older prompts were less specific and are deliberately not restored.
|
||||
}
|
||||
};
|
||||
@@ -78,7 +78,7 @@ export const BISAYA_PHASE3_DIDACTICS = {
|
||||
{ title: 'ka und imong', text: 'ka bezieht sich auf du als Person, imong auf dein/deine.', example: 'Asa ka padulong? Unsa imong buhaton?' }
|
||||
],
|
||||
speakingPrompts: [
|
||||
{ title: 'Drei-Fragen-Kette', prompt: 'Frage nach Ziel, Zeit und Begleitung.', cue: 'Asa ka padulong? Kanus-a ka moadto? Kinsa imong kuyog?' },
|
||||
{ title: 'Ausgehpläne klären', prompt: 'Eine Person geht gleich los. Frage sie nacheinander, wohin sie geht, wann sie losgeht und mit wem sie unterwegs ist. Sprich oder schreibe alle drei Bisaya-Fragen.', cue: 'Asa ka padulong? Kanus-a ka moadto? Kinsa imong kuyog?' },
|
||||
{ title: 'Reparaturfrage', prompt: 'Sage, dass du fragen möchtest, bitte um Wiederholung und frage nach Bedeutung.', cue: 'Pwede ko mangutana? Palihug ka mubalik? Unsay pasabot ani?' }
|
||||
],
|
||||
practicalTasks: [
|
||||
|
||||
@@ -645,14 +645,28 @@ function buildSentenceExercise(lessonTitle, pattern) {
|
||||
}
|
||||
|
||||
function buildTaskSentenceExercise(lesson, didactics, pattern) {
|
||||
const sentenceExercise = buildSentenceExercise(lesson.title, pattern);
|
||||
if (!sentenceExercise) return null;
|
||||
|
||||
const practicalTask = Array.isArray(didactics.practicalTasks) ? didactics.practicalTasks[0] : null;
|
||||
const speakingPrompt = Array.isArray(didactics.speakingPrompts) ? didactics.speakingPrompts[0] : null;
|
||||
const taskText = normalizeText(practicalTask?.text || '');
|
||||
const scenarioCue = normalizeText(speakingPrompt?.cue || '');
|
||||
// When the transfer task explicitly asks for a chain or scene, build that
|
||||
// whole cue. Using an unrelated single core pattern makes the UI promise
|
||||
// something different from the words it offers.
|
||||
const sentenceTarget = scenarioCue && /drei kurze fragen|fragekette|szene|dialog/i.test(taskText)
|
||||
? scenarioCue
|
||||
: pattern;
|
||||
const sentenceExercise = buildSentenceExercise(lesson.title, sentenceTarget);
|
||||
if (!sentenceExercise) return null;
|
||||
|
||||
return {
|
||||
...sentenceExercise,
|
||||
title: `${lesson.title}: Satz aus dem Alltag bauen`,
|
||||
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?'
|
||||
: sentenceExercise.questionData.question
|
||||
},
|
||||
instruction: practicalTask?.text
|
||||
? `Baue die passende Formulierung für diese Aufgabe: ${practicalTask.text}`
|
||||
: 'Ordne die Wörter zu einem natürlichen Bisaya-Satz aus dem Alltag.'
|
||||
|
||||
Reference in New Issue
Block a user