fix school year and enrollment steps
Tests / PHPUnit (push) Failing after 58s

This commit is contained in:
root
2026-08-15 21:15:05 -04:00
parent 4603d9ced2
commit 3cbfc40934
18 changed files with 1142 additions and 163 deletions
@@ -35,6 +35,7 @@ class ParentFinancialAidController extends BaseController
'students' => $students,
'requests' => $requests,
'openRequest' => $model->openRequestForParent($parentId, $schoolYear),
'existingRequest' => $model->requestForParentYear($parentId, $schoolYear),
]);
}
@@ -47,8 +48,8 @@ class ParentFinancialAidController extends BaseController
$schoolYear = (string) ((new ConfigurationModel())->getConfig('school_year') ?? '');
$model = new FinancialAidRequestModel();
if ($model->openRequestForParent($parentId, $schoolYear) !== null) {
return redirect()->back()->with('error', 'You already have an open financial aid request for this school year.');
if ($model->requestForParentYear($parentId, $schoolYear) !== null) {
return redirect()->back()->with('error', 'You can submit only one financial aid application per school year.');
}
$studentIds = array_values(array_unique(array_filter(array_map('intval', (array) $this->request->getPost('student_ids')))));