student_id-FK-Migration Stufe 1+2: Name-Joins -> student_sessions.student_id
- student_sessions: neue Spalte student_id (+Index), backfilled aus (class_id,display_name) - Session::createStudent setzt student_id (per Lookup, falls nicht uebergeben) - alle Joins students<->student_sessions von display_name auf student_id umgestellt: Benchmark.php, live.php (5x), results.php (4x + runs), modules.php, profile.php, progress.php (answers+runs) - verlustfrei verifiziert (alt-Join == neu-Join, class 99/102) Robuster gegen Umbenennung/Doppelnamen, indexierbare Joins. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,7 @@ if ($method === 'GET') {
|
||||
|
||||
// Individuelle Overrides für diesen Schüler
|
||||
$studentRow = $db->fetchOne(
|
||||
'SELECT s.id FROM students s JOIN student_sessions ss ON ss.class_id = s.class_id AND ss.display_name = s.display_name WHERE ss.id = ?',
|
||||
'SELECT student_id AS id FROM student_sessions WHERE id = ?',
|
||||
[$sessionId]
|
||||
);
|
||||
$overrides = [];
|
||||
|
||||
Reference in New Issue
Block a user