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
+10
View File
@@ -12,6 +12,16 @@ if (!function_exists('getSemester')) {
if (!function_exists('getSchoolYear')) {
function getSchoolYear() {
if (! is_cli() && session()->get('user_id')) {
try {
return service('schoolYearContext')->resolve(service('request'))->yearName();
} catch (\Throwable $e) {
log_message('warning', 'Falling back to configured school year: {message}', [
'message' => $e->getMessage(),
]);
}
}
$configModel = new \App\Models\ConfigurationModel();
return $configModel->getConfig('school_year');
}