Lehrplan: Klima 2D + 3D teilen Lehrplan + Glossar

- kompetenz_modules: klima-3d bekommt klimawandel primaer
  (Spiegelung von klima)
- Neuer Block 5b im Seed: glossar_modules wird via INSERT IGNORE
  gespiegelt (klima → klima-3d, 46 Begriffe). Idempotent.
- Auf modul-klima-3d sichtbar: 22 Anker, 1 Kompetenz, 46 Glossar-Chips
  — identisch zu modul-klima

DB-Bilanz: kompetenz_modules 22 (vorher 21).
Auftrag von Thomas (2026-05-03).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 20:12:58 +02:00
parent 1b1e5b0a69
commit 5bf27e215d
2 changed files with 33 additions and 2 deletions
+21
View File
@@ -333,6 +333,8 @@ foreach ($db->query("SELECT id, key_slug FROM kompetenzen") as $r) {
$kompetenzModules = [
// slug, module, level, strength
['klimawandel', 'klima', 0, 'primaer'],
// Klima 2D + 3D teilen sich Lehrplan und Glossar (Thomas, 2026-05-03)
['klimawandel', 'klima-3d', 0, 'primaer'],
['klimawandel', 'energiemix', 0, 'sekundaer'],
['klimawandel', 'lieferketten', 0, 'sekundaer'],
['naturgefahren-hochwasser', 'fluss', 0, 'primaer'],
@@ -1138,6 +1140,25 @@ foreach ($anchors as $a) {
echo " lehrplan_anchors ... " . count($anchors) . " Zeilen (inkl. URLs + Typ)\n";
// ------------------------------------------------------------------
// 5b. Glossar-Spiegelung klima -> klima-3d
// Beide Varianten teilen identische Begriffe (Thomas, 2026-05-03).
// Glossar-Tabelle wird sonst von der Glossar-Instanz gepflegt.
// Nur Spiegelung der module_id-Verknuepfung; INSERT IGNORE haelt
// die Operation idempotent.
// ------------------------------------------------------------------
try {
$glossarSpiegel = $db->exec("
INSERT IGNORE INTO glossar_modules (glossar_id, module_id)
SELECT glossar_id, 'klima-3d' FROM glossar_modules
WHERE module_id = 'klima'
");
echo " glossar_modules ... " . (int)$glossarSpiegel . " Begriffe von klima nach klima-3d gespiegelt\n";
} catch (Throwable $e) {
echo " glossar_modules ... Hinweis: " . $e->getMessage() . "\n";
}
// ------------------------------------------------------------------
// 6. Bilanz
// ------------------------------------------------------------------