Log 4168
30/10/2024 2024-10-30 21:00$students_attendance = [
[“student” => #תלמיד#, “attendance” => #נוכחות בשיעור#],
// Add more student attendance data here if needed
];
$total_groups = count($students_attendance);
$attended_groups = 0;
foreach ($students_attendance as $group) {
if ($group[‘attendance’] !== “”) {
$attended_groups++;
}
}
if ($total_groups > 0) {
return round(($attended_groups / $total_groups) * 100, 2);
} else {
return “”;
}