1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
118 lines
4.5 KiB
PHP
118 lines
4.5 KiB
PHP
<?php
|
|
/**
|
|
* Test-Daten für die Mock-Plattform.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
function mock_student(int $id): ?array {
|
|
static $students = [
|
|
42 => [
|
|
'studentId' => 42,
|
|
'displayName' => 'Lena',
|
|
'avatarSlug' => 'fuchs-explorer',
|
|
'easyLanguage' => false,
|
|
'locale' => 'de-AT-standard',
|
|
'country' => 'AT',
|
|
'classId' => 99,
|
|
'className' => '1A 2025/26 (Mock)',
|
|
'schoolName' => 'Mock-Mittelschule',
|
|
'preferences' => [
|
|
'soundOn' => true, 'musicOn' => false,
|
|
'highContrast' => false, 'reducedMotion' => false,
|
|
'screenReader' => false, 'textScale' => 'normal',
|
|
],
|
|
],
|
|
43 => [
|
|
'studentId' => 43,
|
|
'displayName' => 'Yusuf',
|
|
'avatarSlug' => 'eule-prof',
|
|
'easyLanguage' => true,
|
|
'locale' => 'de-AT-easy',
|
|
'country' => 'AT',
|
|
'classId' => 99,
|
|
'className' => '1A 2025/26 (Mock)',
|
|
'schoolName' => 'Mock-Mittelschule',
|
|
'preferences' => [
|
|
'soundOn' => true, 'musicOn' => true,
|
|
'highContrast' => false, 'reducedMotion' => false,
|
|
'screenReader' => false, 'textScale' => 'large',
|
|
],
|
|
],
|
|
44 => [
|
|
'studentId' => 44,
|
|
'displayName' => 'Sofia',
|
|
'avatarSlug' => 'astronaut',
|
|
'easyLanguage' => false,
|
|
'locale' => 'de-AT-standard',
|
|
'country' => 'AT',
|
|
'nachteilsausgleich' => true, // Sofia hat Nachteilsausgleich
|
|
'classId' => 99,
|
|
'className' => '1A 2025/26 (Mock)',
|
|
'schoolName' => 'Mock-Mittelschule',
|
|
'preferences' => [
|
|
'soundOn' => false, 'musicOn' => false,
|
|
'highContrast' => true, 'reducedMotion' => true,
|
|
'screenReader' => true, 'textScale' => 'xlarge',
|
|
],
|
|
'levelUnlocks' => [
|
|
// Sofia darf wegen Nachteilsausgleich frei wählen — Werte trotzdem als Anzeige
|
|
'hallo-welt' => ['highestUnlocked' => 'L1', 'highestCompleted' => null],
|
|
],
|
|
],
|
|
];
|
|
foreach ($students as &$s) {
|
|
$s['avatarUrl'] = V2_BASE_URL . '/assets/avatars/avatar-' . $s['avatarSlug'] . '.png';
|
|
$s['nachteilsausgleich'] = $s['nachteilsausgleich'] ?? false;
|
|
$s['levelUnlocks'] = $s['levelUnlocks'] ?? [];
|
|
}
|
|
return $students[$id] ?? null;
|
|
}
|
|
|
|
function mock_glossar(string $slug, bool $easy): ?array {
|
|
static $entries = [
|
|
'logistik' => [
|
|
'title' => 'Logistik',
|
|
'short' => 'Die Planung und Steuerung von Warenströmen.',
|
|
'short_easy' => 'Wie Sachen von A nach B kommen.',
|
|
'long' => '<p>Logistik bezeichnet die effiziente Organisation von Güterflüssen entlang der Lieferkette.</p>',
|
|
'long_easy' => '<p>Logistik heißt: Sachen so transportieren, dass alles passt. Mit Lkw, Bahn und Schiff.</p>',
|
|
],
|
|
'intermodalverkehr' => [
|
|
'title' => 'Intermodalverkehr',
|
|
'short' => 'Transport mit verschiedenen Verkehrsmitteln in einer Lieferkette.',
|
|
'short_easy' => 'Wenn man mit Lkw und Bahn hintereinander fährt.',
|
|
'long' => '<p>Intermodalverkehr kombiniert mehrere Verkehrsträger ohne Umladen der Ware.</p>',
|
|
'long_easy' => '<p>Du kannst zuerst Lkw fahren und dann mit der Bahn weiter. Die Kiste bleibt zu.</p>',
|
|
],
|
|
];
|
|
if (!isset($entries[$slug])) return null;
|
|
$e = $entries[$slug];
|
|
return [
|
|
'slug' => $slug,
|
|
'title' => $e['title'],
|
|
'shortText' => $easy ? $e['short_easy'] : $e['short'],
|
|
'longTextHtml' => $easy ? $e['long_easy'] : $e['long'],
|
|
'imageUrl' => null,
|
|
];
|
|
}
|
|
|
|
function mock_lehrplan(string $code): ?array {
|
|
static $anchors = [
|
|
'AT-GW-1.4.2' => [
|
|
'country' => 'AT', 'scheme' => 'GW',
|
|
'level' => 'Sekundarstufe 1, Klasse 2',
|
|
'topic' => 'Wirtschaftsräume Europas',
|
|
'competence' => 'Verkehrsnetze beschreiben und bewerten',
|
|
],
|
|
'AT-GW-2.1.1' => [
|
|
'country' => 'AT', 'scheme' => 'GW',
|
|
'level' => 'Sekundarstufe 1, Klasse 3',
|
|
'topic' => 'Klima- und Vegetationszonen',
|
|
'competence' => 'Zonen erkennen und Auswirkungen erklären',
|
|
],
|
|
];
|
|
if (!isset($anchors[$code])) return null;
|
|
return array_merge(['code' => $code], $anchors[$code]);
|
|
}
|