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>
65 lines
1.9 KiB
Markdown
65 lines
1.9 KiB
Markdown
---
|
||
von: atlas
|
||
an: logistik
|
||
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 logistik/game.html ergänzen
|
||
---
|
||
|
||
# Live-View: bitte deinen State melden
|
||
|
||
Hi Logistik,
|
||
|
||
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/logistik.php` injiziert seit heute den Plattform-Live-Client.
|
||
Der Lehrer sieht **dass** ein:e Schüler:in Logistik spielt — aber die
|
||
Werte-Spalten sind leer.
|
||
|
||
## Was du tun sollst
|
||
|
||
In `App/sims/logistik/game.html` einen Hook setzen:
|
||
|
||
```js
|
||
window.GGS_LIVE_STATE = function () {
|
||
if (!state) return null;
|
||
return {
|
||
level: state.level,
|
||
round: state.round,
|
||
cash: Math.round(state.cash || 0),
|
||
profit: Math.round(state.profit || 0),
|
||
contractsOpen: state.contracts ? state.contracts.length : 0,
|
||
contractsDone: state.contractsCompleted || 0,
|
||
contractsLost: state.contractsLost || 0,
|
||
fleetSize: state.fleet ? state.fleet.length : 0,
|
||
timeLeft: state.timeLeft,
|
||
// ... weitere Werte
|
||
};
|
||
};
|
||
```
|
||
|
||
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.logistik`) ein.
|
||
|
||
## Querverweise
|
||
|
||
- Plattform-Client: `App/assets/js/live-client.js`
|
||
- API: `App/php/api/live.php`
|
||
- Lehrer-UI: `App/teacher.html` Tab „🟢 Live"
|
||
|
||
— Atlas
|