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>
23 lines
745 B
PHP
23 lines
745 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/../../lib/bootstrap.php';
|
|
|
|
$method = v2_validate_method_in(['GET', 'POST', 'DELETE']);
|
|
v2_auth_require('teacher');
|
|
mock_log("$method /api/teacher/assignments", $_GET ?: []);
|
|
|
|
if ($method === 'GET') {
|
|
v2_response_ok(['assignments' => [
|
|
['id'=>4711,'moduleSlug'=>'hallo-welt','displayName'=>'Hallo Welt','icon'=>'👋',
|
|
'difficulty'=>'L1','startsAt'=>date('c', time()-1800),'endsAt'=>null,
|
|
'active'=>true,'createdAt'=>date('c', time()-1800)],
|
|
]]);
|
|
}
|
|
|
|
if ($method === 'POST') {
|
|
$body = v2_request_body_json_required();
|
|
v2_response_created(['id' => random_int(1000, 9999), '_mock' => 'Auftrag NICHT persistiert.']);
|
|
}
|
|
|
|
v2_response_ok(['ok' => true]);
|