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
-15
View File
@@ -7,21 +7,6 @@
<h2 class="mb-0">Student Score Card</h2>
<div class="text-muted small">Select a student to open their score card.</div>
</div>
<?php
$roleRaw = session()->get('role');
if (is_array($roleRaw)) {
$roleRaw = $roleRaw[0] ?? 'guest';
}
$role = strtolower((string)($roleRaw ?? 'guest'));
if (in_array($role, ['parent', 'parent_dashboard'], true)) {
$backUrl = base_url('/parent_dashboard');
} elseif (in_array($role, ['teacher', 'teacher_assistant', 'teacher_dashboard'], true)) {
$backUrl = base_url('/teacher_dashboard');
} else {
$backUrl = base_url('/');
}
?>
<a href="<?= $backUrl ?>" class="btn btn-outline-secondary">Back</a>
</div>
<?php if (empty($students)): ?>