From 95e19818fd1968609905c5c5ef506dbac59a6b81 Mon Sep 17 00:00:00 2001
From: Thomas
Date: Mon, 4 May 2026 02:16:04 +0200
Subject: [PATCH] =?UTF-8?q?Lehrplan:=20Country-Default=20=C3=BCberall=20AT?=
=?UTF-8?q?,=20=C3=BCbergreifend=20land-agnostisch?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Auftrag von Thomas: Default-Filter überall auf Österreich, andere
Länder weiterhin wählbar.
Modul-Detailseiten (gemeinsamer Partial):
- Filter-Chip mit data-country=Country::current() bekommt Klasse
active server-seitig (statt "🌐 Alle Länder")
- Country.php in Partial eingebunden
- JS-Filter-Logik überarbeitet: bei konkretem Land werden NUR
anchor_type='fach' Anker streng nach Land gefiltert; übergreifende
Themen und andere Fächer bleiben sichtbar (sind primär aus dem
AT-Lehrplan abgeleitet, didaktisch land-agnostisch nutzbar)
- applyFilter() wird beim Page-Load mit dem aktiven Chip ausgeführt
Lehrplan.php:
- gleiche Filter-Logik gespiegelt (war vorher streng auch für
übergreifend/andere_fach)
- Default war schon Country::current(), bleibt unverändert
Verifiziert: alle 10 aktiven modul-*.php-Seiten zeigen AT als
Default-active, Lehrplan-Seite ebenfalls.
Co-Authored-By: Claude Opus 4.7 (1M context)
---
App/pages/_partials/modul_detail.php | 47 ++++++++++++++++++++++------
App/pages/lehrplan.php | 13 ++++----
App/sims/_inbox/content/_status.md | 17 ++++++++++
3 files changed, 61 insertions(+), 16 deletions(-)
diff --git a/App/pages/_partials/modul_detail.php b/App/pages/_partials/modul_detail.php
index 483fae1..5624479 100644
--- a/App/pages/_partials/modul_detail.php
+++ b/App/pages/_partials/modul_detail.php
@@ -27,6 +27,7 @@ if (!isset($MODULE_ID) || !is_string($MODULE_ID)) {
require_once __DIR__ . '/../../php/config/app.php';
require_once __DIR__ . '/../../php/config/db.php';
require_once __DIR__ . '/../../php/lib/EasyLang.php';
+require_once __DIR__ . '/../../php/lib/Country.php';
$db = getDB();
@@ -108,6 +109,9 @@ $countryMeta = [
'CH' => ['flag' => '🇨🇭', 'label' => 'Schweiz'],
'LI' => ['flag' => '🇱🇮', 'label' => 'Liechtenstein'],
];
+
+// Default-Land aus Kaskade Session/Cookie/AT — als initialer Anker-Filter aktiv
+$qCountry = Country::current();
?>
@@ -578,9 +582,9 @@ $countryMeta = [
-
+
$info): ?>
-