extend('layout/management_layout') ?> section('content') ?>
['label'=>, 'slug'=>, 'csids'=>[]] foreach ($statsPerClass as $csid => $cs) { $name = $cs['name']; $lower = strtolower(trim($name)); if (preg_match('/grade\s*(\d+)/i', $name, $m)) { $n = (int)$m[1]; $label = 'Grade ' . $n; $sortKey = '1_' . str_pad($n, 3, '0', STR_PAD_LEFT); $slug = 'grade' . $n; } elseif (strpos($lower, 'kg') !== false || strpos($lower, 'kindergarten') !== false) { $label = 'KG'; $sortKey = '0_kg'; $slug = 'kg'; } elseif (strpos($lower, 'arabic') !== false) { $label = 'Arabic'; $sortKey = '2_arabic'; $slug = 'arabic'; } elseif (strpos($lower, 'youth') !== false) { $label = 'Youth'; $sortKey = '5_youth'; $slug = 'youth'; } else { $label = $name; $sortKey = '3_' . $lower; $slug = preg_replace('/[^a-z0-9]+/', '-', $lower); } if (!isset($gradeGroups[$sortKey])) { $gradeGroups[$sortKey] = ['label' => $label, 'slug' => $slug, 'csids' => []]; } $gradeGroups[$sortKey]['csids'][] = $csid; } ksort($gradeGroups); $gradeKeys = array_keys($gradeGroups); $defaultKey = $gradeKeys[0] ?? null; $decisionBadge = [ 'Pass' => 'success', 'Repeat Class' => 'danger', 'Make-up exam in fall' => 'info', 'Deferred decision' => 'info', 'Expel' => 'danger', 'Withdrawn' => 'secondary', ]; ?>

Generate Certificates

getFlashdata('error')): ?>
No classes found for .
$group): ?>

No active students.

Students Pass Generated Remaining
trim((string)($d['decision'] ?? '')), $stuDec ); $hasPending = in_array('', $allDecs, true); $unique = array_values(array_unique(array_filter( $allDecs, fn($d) => $d !== '' ))); $isPass = !empty($stuDec) && !$hasPending && $unique === ['Pass']; $displayDecs = $isPass ? ['Pass'] : array_values(array_filter($unique, fn($d) => $d !== 'Pass')); $yearScore = null; foreach ($stuDec as $d) { if ( array_key_exists('year_score', $d) && $d['year_score'] !== null && $d['year_score'] !== '' ) { $yearScore = $d['year_score']; break; } } $fmtYearScore = is_numeric($yearScore) ? number_format((float)$yearScore, 2) : '—'; ?>
First Name Last Name Year Score Decision Certificate No.
> Pending
0 students selected
endSection() ?> section('scripts') ?> endSection() ?>