add school year model

This commit is contained in:
root
2026-06-07 00:52:01 -04:00
parent a192ed433d
commit 6866aedf42
36 changed files with 4771 additions and 88 deletions
@@ -12,14 +12,18 @@ class AdministratorSharedService
) {
}
public function getSemester(): string
public function getSemester(?string $override = null): string
{
return (string) ($this->configuration->getConfig('semester') ?? '');
$value = trim((string) $override);
return $value !== '' ? $value : (string) ($this->configuration->getConfig('semester') ?? '');
}
public function getSchoolYear(): string
public function getSchoolYear(?string $override = null): string
{
return (string) ($this->configuration->getConfig('school_year') ?? '');
$value = trim((string) $override);
return $value !== '' ? $value : (string) ($this->configuration->getConfig('school_year') ?? '');
}
public function getPreviousSchoolYear(string $schoolYear): string
@@ -146,4 +150,4 @@ class AdministratorSharedService
return count(array_unique($ids));
}
}
}