Weltkueche Teil A: Land pro Lehrer persistent (teachers.country) + Sim-Verdrahtung

- profil.html: Länderauswahl (AT/DE/CH/LI) im Lehrer-Profil, lädt/zeigt aktuelles Land.
- profile.php: speichert country in teachers.country; gibt country zurück.
- weltkueche.php: injiziert window.WK_COUNTRY = Country::current() (Kaskade Schüler→Klasse→Lehrer→AT) — Fundament für die konsumentenland-basierte Herkunft (Teil B).
Spalte teachers.country existierte bereits, keine Migration nötig.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-21 12:13:27 +02:00
parent c3e61f4da7
commit a68c58ac9e
3 changed files with 13 additions and 2 deletions
+2
View File
@@ -6,6 +6,7 @@
require_once __DIR__ . '/../php/config/app.php';
require_once __DIR__ . '/../php/lib/Database.php';
require_once __DIR__ . '/../php/lib/Session.php';
require_once __DIR__ . '/../php/lib/Country.php';
if (session_status() === PHP_SESSION_NONE) Session::start();
@@ -58,6 +59,7 @@ $injection = '<script>'
. 'window.WK_CLASS_ID = ' . json_encode($classId) . ';'
. 'window.WK_MODE = ' . json_encode($mode) . ';'
. 'window.WK_API_BASE = ' . json_encode(BASE_PATH . '/api') . ';'
. 'window.WK_COUNTRY = ' . json_encode(class_exists('Country') ? Country::current() : 'AT') . ';'
. 'window.__GGS__ = ' . json_encode($ggs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . ';'
. '</script>';