830 lines
28 KiB
JavaScript
830 lines
28 KiB
JavaScript
#!/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 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.'
|
|
}
|
|
],
|
|
|
|
// 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;
|
|
}
|
|
|
|
// Bei Woche-1-Wiederholung/Vokabeltest: Alte Platzhalter entfernen und ersetzen
|
|
const replacePlaceholders = ['Woche 1 - Wiederholung', 'Woche 1 - Vokabeltest'].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);
|
|
});
|