fix parent and teacher pages to follow year filter
Tests / PHPUnit (push) Failing after 1m15s

This commit is contained in:
root
2026-07-15 20:03:36 -04:00
parent feb1b29a32
commit 5f27dccd0f
32 changed files with 582 additions and 364 deletions
+14 -1
View File
@@ -165,7 +165,20 @@ html, body { overflow-x: hidden; }
<body data-app-menu-mode="<?= esc($appMenuMode) ?>">
<?php include(__DIR__ . '/../partials/navbar.php'); ?>
<?= view('partials/school_year_selector') ?>
<?php
$mainSchoolYearSelectorData = [];
if (!isset($schoolYearContext, $schoolYearOptions) && session()->get('user_id')) {
try {
$mainSchoolYearSelectorData = service('schoolYearViewData')->forCurrentRequest(service('request'));
$mainSchoolYearSelectorData['schoolYearSelectorEnabled'] = true;
} catch (\Throwable $e) {
log_message('warning', 'Unable to load main school-year selector: {message}', [
'message' => $e->getMessage(),
]);
}
}
?>
<?= view('partials/school_year_selector', $mainSchoolYearSelectorData) ?>
<?php
$uri = service('uri');