fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -17,7 +17,8 @@ class AdministratorEnrollmentQueryService
protected StudentClass $studentClassModel,
protected Enrollment $enrollmentModel,
protected ClassSection $classSectionModel,
) {}
) {
}
public function enrollmentWithdrawalData(?string $selectedYear = null): array
{
@@ -58,7 +59,7 @@ class AdministratorEnrollmentQueryService
$s['student_id'] = $studentId;
$s['removed_previous_year'] = isset($removedPriorIds[$studentId]) ? 'Yes' : 'No';
if (empty($s['parent_id']) && ! empty($s['secondparent_user_id'])) {
if (empty($s['parent_id']) && !empty($s['secondparent_user_id'])) {
$s['parent_id'] = (int) $s['secondparent_user_id'];
} else {
$s['parent_id'] = (int) ($s['parent_id'] ?? 0);
@@ -67,14 +68,14 @@ class AdministratorEnrollmentQueryService
$pf = trim((string) ($s['parent_firstname'] ?? ''));
$pl = trim((string) ($s['parent_lastname'] ?? ''));
if ($pf === '' && $pl === '' && ! empty($s['parent_fullname'])) {
if ($pf === '' && $pl === '' && !empty($s['parent_fullname'])) {
$parts = preg_split('/\s+/', trim((string) $s['parent_fullname']), 2);
$pf = $parts[0] ?? '';
$pl = $parts[1] ?? '';
}
$s['parent_label'] = trim($pf.' '.$pl) ?: 'Unknown Parent';
$s['parent_sort'] = trim(($pl !== '' ? $pl : $pf).' '.$pf) ?: 'ZZZ Unknown Parent';
$s['parent_label'] = trim($pf . ' ' . $pl) ?: 'Unknown Parent';
$s['parent_sort'] = trim(($pl !== '' ? $pl : $pf) . ' ' . $pf) ?: 'ZZZ Unknown Parent';
$s['is_new'] = (int) ($s['is_new'] ?? 0);
$s['new_student'] = $s['is_new'] === 1 ? 'Yes' : 'No';
@@ -83,7 +84,7 @@ class AdministratorEnrollmentQueryService
? $this->enrollmentModel->getEnrollmentStatus($studentId, $selectedYear)
: null;
if (! empty($statusForYear)) {
if (!empty($statusForYear)) {
$s['enrollment_status'] = $statusForYear;
} elseif (($s['admission_status'] ?? null) === 'denied') {
$s['enrollment_status'] = 'denied';
@@ -95,7 +96,7 @@ class AdministratorEnrollmentQueryService
$s['class_section'] = $className ?: 'Class not Assigned';
$s['registration_date_order'] = ! empty($s['registration_date'])
$s['registration_date_order'] = !empty($s['registration_date'])
? Carbon::parse($s['registration_date'])->format('Y-m-d')
: '';
}
@@ -171,10 +172,10 @@ class AdministratorEnrollmentQueryService
$r['is_new'] = (int) ($r['is_new'] ?? 0);
$r['new_student'] = $r['is_new'] === 1 ? 'Yes' : 'No';
$r['modalIdContact'] = 'contact_'.$studentId;
$r['modalIdContact'] = 'contact_' . $studentId;
$r['enrollment_status'] = $enrollmentStatus;
if (! empty($r['registration_date'])) {
if (!empty($r['registration_date'])) {
try {
$r['registration_date'] = Carbon::parse($r['registration_date'])->format('Y-m-d');
} catch (\Throwable) {
@@ -190,4 +191,4 @@ class AdministratorEnrollmentQueryService
'total_new' => count($newStudents),
];
}
}
}