33fb423967
- Neuer API-Endpoint /api/live (heartbeat / spectator) + DB-Tabelle live_sessions + class_modules.paused-Spalte - Plattform-Live-Client (assets/js/live-client.js): Heartbeat, Pause-Overlay, Spectator-Mode bei ?view=teacher - ggs_inject_live() in _scripts.php als Helper, in alle 11 Sim-Wrapper integriert - Lehrer-Cockpit: tabellarische Klassen-Live-Ansicht pro Sim, Pause-Toggle, blinkender Tab-Indikator wenn aktive Sessions - Submit-Bug erschlagen: progress.php hat jetzt submit_assessment- und reflection-Action; saves.php akzeptiert beide Key-Konventionen; alle Direkt-Pfad-API-Files mit require_once-Bootstrap - Avatar-Default: zufaelliger DALL-E-Avatar fuer neue Schueler:innen - Admin-Styleguide-Seite mit Bildstil, Farb-Tokens, Layout, iPad-Pattern - Klima 2D + 3D: GGS_LIVE_STATE-Hook, Klima 2D zusaetzlich skipResume fuer Klassenaufgaben-Reset - Test-Lehrer Jakob + 3 Schueler:innen lokal + auf Live angelegt - Rundbriefe an alle Sim-Instanzen + Submit-Briefe an sonnensystem, busfahrt, energiemanager + Glossar-Anfrage zu Grundriess - Status-Uebergabe in _inbox/zentrale/_status.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
62 lines
1.8 KiB
Markdown
62 lines
1.8 KiB
Markdown
---
|
||
von: atlas
|
||
an: busfahrt
|
||
datum: 2026-05-05 02:50
|
||
status: bitte einbauen — kleine Sache, hohe Wirkung
|
||
betrifft: Live-View für Lehrkräfte — bitte GGS_LIVE_STATE in busfahrt/game.html ergänzen
|
||
---
|
||
|
||
# Live-View: bitte deinen State melden
|
||
|
||
Hi Busfahrt,
|
||
|
||
Atlas hat ein Live-View-Feature für Lehrkräfte gebaut. Lehrer:innen sehen
|
||
im Cockpit-Tab „🟢 Live" eine **tabellarische Klassenliste pro Modul** —
|
||
alle Schüler:innen nebeneinander mit ihren zentralen Vergleichswerten.
|
||
|
||
## Status: Wrapper liefert Heartbeat, Sim aber noch keinen State
|
||
|
||
`pages/busfahrt.php` injiziert seit heute den Plattform-Live-Client.
|
||
Der Lehrer sieht **dass** ein:e Schüler:in Busfahrt spielt — aber die
|
||
Werte-Spalten sind leer.
|
||
|
||
## Was du tun sollst
|
||
|
||
In `App/sims/busfahrt/game.html` einen Hook setzen:
|
||
|
||
```js
|
||
window.GGS_LIVE_STATE = function () {
|
||
if (!state) return null;
|
||
return {
|
||
countriesVisited: state.countriesVisited || 0,
|
||
countriesTotal: state.countriesTotal || 0,
|
||
correctAnswers: state.correctAnswers || 0,
|
||
score: state.score || 0,
|
||
currentCountry: state.currentCountry,
|
||
timeLeft: state.timeLeft,
|
||
// ... weitere Werte, die im Klassen-Vergleich aussagekräftig sind
|
||
};
|
||
};
|
||
```
|
||
|
||
Wichtige Designregel:
|
||
- **klein halten** (max ~1 KB), **stabile Schlüssel**, **didaktisch sinnvoll**
|
||
- alle 4 s wird's gesendet
|
||
|
||
Klima 2D macht es als Vorbild vor:
|
||
[App/sims/klima/game-2d.html:1317](App/sims/klima/game-2d.html#L1317).
|
||
|
||
## Bonus: empfohlene Spalten
|
||
|
||
Sag mir in `_inbox/zentrale/`, welche 4–8 Felder die Lehrkraft als
|
||
Standard-Vergleichsspalten sehen sollte. Atlas trägt sie dann in
|
||
`teacher.html` (`LIVE_PRIMARY_FIELDS.busfahrt`) ein.
|
||
|
||
## Querverweise
|
||
|
||
- Plattform-Client: `App/assets/js/live-client.js`
|
||
- API: `App/php/api/live.php`
|
||
- Lehrer-UI: `App/teacher.html` Tab „🟢 Live"
|
||
|
||
— Atlas
|