extend('layout/management_layout') ?> section('content') ?>

Student Decisions — All Students

Reset
Saved Not yet generated
Grading
getFlashdata('status'))): ?>
getFlashdata('status')) ?>
getFlashdata('error'))): ?>
getFlashdata('error')) ?>
Year score ≥ 60 → Pass (auto)  |  Year score < 60 → pulled from below-60 decisions
No semester scores found for this school year.
'success', 'Repeat Class' => 'danger', 'Make-up exam in fall' => 'info', 'Deferred decision' => 'info', 'Expel' => 'danger', 'Withdrawn' => 'secondary', ]; $sourceBadge = [ 'auto' => ['bg-success-subtle text-success-emphasis', 'Auto'], 'manual' => ['bg-primary-subtle text-primary-emphasis', 'Manual'], 'pending' => ['bg-warning-subtle text-warning-emphasis', 'Pending'], ]; $stats = ['Pass' => 0, 'Other' => 0, 'Pending' => 0]; foreach ($rows as $r) { if ($r['decision'] === 'Pass') $stats['Pass']++; elseif ($r['decision'] === '' || $r['source'] === 'pending') $stats['Pending']++; else $stats['Other']++; } $pct = static function (int $count, int $total): string { return $total > 0 ? number_format(($count / $total) * 100, 1) . '%' : '0.0%'; }; $genderKey = static function (?string $gender): string { $value = strtolower(trim((string)$gender)); return match (true) { in_array($value, ['male', 'm', 'boy', 'boys'], true) => 'boys', in_array($value, ['female', 'f', 'girl', 'girls'], true) => 'girls', default => 'other', }; }; $genderStats = static function (array $items) use ($genderKey): array { $stats = ['boys' => 0, 'girls' => 0, 'other' => 0]; foreach ($items as $item) { $stats[$genderKey($item['gender'] ?? '')]++; } return $stats; }; $totalStudents = count($rows); $passRows = array_values(array_filter($rows, static fn (array $row): bool => (string)($row['decision'] ?? '') === 'Pass')); $trophyRows = array_values(array_filter($rows, static fn (array $row): bool => !empty($row['is_trophy']))); $allGenderStats = $genderStats($rows); $passGenderStats = $genderStats($passRows); $trophyGenderStats = $genderStats($trophyRows); ?>
Pass
Other decision
Pending
Total
is_numeric($v) ? number_format((float)$v, 2) : '—'; ?>
Student Name Section Fall Score Spring Score Year Score Decision Source Notes
$color): ?> — decision colour key
endSection() ?> section('scripts') ?> endSection() ?>