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>
24 lines
744 B
PHP
24 lines
744 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/../../lib/bootstrap.php';
|
|
|
|
v2_validate_method('POST');
|
|
$auth = v2_auth_require('student');
|
|
|
|
$body = v2_request_body_json_required();
|
|
v2_validate_required($body, [
|
|
'moduleSlug', 'moduleVersion', 'specVersion',
|
|
'completed', 'score', 'scoreMax', 'durationS',
|
|
'difficulty', 'mode', 'lehrplanCoverage', 'ts',
|
|
]);
|
|
v2_validate_enum((string) $body['mode'], ['free', 'teacher_started', 'assessment', 'demo'], 'mode');
|
|
|
|
mock_log('POST /api/result', $body);
|
|
|
|
v2_response_created([
|
|
'ok' => true,
|
|
'assessmentId' => random_int(100000, 999999),
|
|
'savedAt' => date('c'),
|
|
'_mock' => 'Result wurde NICHT in DB gespeichert (Mock-Modus). Geloggt nach mock/uploads/log.jsonl.',
|
|
]);
|