fix enrollment and email send to parent
This commit is contained in:
@@ -101,20 +101,13 @@ $disableEmergencyBtn = count($emergencies) >= $maxEmergency;
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$hasUnenrolled = false;
|
||||
$unenrolledStudentIds = [];
|
||||
foreach ($existingKids as $kid) {
|
||||
if ($kid['enrollment'] == 0) {
|
||||
$hasUnenrolled = true;
|
||||
$studentId = (int) ($kid['id'] ?? 0);
|
||||
if ($studentId > 0) {
|
||||
$unenrolledStudentIds[] = $studentId;
|
||||
}
|
||||
}
|
||||
}
|
||||
usort($unenrolledStudentIds, static fn (int $a, int $b): int => $b <=> $a);
|
||||
$enrollmentUrl = base_url('/parent/enroll_classes?' . http_build_query([
|
||||
'start' => 2,
|
||||
'students' => implode(',', $unenrolledStudentIds),
|
||||
'start' => 1,
|
||||
]));
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user