update policy and fix other issues
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m19s

This commit is contained in:
root
2026-08-23 18:19:08 -04:00
parent 103f970110
commit a6e0ce1432
13 changed files with 433 additions and 317 deletions
@@ -197,6 +197,14 @@ final class SchoolYearManagementService
'updated_by' => $userId,
'carry_over_balance_behavior' => $year['carry_over_balance_behavior'],
]);
$previousYearId = (int) ($year['previous_school_year_id'] ?? 0);
if ($previousYearId > 0) {
$previousYear = $this->schoolYearModel->find($previousYearId);
service('studentYearStatus')->markReturningStudentsForTargetYear(
(string) ($previousYear['name'] ?? ''),
(string) ($year['name'] ?? '')
);
}
$this->syncConfigurationFromSchoolYear($year);
$this->syncActiveYearSession((string) $year['name']);
$this->log($id, $from, SchoolYearStatus::ACTIVE, 'activate', $userId);