Files
yourpart3/backend/scripts/create-bisaya-course-content.js

1114 lines
39 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env node
/**
* Script zum Erstellen von sprachspezifischem Content für Bisaya-Kurse
*
* Verwendung:
* node backend/scripts/create-bisaya-course-content.js
*
* Erstellt Grammatik-Übungen für alle Lektionen in Bisaya-Kursen basierend auf dem Thema der Lektion.
*/
import { sequelize } from '../utils/sequelize.js';
import VocabCourseLesson from '../models/community/vocab_course_lesson.js';
import VocabGrammarExercise from '../models/community/vocab_grammar_exercise.js';
import VocabCourse from '../models/community/vocab_course.js';
import User from '../models/community/user.js';
// Bisaya-spezifische Übungen basierend auf Lektionsthemen
const BISAYA_EXERCISES = {
// Lektion 1: Begrüßungen & Höflichkeit
'Begrüßungen & Höflichkeit': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wie geht es dir?" auf Bisaya?',
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, ähnlich wie "Wie geht es dir?"'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Begrüßungen vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: 'Kumusta ka? Maayo {gap} (ich). Salamat.',
gaps: 1
},
answerData: {
type: 'gap_fill',
answers: ['ko']
},
explanation: '"Maayo ko" bedeutet "Mir geht es gut". "ko" ist "ich" auf Bisaya.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Salamat"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Salamat"?',
options: ['Danke', 'Bitte', 'Entschuldigung', 'Auf Wiedersehen']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Salamat" bedeutet "Danke" auf Bisaya.'
}
],
// Lektion 3: Familienwörter
'Familienwörter': [
{
exerciseTypeId: 2, // multiple_choice
title: '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. "Mama" wird auch verwendet.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Vater" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Vater" auf Bisaya?',
options: ['Tatay', 'Nanay', 'Kuya', 'Ate']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Tatay" bedeutet "Vater" auf Bisaya. "Papa" wird auch verwendet.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "älterer Bruder" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "älterer Bruder" auf Bisaya?',
options: ['Kuya', 'Ate', 'Nanay', 'Tatay']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Kuya" bedeutet "älterer Bruder" auf Bisaya. Wird auch für respektvolle Anrede von älteren Männern verwendet.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "ältere Schwester" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "ältere Schwester" auf Bisaya?',
options: ['Ate', 'Kuya', 'Nanay', 'Tatay']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Ate" bedeutet "ältere Schwester" auf Bisaya. Wird auch für respektvolle Anrede von älteren Frauen verwendet.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Großmutter" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Großmutter" auf Bisaya?',
options: ['Lola', 'Lolo', 'Nanay', 'Tatay']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Lola" bedeutet "Großmutter" auf Bisaya.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Großvater" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Großvater" auf Bisaya?',
options: ['Lolo', 'Lola', 'Nanay', 'Tatay']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Lolo" bedeutet "Großvater" auf Bisaya.'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Familienwörter vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Familienwörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} (Mutter) | {gap} (Vater) | {gap} (älterer Bruder) | {gap} (ältere Schwester) | {gap} (Großmutter) | {gap} (Großvater)',
gaps: 6
},
answerData: {
type: 'gap_fill',
answers: ['Nanay', 'Tatay', 'Kuya', 'Ate', 'Lola', 'Lolo']
},
explanation: 'Nanay = Mutter, Tatay = Vater, Kuya = älterer Bruder, Ate = ältere Schwester, Lola = Großmutter, Lolo = Großvater.'
},
{
exerciseTypeId: 4, // transformation
title: 'Familienwörter übersetzen',
instruction: 'Übersetze das Familienwort ins Bisaya.',
questionData: {
type: 'transformation',
text: 'Mutter',
sourceLanguage: 'Deutsch',
targetLanguage: 'Bisaya'
},
answerData: {
type: 'transformation',
correct: 'Nanay',
alternatives: ['Mama', 'Nanay', 'Inahan']
},
explanation: '"Nanay" oder "Mama" bedeutet "Mutter" auf Bisaya.'
}
],
// Lektion: Haus & Familie (Balay, Kwarto, Kusina, Pamilya)
'Haus & Familie': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Haus" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Haus" auf Bisaya?',
options: ['Balay', 'Kwarto', 'Kusina', 'Pamilya']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Balay" bedeutet "Haus" auf Bisaya.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Zimmer" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Zimmer" auf Bisaya?',
options: ['Kwarto', 'Balay', 'Kusina', 'Pamilya']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kwarto" bedeutet "Zimmer" (Raum/Schlafzimmer).'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Küche" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Küche" auf Bisaya?',
options: ['Kusina', 'Balay', 'Kwarto', 'Pamilya']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kusina" bedeutet "Küche".'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Familie" auf Bisaya?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Familie" auf Bisaya?',
options: ['Pamilya', 'Balay', 'Kwarto', 'Kusina']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Pamilya" bedeutet "Familie".'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Haus & Räume vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} (Haus) | {gap} (Zimmer) | {gap} (Küche) | {gap} (Familie)',
gaps: 4
},
answerData: {
type: 'gap_fill',
answers: ['Balay', 'Kwarto', 'Kusina', 'Pamilya']
},
explanation: 'Balay = Haus, Kwarto = Zimmer, Kusina = Küche, Pamilya = Familie.'
},
{
exerciseTypeId: 4, // transformation
title: 'Haus-Satz übersetzen',
instruction: 'Übersetze den Satz ins Bisaya.',
questionData: {
type: 'transformation',
text: 'Unser Haus hat zwei Zimmer',
sourceLanguage: 'Deutsch',
targetLanguage: 'Bisaya'
},
answerData: {
type: 'transformation',
correct: 'Ang among balay kay naay duha ka kwarto',
alternatives: ['Among balay naay duha ka kwarto', 'Ang among balay adunay duha ka kwarto']
},
explanation: '"Balay" = Haus, "kwarto" = Zimmer, "duha ka" = zwei (Stück).'
}
],
// Lektion 15: Zeitformen - Grundlagen
'Zeitformen - Grundlagen': [
{
exerciseTypeId: 4, // transformation
title: 'Vergangenheit verstehen',
instruction: 'Was bedeutet "Ni-kaon ko"?',
questionData: {
type: 'transformation',
text: 'Ni-kaon ko',
sourceLanguage: 'Bisaya',
targetLanguage: 'Deutsch'
},
answerData: {
type: 'transformation',
correct: 'Ich habe gegessen',
alternatives: ['I ate', 'I have eaten']
},
explanation: 'Das Präfix "Ni-" zeigt die Vergangenheit an. "Ni-kaon ko" bedeutet "Ich habe gegessen".'
},
{
exerciseTypeId: 4, // transformation
title: 'Zukunft verstehen',
instruction: 'Was bedeutet "Mo-kaon ko"?',
questionData: {
type: 'transformation',
text: 'Mo-kaon ko',
sourceLanguage: 'Bisaya',
targetLanguage: 'Deutsch'
},
answerData: {
type: 'transformation',
correct: 'Ich werde essen',
alternatives: ['I will eat', 'I am going to eat']
},
explanation: 'Das Präfix "Mo-" zeigt die Zukunft an. "Mo-kaon ko" bedeutet "Ich werde essen".'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Zeitformen erkennen',
instruction: 'Setze die richtigen Präfixe ein.',
questionData: {
type: 'gap_fill',
text: '{gap}-kaon ko (Vergangenheit) | {gap}-kaon ko (Zukunft)',
gaps: 2
},
answerData: {
type: 'gap_fill',
answers: ['Ni', 'Mo']
},
explanation: 'Ni- für Vergangenheit, Mo- für Zukunft.'
}
],
// Lektion 25: Höflichkeitsformen
'Höflichkeitsformen': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Bitte langsam"?',
instruction: 'Wähle die höfliche Form aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Bitte langsam" auf Bisaya?',
options: ['Hinay-hinay lang', 'Palihug', 'Salamat', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Hinay-hinay lang" bedeutet "Bitte langsam" und ist sehr höflich.'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Höfliche Sätze vervollständigen',
instruction: 'Fülle die Lücken mit höflichen Wörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} lang (Bitte langsam), wala ko kasabot. {gap} ka mubalik? (Bitte wiederholen)',
gaps: 2
},
answerData: {
type: 'gap_fill',
answers: ['Hinay-hinay', 'Palihug']
},
explanation: '"Hinay-hinay lang" = "Bitte langsam", "Palihug" = "Bitte".'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Palihug"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Palihug"?',
options: ['Bitte', 'Danke', 'Entschuldigung', 'Gern geschehen']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Palihug" bedeutet "Bitte" auf Bisaya und wird für höfliche Bitten verwendet.'
}
],
// Lektion: Überlebenssätze
'Überlebenssätze': [
{
exerciseTypeId: 2, // multiple_choice
title: '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', 'Palihug', 'Salamat', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Wala ko kasabot" bedeutet "Ich verstehe nicht" - sehr wichtig für Anfänger!'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Kannst du das wiederholen?"?',
instruction: 'Wähle die richtige Bitte aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Kannst du das wiederholen?" auf Bisaya?',
options: ['Palihug ka mubalik?', 'Salamat', 'Maayo', 'Kumusta ka?']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Palihug ka mubalik?" bedeutet "Bitte kannst du wiederholen?" - essentiell für das Lernen!'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Überlebenssätze vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} ko kasabot (Ich verstehe nicht). {gap} ka mubalik? (Bitte wiederholen) {gap} lang (Bitte langsam).',
gaps: 3
},
answerData: {
type: 'gap_fill',
answers: ['Wala', 'Palihug', 'Hinay-hinay']
},
explanation: '"Wala ko kasabot" = "Ich verstehe nicht", "Palihug ka mubalik?" = "Bitte wiederholen", "Hinay-hinay lang" = "Bitte langsam".'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wo ist...?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wo ist die Toilette?" auf Bisaya?',
options: ['Asa ang CR?', 'Kumusta ka?', 'Salamat', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Asa ang CR?" bedeutet "Wo ist die Toilette?" - "Asa" = "Wo", "CR" = "Comfort Room" (Toilette).'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wie viel kostet das?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wie viel kostet das?" auf Bisaya?',
options: ['Tagpila ni?', 'Asa ni?', 'Unsa ni?', 'Kinsa ni?']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Tagpila ni?" bedeutet "Wie viel kostet das?" - sehr nützlich beim Einkaufen!'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Wichtige Fragen bilden',
instruction: 'Fülle die Lücken mit den richtigen Fragewörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} ang CR? (Wo ist die Toilette?) | {gap} ni? (Wie viel kostet das?) | {gap} ni? (Was ist das?)',
gaps: 3
},
answerData: {
type: 'gap_fill',
answers: ['Asa', 'Tagpila', 'Unsa']
},
explanation: '"Asa" = "Wo", "Tagpila" = "Wie viel", "Unsa" = "Was".'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Entschuldigung"?',
instruction: 'Wähle die richtige Entschuldigung aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Entschuldigung" auf Bisaya?',
options: ['Pasensya', 'Salamat', 'Palihug', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Pasensya" bedeutet "Entschuldigung" oder "Entschuldige bitte" - wichtig für höfliche Kommunikation.'
},
{
exerciseTypeId: 4, // transformation
title: 'Überlebenssätze übersetzen',
instruction: 'Übersetze den Satz ins Bisaya.',
questionData: {
type: 'transformation',
text: 'Ich spreche kein Bisaya',
sourceLanguage: 'Deutsch',
targetLanguage: 'Bisaya'
},
answerData: {
type: 'transformation',
correct: 'Dili ko mag-Bisaya',
alternatives: ['Wala ko mag-Bisaya', 'Dili ko makasabot Bisaya']
},
explanation: '"Dili ko mag-Bisaya" bedeutet "Ich spreche kein Bisaya" - nützlich, um zu erklären, dass du noch lernst.'
}
],
// Auch für "Überlebenssätze - Teil 1" und "Überlebenssätze - Teil 2"
'Überlebenssätze - Teil 1': [
{
exerciseTypeId: 2, // multiple_choice
title: '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', 'Palihug', 'Salamat', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Wala ko kasabot" bedeutet "Ich verstehe nicht" - sehr wichtig für Anfänger!'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Kannst du das wiederholen?"?',
instruction: 'Wähle die richtige Bitte aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Kannst du das wiederholen?" auf Bisaya?',
options: ['Palihug ka mubalik?', 'Salamat', 'Maayo', 'Kumusta ka?']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Palihug ka mubalik?" bedeutet "Bitte kannst du wiederholen?" - essentiell für das Lernen!'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wo ist...?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wo ist die Toilette?" auf Bisaya?',
options: ['Asa ang CR?', 'Kumusta ka?', 'Salamat', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Asa ang CR?" bedeutet "Wo ist die Toilette?" - "Asa" = "Wo", "CR" = "Comfort Room" (Toilette).'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Überlebenssätze vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} ko kasabot (Ich verstehe nicht). {gap} ka mubalik? (Bitte wiederholen)',
gaps: 2
},
answerData: {
type: 'gap_fill',
answers: ['Wala', 'Palihug']
},
explanation: '"Wala ko kasabot" = "Ich verstehe nicht", "Palihug ka mubalik?" = "Bitte wiederholen".'
}
],
'Überlebenssätze - Teil 2': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wie viel kostet das?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wie viel kostet das?" auf Bisaya?',
options: ['Tagpila ni?', 'Asa ni?', 'Unsa ni?', 'Kinsa ni?']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Tagpila ni?" bedeutet "Wie viel kostet das?" - sehr nützlich beim Einkaufen!'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Entschuldigung"?',
instruction: 'Wähle die richtige Entschuldigung aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Entschuldigung" auf Bisaya?',
options: ['Pasensya', 'Salamat', 'Palihug', 'Maayo']
},
answerData: {
type: 'multiple_choice',
correctAnswer: 0
},
explanation: '"Pasensya" bedeutet "Entschuldigung" oder "Entschuldige bitte" - wichtig für höfliche Kommunikation.'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Wichtige Fragen bilden',
instruction: 'Fülle die Lücken mit den richtigen Fragewörtern.',
questionData: {
type: 'gap_fill',
text: '{gap} ni? (Wie viel kostet das?) | {gap} ni? (Was ist das?) | {gap} lang (Bitte langsam)',
gaps: 3
},
answerData: {
type: 'gap_fill',
answers: ['Tagpila', 'Unsa', 'Hinay-hinay']
},
explanation: '"Tagpila" = "Wie viel", "Unsa" = "Was", "Hinay-hinay lang" = "Bitte langsam".'
},
{
exerciseTypeId: 4, // transformation
title: 'Überlebenssätze übersetzen',
instruction: 'Übersetze den Satz ins Bisaya.',
questionData: {
type: 'transformation',
text: 'Ich spreche kein Bisaya',
sourceLanguage: 'Deutsch',
targetLanguage: 'Bisaya'
},
answerData: {
type: 'transformation',
correct: 'Dili ko mag-Bisaya',
alternatives: ['Wala ko mag-Bisaya', 'Dili ko makasabot Bisaya']
},
explanation: '"Dili ko mag-Bisaya" bedeutet "Ich spreche kein Bisaya" - nützlich, um zu erklären, dass du noch lernst.'
}
],
// Lektion 11: Alltagsgespräche - Teil 1 (~2030 Min Übungsmaterial)
'Alltagsgespräche - Teil 1': [
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wie war dein Tag?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wie war dein Tag?" auf Bisaya?',
options: ['Kumusta ang imong adlaw?', 'Kumusta ka?', 'Unsa ni?', 'Asa ka?']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kumusta ang imong adlaw?" bedeutet "Wie war dein Tag?" - typische Alltagsfrage.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Was machst du?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Was machst du?" auf Bisaya?',
options: ['Unsa imong ginabuhat?', 'Kumusta ka?', 'Asa ka?', 'Tagpila ni?']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Unsa imong ginabuhat?" bedeutet "Was machst du?" - "Unsa" = was, "ginabuhat" = machst.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Maayo ra"?',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Maayo ra"?',
options: ['Es geht (so lala)', 'Sehr gut', 'Schlecht', 'Danke']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Maayo ra" bedeutet "Es geht" oder "So lala" - typische Antwort auf "Wie geht es dir?"'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Nagtrabaho ko"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Nagtrabaho ko"?',
options: ['Ich arbeite', 'Ich habe gegessen', 'Ich schlafe', 'Ich gehe']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Nagtrabaho ko" bedeutet "Ich arbeite" - "trabaho" = Arbeit.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Busy ko"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Busy ko"?',
options: ['Ich bin beschäftigt', 'Ich bin müde', 'Ich bin glücklich', 'Ich schlafe']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Busy ko" bedeutet "Ich bin beschäftigt" - "busy" wurde aus dem Englischen übernommen.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Kapoy ko"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Kapoy ko"?',
options: ['Ich bin müde', 'Ich bin beschäftigt', 'Ich bin krank', 'Ich bin glücklich']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kapoy ko" bedeutet "Ich bin müde" - "kapoy" = müde.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Nagpahuway ko"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Nagpahuway ko"?',
options: ['Ich ruhe mich aus', 'Ich arbeite', 'Ich schlafe', 'Ich esse']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Nagpahuway ko" bedeutet "Ich ruhe mich aus" - "pahuway" = Ruhe.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Wie sagt man "Wie heißt du?"?',
instruction: 'Wähle die richtige Frage aus.',
questionData: {
type: 'multiple_choice',
question: 'Wie sagt man "Wie heißt du?" auf Bisaya?',
options: ['Unsa imong ngalan?', 'Kumusta ka?', 'Kinsa ka?', 'Asa ka?']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Unsa imong ngalan?" bedeutet "Wie heißt du?" - "ngalan" = Name.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Kinsa ka?"?',
instruction: 'Wähle die richtige Bedeutung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Kinsa ka?"?',
options: ['Wer bist du?', 'Wo bist du?', 'Was machst du?', 'Wie geht es dir?']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Kinsa ka?" bedeutet "Wer bist du?" - "kinsa" = wer.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Nalipay ko"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Nalipay ko"?',
options: ['Ich bin glücklich', 'Ich bin traurig', 'Ich bin müde', 'Ich bin krank']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Nalipay ko" bedeutet "Ich bin glücklich" - "lipay" = glücklich.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Naa koy trabaho"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Naa koy trabaho"?',
options: ['Ich habe Arbeit', 'Ich habe keine Arbeit', 'Ich arbeite', 'Ich ruhe mich aus']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Naa koy trabaho" bedeutet "Ich habe Arbeit" - "naa" = haben, "trabaho" = Arbeit.'
},
{
exerciseTypeId: 2, // multiple_choice
title: 'Was bedeutet "Wala koy trabaho"?',
instruction: 'Wähle die richtige Übersetzung.',
questionData: {
type: 'multiple_choice',
question: 'Was bedeutet "Wala koy trabaho"?',
options: ['Ich habe keine Arbeit', 'Ich habe Arbeit', 'Ich arbeite', 'Ich bin müde']
},
answerData: { type: 'multiple_choice', correctAnswer: 0 },
explanation: '"Wala koy trabaho" bedeutet "Ich habe keine Arbeit" - "wala" = nicht haben.'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Alltagsgespräch vervollständigen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: 'Kumusta ang imong {gap}? (Wie war dein Tag?) - Maayo {gap}. (Es geht.)',
gaps: 2
},
answerData: {
type: 'gap_fill',
answers: ['adlaw', 'ra']
},
explanation: '"adlaw" = Tag, "Maayo ra" = Es geht.'
},
{
exerciseTypeId: 1, // gap_fill
title: 'Antworten auf Alltagsfragen',
instruction: 'Fülle die Lücken mit den richtigen Bisaya-Wörtern.',
questionData: {
type: 'gap_fill',
text: 'Unsa imong ginabuhat? (Was machst du?) - {gap} ko. (Ich arbeite.) | Kapoy {gap}. (Ich bin müde.)',
gaps: 2
},
answerData: {
type: 'gap_fill',
answers: ['Nagtrabaho', 'ko']
},
explanation: '"Nagtrabaho ko" = Ich arbeite, "Kapoy ko" = Ich bin müde.'
},
{
exerciseTypeId: 4, // transformation
title: 'Alltagssatz übersetzen',
instruction: 'Übersetze den Satz ins Bisaya.',
questionData: {
type: 'transformation',
text: 'Ich bin glücklich',
sourceLanguage: 'Deutsch',
targetLanguage: 'Bisaya'
},
answerData: {
type: 'transformation',
correct: 'Nalipay ko',
alternatives: ['Malipayon ko', 'Nalipay ako']
},
explanation: '"Nalipay ko" bedeutet "Ich bin glücklich" auf Bisaya.'
}
],
// 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".'
}
]
};
async function findOrCreateSystemUser() {
let systemUser = await User.findOne({
where: {
username: 'system'
}
});
if (!systemUser) {
systemUser = await User.findOne({
where: {
username: 'admin'
}
});
}
if (!systemUser) {
console.error('❌ System-Benutzer nicht gefunden.');
throw new Error('System user not found');
}
return systemUser;
}
function getExercisesForLesson(lessonTitle) {
// Suche nach exaktem Titel
if (BISAYA_EXERCISES[lessonTitle]) {
return BISAYA_EXERCISES[lessonTitle];
}
// Fallback: Suche nach Teilstring
for (const [key, exercises] of Object.entries(BISAYA_EXERCISES)) {
if (lessonTitle.includes(key) || key.includes(lessonTitle)) {
return exercises;
}
}
// Keine Übungen für unbekannte Lektionen (statt Dummy-Übungen)
return [];
}
async function createBisayaCourseContent() {
await sequelize.authenticate();
console.log('Datenbankverbindung erfolgreich hergestellt.\n');
const systemUser = await findOrCreateSystemUser();
console.log(`Verwende System-Benutzer: ${systemUser.username} (ID: ${systemUser.id})\n`);
// Finde alle Bisaya-Kurse
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, owner_user_id AS "ownerUserId" FROM community.vocab_course WHERE language_id = :languageId`,
{
replacements: { languageId: bisayaLanguage.id },
type: sequelize.QueryTypes.SELECT
}
);
console.log(`Gefunden: ${courses.length} Bisaya-Kurse\n`);
let totalExercisesAdded = 0;
let totalLessonsProcessed = 0;
for (const course of courses) {
console.log(`📚 Kurs: ${course.title} (ID: ${course.id})`);
const lessons = await VocabCourseLesson.findAll({
where: { courseId: course.id },
order: [['lessonNumber', 'ASC']]
});
console.log(` ${lessons.length} Lektionen gefunden\n`);
for (const lesson of lessons) {
const exercises = getExercisesForLesson(lesson.title);
if (exercises.length === 0) {
const existingCount = await VocabGrammarExercise.count({ where: { lessonId: lesson.id } });
if (existingCount > 0) {
console.log(` ⏭️ Lektion ${lesson.lessonNumber}: "${lesson.title}" - bereits ${existingCount} Übung(en) vorhanden`);
} else {
console.log(` ⚠️ Lektion ${lesson.lessonNumber}: "${lesson.title}" - keine Übungen definiert`);
}
continue;
}
// Lektionen mit Platzhalter-Ersetzung: alte Übungen entfernen und durch echte ersetzen
const replacePlaceholders = [
'Woche 1 - Wiederholung',
'Woche 1 - Vokabeltest',
'Alltagsgespräche - Teil 1',
'Haus & Familie'
].includes(lesson.title);
const existingCount = await VocabGrammarExercise.count({
where: { lessonId: lesson.id }
});
if (existingCount > 0 && !replacePlaceholders) {
console.log(` ⏭️ Lektion ${lesson.lessonNumber}: "${lesson.title}" - bereits ${existingCount} Übung(en) vorhanden`);
continue;
}
if (replacePlaceholders && existingCount > 0) {
const deleted = await VocabGrammarExercise.destroy({ where: { lessonId: lesson.id } });
console.log(` 🗑️ Lektion ${lesson.lessonNumber}: "${lesson.title}" - ${deleted} Platzhalter entfernt`);
}
// Erstelle Übungen
let exerciseNumber = 1;
for (const exerciseData of exercises) {
await VocabGrammarExercise.create({
lessonId: lesson.id,
exerciseTypeId: exerciseData.exerciseTypeId,
exerciseNumber: exerciseNumber++,
title: exerciseData.title,
instruction: exerciseData.instruction,
questionData: JSON.stringify(exerciseData.questionData),
answerData: JSON.stringify(exerciseData.answerData),
explanation: exerciseData.explanation,
createdByUserId: course.ownerUserId || systemUser.id
});
totalExercisesAdded++;
}
console.log(` ✅ Lektion ${lesson.lessonNumber}: "${lesson.title}" - ${exercises.length} Übung(en) erstellt`);
totalLessonsProcessed++;
}
console.log('');
}
console.log(`\n🎉 Zusammenfassung:`);
console.log(` ${totalLessonsProcessed} Lektionen bearbeitet`);
console.log(` ${totalExercisesAdded} Grammatik-Übungen erstellt`);
}
createBisayaCourseContent()
.then(() => {
sequelize.close();
process.exit(0);
})
.catch((error) => {
console.error('❌ Fehler:', error);
sequelize.close();
process.exit(1);
});