fix logo circle, start email body
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m17s

This commit is contained in:
root
2026-08-21 13:28:30 -04:00
parent d3da699e55
commit 23d1cbb64c
40 changed files with 303 additions and 157 deletions
+6 -6
View File
@@ -1115,7 +1115,7 @@ class StudentController extends BaseController
$builder->where('is_active', 1);
}
$this->applyDistributionAgeFilter($builder, $year);
$this->applyDistributionAgeFilter($builder, $year, 'dob');
$rows = array_merge($rows, $builder->get()->getResultArray());
}
@@ -1326,7 +1326,7 @@ class StudentController extends BaseController
$builder->where('is_active', 1);
}
$this->applyDistributionAgeFilter($builder, $year);
$this->applyDistributionAgeFilter($builder, $year, 'dob');
$rows = $builder
->orderBy('lastname', 'ASC')
->orderBy('firstname', 'ASC')
@@ -2138,14 +2138,14 @@ class StudentController extends BaseController
return $out;
}
private function applyDistributionAgeFilter($builder, string $schoolYear): void
private function applyDistributionAgeFilter($builder, string $schoolYear, string $dobColumn = 'students.dob'): void
{
[$earliestDob, $latestDob] = $this->distributionAgeBirthDateWindow($schoolYear);
$builder
->where('students.dob IS NOT NULL', null, false)
->where('students.dob >=', $earliestDob)
->where('students.dob <=', $latestDob);
->where($dobColumn . ' IS NOT NULL', null, false)
->where($dobColumn . ' >=', $earliestDob)
->where($dobColumn . ' <=', $latestDob);
}
private function distributionAgeBirthDateWindow(string $schoolYear): array