Add family vocabulary exercises in Bisaya course content
- Introduced a new set of multiple choice and gap fill exercises focused on family-related vocabulary in Bisaya, enhancing language learning. - Included detailed explanations for each term to provide context and aid understanding for learners. - Removed dummy exercises for unknown lessons, streamlining the exercise return logic for better user experience.
This commit is contained in:
@@ -56,7 +56,7 @@ const menuStructure = {
|
||||
vocabtrainer: {
|
||||
visible: ["all"],
|
||||
path: "/socialnetwork/vocab",
|
||||
children: {}
|
||||
showVocabLanguages: 1 // Flag für dynamische Sprachen-Liste
|
||||
},
|
||||
sprachkurse: {
|
||||
visible: ["all"],
|
||||
@@ -386,22 +386,9 @@ class NavigationController {
|
||||
const rights = userRights.map(ur => ur.rightType?.title).filter(Boolean);
|
||||
const filteredMenu = await this.filterMenu(menuStructure, rights, age, user.id);
|
||||
|
||||
// Dynamisches Submenü: Treffpunkt → Sprachen lernen → Vokabeltrainer → (Neue Sprache + abonnierte/angelegte)
|
||||
// Wichtig: "Neue Sprache" soll IMMER sichtbar sein – auch wenn die DB-Abfrage (noch) fehlschlägt.
|
||||
if (filteredMenu?.socialnetwork?.children?.sprachenlernen?.children?.vocabtrainer) {
|
||||
const children = {
|
||||
newLanguage: { path: '/socialnetwork/vocab/new' },
|
||||
};
|
||||
try {
|
||||
const langs = await this.vocabService.listLanguagesForMenu(user.id);
|
||||
for (const l of langs) {
|
||||
children[`lang_${l.id}`] = { path: `/socialnetwork/vocab/${l.id}`, label: l.name };
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('[menu] Konnte Vokabeltrainer-Sprachen nicht laden:', e?.message || e);
|
||||
}
|
||||
filteredMenu.socialnetwork.children.sprachenlernen.children.vocabtrainer.children = children;
|
||||
}
|
||||
// Vokabeltrainer: Sprachen werden im Frontend dynamisch geladen (wie Forum)
|
||||
// Keine children mehr, da das Menü nur 2 Ebenen unterstützt
|
||||
// Das Frontend lädt die Sprachen separat und zeigt sie als submenu2 an
|
||||
|
||||
res.status(200).json(filteredMenu);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user