This commit is contained in:
@@ -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)): ?>
|
||||
|
||||
Reference in New Issue
Block a user