apply the school year concept
Tests / PHPUnit (push) Failing after 1m19s

This commit is contained in:
root
2026-07-14 00:59:00 -04:00
parent 504c3bc9f9
commit feb1b29a32
73 changed files with 4288 additions and 620 deletions
@@ -105,6 +105,7 @@ final class SchoolYearManagementService
'updated_by' => $userId,
]);
$this->configurationModel->setConfigValueByKey('school_year', (string) $year['name']);
$this->syncActiveYearSession((string) $year['name']);
$this->log($id, $from, SchoolYearStatus::ACTIVE, 'activate', $userId);
$this->db->transComplete();
@@ -310,4 +311,15 @@ final class SchoolYearManagementService
return is_string($first) && $first !== '' ? $first : $fallback;
}
private function syncActiveYearSession(string $schoolYearName): void
{
if (session_status() !== PHP_SESSION_ACTIVE) {
return;
}
session()->set('school_year', $schoolYearName);
session()->remove('selected_school_year_id');
session()->remove('selected_school_year');
}
}