Add new exercises and vocabulary tests for Bisaya language course: Introduce multiple-choice questions for Week 1, covering greetings, family terms, and common phrases. Enhance learning materials with explanations for each question to aid understanding.

This commit is contained in:
Torsten Schulz (local)
2026-02-02 09:47:59 +01:00
parent f15924c0be
commit 640cdcf671
2 changed files with 244 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
#!/usr/bin/env node
/**
* Script zum Hinzufügen der Lektionen 9 und 10 (Woche 1 - Wiederholung, Woche 1 - Vokabeltest)
* zu bestehenden Bisaya-Kursen, falls diese noch fehlen.
*
* Verwendung:
* node backend/scripts/add-bisaya-week1-lessons.js
*/
import { sequelize } from '../utils/sequelize.js';
import VocabCourseLesson from '../models/community/vocab_course_lesson.js';
const LESSONS_TO_ADD = [
{
lessonNumber: 9,
weekNumber: 1,
dayNumber: 5,
lessonType: 'review',
title: 'Woche 1 - Wiederholung',
description: 'Wiederhole alle Inhalte der ersten Woche',
culturalNotes: 'Wiederholung ist der Schlüssel zum Erfolg!',
targetMinutes: 30,
targetScorePercent: 80,
requiresReview: false
},
{
lessonNumber: 10,
weekNumber: 1,
dayNumber: 5,
lessonType: 'vocab',
title: 'Woche 1 - Vokabeltest',
description: 'Teste dein Wissen aus Woche 1',
culturalNotes: null,
targetMinutes: 15,
targetScorePercent: 80,
requiresReview: true
}
];
async function addBisayaWeek1Lessons() {
await sequelize.authenticate();
console.log('Datenbankverbindung erfolgreich hergestellt.\n');
const [bisayaLanguage] = await sequelize.query(
`SELECT id FROM community.vocab_language WHERE name = 'Bisaya' LIMIT 1`,
{ type: sequelize.QueryTypes.SELECT }
);
if (!bisayaLanguage) {
console.error('❌ Bisaya-Sprache nicht gefunden.');
return;
}
const courses = await sequelize.query(
`SELECT id, title FROM community.vocab_course WHERE language_id = :languageId`,
{
replacements: { languageId: bisayaLanguage.id },
type: sequelize.QueryTypes.SELECT
}
);
console.log(`Gefunden: ${courses.length} Bisaya-Kurs(e)\n`);
let totalAdded = 0;
for (const course of courses) {
console.log(`📚 Kurs: ${course.title} (ID: ${course.id})`);
for (const lessonData of LESSONS_TO_ADD) {
const existing = await VocabCourseLesson.findOne({
where: {
courseId: course.id,
lessonNumber: lessonData.lessonNumber
}
});
if (existing) {
console.log(` ⏭️ Lektion ${lessonData.lessonNumber}: "${lessonData.title}" - bereits vorhanden`);
continue;
}
await VocabCourseLesson.create({
courseId: course.id,
chapterId: null,
lessonNumber: lessonData.lessonNumber,
title: lessonData.title,
description: lessonData.description,
weekNumber: lessonData.weekNumber,
dayNumber: lessonData.dayNumber,
lessonType: lessonData.lessonType,
culturalNotes: lessonData.culturalNotes,
targetMinutes: lessonData.targetMinutes,
targetScorePercent: lessonData.targetScorePercent,
requiresReview: lessonData.requiresReview
});
console.log(` ✅ Lektion ${lessonData.lessonNumber}: "${lessonData.title}" hinzugefügt`);
totalAdded++;
}
console.log('');
}
console.log(`\n🎉 Fertig! ${totalAdded} Lektion(en) hinzugefügt.`);
console.log('💡 Führe danach create-bisaya-course-content.js aus, um die Übungen zu erstellen.');
}
addBisayaWeek1Lessons()
.then(() => {
sequelize.close();
process.exit(0);
})
.catch((error) => {
console.error('❌ Fehler:', error);
sequelize.close();
process.exit(1);
});

View File

@@ -546,6 +546,134 @@ const BISAYA_EXERCISES = {
},
explanation: '"Dili ko mag-Bisaya" bedeutet "Ich spreche kein Bisaya" - nützlich, um zu erklären, dass du noch lernst.'
}
],
// Woche 1 - Wiederholung (Lektion 9)
'Woche 1 - Wiederholung': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wiederholung: Wie sagt man "Wie geht es dir?"?',
instruction: 'Wähle die richtige Begrüßung aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wie geht es dir?" auf Bisaya?',
options: ['Kumusta ka?', 'Maayo', 'Salamat', 'Palihug']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kumusta ka?" ist die Standard-Begrüßung auf Bisaya.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wiederholung: Wie sagt man "Mutter" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Mutter" auf Bisaya?',
options: ['Nanay', 'Tatay', 'Kuya', 'Ate']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Nanay" bedeutet "Mutter" auf Bisaya.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wiederholung: Was bedeutet "Palangga taka"?',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Palangga taka"?',
options: ['Ich hab dich lieb', 'Danke', 'Guten Tag', 'Auf Wiedersehen']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Palangga taka" bedeutet "Ich hab dich lieb" - wärmer als "I love you" im Familienkontext.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wiederholung: Was fragt man mit "Nikaon ka?"?',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Nikaon ka?"?',
options: ['Hast du schon gegessen?', 'Wie geht es dir?', 'Danke', 'Bitte']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Nikaon ka?" bedeutet "Hast du schon gegessen?" - typisch fürsorglich auf den Philippinen.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wiederholung: Wie sagt man "Ich verstehe nicht"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Ich verstehe nicht" auf Bisaya?',
options: ['Wala ko kasabot', 'Salamat', 'Maayo', 'Palihug']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Wala ko kasabot" bedeutet "Ich verstehe nicht".'
}
],
// Woche 1 - Vokabeltest (Lektion 10)
'Woche 1 - Vokabeltest': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Vokabeltest: Kumusta',
instruction: 'Was bedeutet "Kumusta"?',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Kumusta"?',
options: ['Wie geht es dir?', 'Danke', 'Bitte', 'Auf Wiedersehen']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kumusta" kommt von spanisch "¿Cómo está?" - "Wie geht es dir?"'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Vokabeltest: Lola',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Lola"?',
options: ['Großmutter', 'Großvater', 'Mutter', 'Vater']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Lola" = Großmutter, "Lolo" = Großvater.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Vokabeltest: Salamat',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Salamat"?',
options: ['Danke', 'Bitte', 'Entschuldigung', 'Gern geschehen']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Salamat" bedeutet "Danke".'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Vokabeltest: Lami',
instruction: 'Was bedeutet "Lami"?',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Lami"?',
options: ['Lecker', 'Viel', 'Gut', 'Schnell']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Lami" bedeutet "lecker" oder "schmackhaft" - wichtig beim Essen!'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Vokabeltest: Mingaw ko nimo',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Mingaw ko nimo"?',
options: ['Ich vermisse dich', 'Ich freue mich', 'Ich mag dich', 'Ich liebe dich']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Mingaw ko nimo" bedeutet "Ich vermisse dich".'
}
]
};