Schulbuch: einheitliches App-Menü + rollenabhängiger Modus

- Kapitel-Kopf: alte Links (Modulseite/Simulation/Glossar/Lehrplan) raus, stattdessen
  einheitliches App-Menü je Rolle (Schüler: Module/Erfolge/Schulbuch/Profil; Lehrer:
  Cockpit/Schulbuch; öffentlich: Simulationen/Schulbuch), Schulbuch aktiv
- Modus je Rolle: Schüler:in → Schüler:innen/Leichte Sprache (Default Schüler:innen,
  Lehreransicht gesperrt, auch bei ?lehrer=1); Lehrperson → +Lehreransicht (Default Lehrperson)
- teacher.html: Menüpunkt "📖 Schulbuch" ergänzt
- buch.php-Übersicht: gleiches rollen-Menü statt "← Zu den Simulationen"

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 02:53:23 +02:00
parent 685b4700f8
commit c5307017e4
4 changed files with 58 additions and 14 deletions
+19 -1
View File
@@ -7,7 +7,11 @@
* Status wird automatisch aus der Existenz von pages/buch-<id>.php abgeleitet.
*/
require_once __DIR__ . '/../php/config/app.php';
require_once __DIR__ . '/../php/lib/Session.php';
Session::start();
$bp = BASE_PATH;
$IS_TEACHER = (Session::teacherId() !== null);
$IS_STUDENT = (Session::studentId() !== null);
$KAPITEL = [
['id' => 'tourismustal', 'icon' => '🏔️', 'titel' => 'Ein Tal wird Tourismusregion',
@@ -80,11 +84,25 @@ $KAPITEL = [
.pill.fertig { background: #dcead1; color: #2f6b46; }
.pill.geplant { background: #e3ddc9; color: #6b6659; }
a.back { color: #4f7f5e; font-weight: 600; text-decoration: none; font-size: 14px; }
.appnav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.appnav a { color: #4f7f5e; text-decoration: none; font-weight: 600; }
.appnav .here { color: #2f3e46; font-weight: 800; }
</style>
</head>
<body>
<div class="b-wrap">
<p><a class="back" href="<?= $bp ?>/simulationen">← Zu den Simulationen</a></p>
<nav class="appnav">
<?php if ($IS_TEACHER): ?>
<a href="<?= $bp ?>/teacher.html">📊 Lehrer-Cockpit</a> · <span class="here">📖 Schulbuch</span>
<?php elseif ($IS_STUDENT): ?>
<a href="<?= $bp ?>/schueler.html">Module</a> ·
<a href="<?= $bp ?>/schueler.html#achievements">Erfolge</a> ·
<span class="here">Schulbuch</span> ·
<a href="<?= $bp ?>/profil.html">Profil</a>
<?php else: ?>
<a href="<?= $bp ?>/simulationen">🎮 Simulationen</a> · <span class="here">📖 Schulbuch</span>
<?php endif; ?>
</nav>
<h1>📖 Das Schulbuch zu den Simulationen</h1>
<p class="sub">Jede Simulation bekommt ein Kapitel: die Sachinhalte lehrplankonform
aufbereitet, mit echten Daten, Glossar-Begriffen und Aufgaben — zum Präsentieren