Vorname | Nachname | Klasse | Anz. | 0, '2_semester' => 0 ]; $enrolledStudents[$course['id']] = 0; } foreach ($students as $student) { foreach ($courses as $course) { $data = getStudentCourseData($student['id'], $course['id']); if ($data !== null) { if ($data['status'] === 'Genehmigt') { if (($data['semester'] ?? '') === '1. Semester') { $approvedStudents[$course['id']]['1_semester']++; } elseif (($data['semester'] ?? '') === '2. Semester') { $approvedStudents[$course['id']]['2_semester']++; } } if ($data['status'] === 'Angemeldet') { $enrolledStudents[$course['id']]++; } } } } return ['approved' => $approvedStudents, 'enrolled' => $enrolledStudents]; } $counts = countApprovedAndEnrolledStudents($students, $courses); foreach ($courses as $course) { echo ' '; } } ?>' . $student['firstname'] . ' | '; echo '' . $student['lastname'] . ' | '; $class = getById('tbl_classes',$student['class']); echo '' . $class['data']['sek'] . ' ' . $class['data']['type'] . ' - ' . $class['data']['name'] .' | '; $allAssignedCourses = getAllAssignedCoursesByCategory($student['id'], $category['data']['id']); $numAssignedCourses = count($allAssignedCourses); echo '' . $numAssignedCourses . ' | '; // Spalten für die Kurse mit Zuweisungen foreach ($courses as $course) { // Abfrage, um den Status des Schülers für diesen Kurs zu erhalten $studentID = $student['id']; $courseID = $course['id']; $data = getStudentCourseData($studentID, $courseID); if(($category['data']['registration'] == 'custom') && ($course['registration'] == 'no')) { echo ''; } else{ ?> |
>
>
>
>
>
>
>
>
|
';
}
?>
---|