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>
56 lines
1.7 KiB
PHP
56 lines
1.7 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/../../lib/bootstrap.php';
|
|
|
|
v2_validate_method('GET');
|
|
$auth = v2_auth_require('student');
|
|
$studentId = (int) ($auth['sub'] ?? 0);
|
|
|
|
mock_log('GET /api/modules/available', ['sid' => $studentId]);
|
|
|
|
// Mock-Daten: drei Test-Module, eines davon als Auftrag
|
|
$hallowelt = [
|
|
'slug' => 'hallo-welt',
|
|
'displayName' => 'Hallo Welt',
|
|
'displayNameEasy' => 'Erste Aufgabe',
|
|
'icon' => '👋',
|
|
'cardImageUrl' => '/geograsim/v2-modules/hallo-welt/public/assets/card.svg',
|
|
'shortDescription' => 'Beispiel-Modul: zeigt wie ein V2-Modul die Spec erfüllt.',
|
|
'shortDescriptionEasy' => 'Ein erstes Beispiel zum Anschauen.',
|
|
'estimatedDurationMin' => 2,
|
|
'status' => 'stable',
|
|
'unlocked' => ['highestUnlocked' => 'L1', 'highestCompleted' => null],
|
|
];
|
|
|
|
$assignments = [
|
|
array_merge($hallowelt, [
|
|
'assignmentId' => 4711,
|
|
'moduleSlug' => 'hallo-welt',
|
|
'difficulty' => 'L1',
|
|
'endsAt' => null,
|
|
]),
|
|
];
|
|
|
|
$freeModules = [
|
|
// Hallo-Welt steht auch im freien Modus zur Verfügung (Demo)
|
|
$hallowelt,
|
|
// Beispiel-Stub für zweites Modul (nicht implementiert)
|
|
[
|
|
'slug' => 'klima',
|
|
'displayName' => 'Klimawächter',
|
|
'displayNameEasy' => 'Klima beobachten',
|
|
'icon' => '🌍',
|
|
'cardImageUrl' => null,
|
|
'shortDescription' => '(V2 noch nicht migriert — Mock-Stub)',
|
|
'shortDescriptionEasy' => '(Beispiel)',
|
|
'estimatedDurationMin' => 35,
|
|
'status' => 'draft',
|
|
'unlocked' => ['highestUnlocked' => 'L1', 'highestCompleted' => null],
|
|
],
|
|
];
|
|
|
|
v2_response_ok([
|
|
'assignments' => $assignments,
|
|
'freeModules' => $freeModules,
|
|
]);
|