feat(bisaya-course): enhance lesson structure and didactics integration
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s

- Added an auto-incrementing primary key to the UserHouse model for improved database management.
- Integrated new didactics fragments from the Bisaya course plan, including relationship anchor didactics and lessons for enhanced curriculum depth.
- Updated lesson retrieval logic to utilize planned lesson titles, improving the accuracy of didactics resolution.
- Refactored course content generation scripts to incorporate new didactics, ensuring a comprehensive learning experience for users.
This commit is contained in:
Torsten Schulz (local)
2026-04-17 11:08:12 +02:00
parent a022b8c174
commit f8f5017436
7 changed files with 874 additions and 105 deletions

View File

@@ -10,10 +10,30 @@ import { sequelize } from '../utils/sequelize.js';
import VocabCourseLesson from '../models/community/vocab_course_lesson.js';
import { getBisayaLessonPedagogy } from './bisaya-course-phase2-pedagogy.js';
import { BISAYA_DIDACTICS_FRAGMENTS } from './bisaya-course-phase1.js';
import {
BISAYA_DIDACTICS_24_43,
BISAYA_LESSONS_24_43_BY_NUMBER,
BISAYA_RELATIONSHIP_ANCHOR_DIDACTICS
} from './bisaya-course-plan-24-43.js';
/** Alte Kurstitel → aktueller Schlüssel in LESSON_DIDACTICS (bestehende Datenbanken). */
export const LEGACY_DIDACTICS_TITLE_MAP = {
'Zahlen & Preise': 'Zahlen 120'
'Zahlen & Preise': 'Zahlen 120',
'Gefühle & Emotionen': 'Gefühle im Alltag',
'Höflichkeitsformen': 'Höflichkeitsformen praktisch',
'Kinder & Spiel': 'Kinder, Spiel & Routine',
'Woche 3 - Wiederholung': 'Woche 3 - Intensivwiederholung',
'Woche 3 - Vokabeltest': 'Woche 3 - Checkpoint',
'Freies Gespräch - Thema 1': 'Alltagsszene: Zuhause morgens',
'Wiederholung - Woche 1 & 2': 'Spiralreview: Woche 1-2 im Alltag',
'Freies Gespräch - Thema 2': 'Alltagsszene: Besuch am Nachmittag',
'Wiederholung - Woche 3': 'Spiralreview: Gefühle & Gesundheit',
'Komplexere Gespräche': 'Längeres Gespräch: Planung und Familie',
'Gesamtwiederholung': 'Gesamtwiederholung mit Fehlerclustern',
'Praktische Übung': 'Praktische Übung: Markt + Familie',
'Abschlusstest - Vokabeln': 'Abschlusstest Wortschatz aktiv',
'Abschlussprüfung': 'Abschlussprüfung Grundphase',
'Kulturelle Tipps & Tricks': 'Kultur: Höflichkeit, Familie, Alltag'
};
export const LESSON_DIDACTICS = {
@@ -462,12 +482,16 @@ export const LESSON_DIDACTICS = {
'Von einzelnen Wörtern zu kurzen Sätzen übergehen.'
],
corePatterns: ['Kumusta', 'Salamat', 'Lami', 'Mingaw ko nimo']
}
},
...BISAYA_RELATIONSHIP_ANCHOR_DIDACTICS,
...BISAYA_DIDACTICS_24_43
};
function resolveDidacticsForLesson(lesson) {
const direct = LESSON_DIDACTICS[lesson.title];
if (direct) return direct;
const plannedTitle = BISAYA_LESSONS_24_43_BY_NUMBER[Number(lesson.lessonNumber)]?.title;
if (plannedTitle && LESSON_DIDACTICS[plannedTitle]) return LESSON_DIDACTICS[plannedTitle];
const mappedTitle = LEGACY_DIDACTICS_TITLE_MAP[lesson.title];
if (mappedTitle) return LESSON_DIDACTICS[mappedTitle];
return null;