still not fixing teaher timetable

This commit is contained in:
Flatlogic Bot 2025-12-06 17:13:22 +00:00
parent 729ef9f5af
commit 5d99cefde8

View File

@ -82,7 +82,7 @@ if ($selected_teacher_id) {
// Organize schedule for easy display // Organize schedule for easy display
$teacher_timetable = []; $teacher_timetable = [];
foreach ($teacher_schedule_raw as $lesson) { foreach ($teacher_schedule_raw as $lesson) {
$day_idx = $lesson['day_of_week'] - 1; // Days are 1-5, array is 0-4 $day_idx = $lesson['day_of_week']; // Use the 0-indexed value directly
if (!isset($teacher_timetable[$day_idx])) { if (!isset($teacher_timetable[$day_idx])) {
$teacher_timetable[$day_idx] = []; $teacher_timetable[$day_idx] = [];
} }