= $this->extend('layout/management_layout') ?> = $this->section('content') ?> 0 ? round($totalConfirmed / $totalPredicted * 100) : ($totalActual === 0 ? 100 : 0); // Winner gender breakdown. // "Winner" means actual year-end trophy winner. $totalWinnerBoys = 0; $totalWinnerGirls = 0; $totalWinnerOther = 0; // Sticker names. // 2 columns x 10 rows = 20 stickers per page. // Stickers print NAME ONLY. $winnerStickerNames = []; foreach ($classResults as $cls) { foreach (($cls['students'] ?? []) as $s) { if (empty($s['actual'])) { continue; } $gender = strtolower(trim((string)($s['gender'] ?? ''))); if (in_array($gender, ['male', 'm', 'boy', 'boys'], true)) { $totalWinnerBoys++; } elseif (in_array($gender, ['female', 'f', 'girl', 'girls'], true)) { $totalWinnerGirls++; } else { $totalWinnerOther++; } $name = trim((string)($s['name'] ?? '')); if ($name !== '') { $winnerStickerNames[] = $name; } } } $totalWinners = $totalWinnerBoys + $totalWinnerGirls + $totalWinnerOther; $winnerBoysPct = $totalWinners > 0 ? round(($totalWinnerBoys / $totalWinners) * 100, 1) : 0; $winnerGirlsPct = $totalWinners > 0 ? round(($totalWinnerGirls / $totalWinners) * 100, 1) : 0; $winnerOtherPct = $totalWinners > 0 ? round(($totalWinnerOther / $totalWinners) * 100, 1) : 0; ?>
Compares the Fall-score prediction (= (int)$selectedPercentile ?>th percentile) with the year-end result based on the average of Fall & Spring scores.
| # | Name | Gender | Fall | Spring | Year Avg | Predicted | Actual | Status |
|---|---|---|---|---|---|---|---|---|
| = $rank ?> | = esc($s['name']) ?> | = $isMale ? 'M' : 'F' ?> | = $s['fall_score'] !== null ? number_format($s['fall_score'], 1) : '—' ?> | = $s['spring_score'] !== null ? number_format($s['spring_score'], 1) : '—' ?> | = $s['year_score'] !== null ? number_format($s['year_score'], 1) : '—' ?> | = $s['predicted'] ? 'Yes' : 'No' ?> | = $s['actual'] ? 'Yes' : 'No' ?> | print '✓ Confirmed', 'surprise' => print '↑ Surprise', 'missed' => print '↓ Missed', default => print '—', }; ?> |
| Class | Students | Predicted | Actual | ✓ Confirmed | ↑ Surprises | ↓ Missed | Accuracy | Fall ≥ | Year ≥ |
|---|---|---|---|---|---|---|---|---|---|
| = esc($cls['section_name']) ?> | = $cls['student_count'] ?> | = $cls['predicted_count'] ?> | = $cls['actual_count'] ?> | = $cls['confirmed'] ?> | = $cls['surprises'] ?> | = $cls['missed'] ?> | = $cls['accuracy'] ?>% | = $cls['fall_threshold'] !== null ? number_format((float)$cls['fall_threshold'], 1) : '—' ?> | = $cls['year_threshold'] !== null ? number_format((float)$cls['year_threshold'], 1) : '—' ?> |
| Total | = $totalStudents ?> | = $totalPredicted ?> | = $totalActual ?> | = $totalConfirmed ?> | = $totalSurprise ?> | = $totalMissed ?> | = $overallAccuracy ?>% | ||
= (int)$selectedPercentile ?>th percentile — Predicted: = $totalPredicted ?> — Actual: = $totalActual ?> — Confirmed: = $totalConfirmed ?> — Accuracy: = $overallAccuracy ?>%
| # | Class | Name | G | Fall | Spring | Year Avg | Predicted | Actual | Status |
|---|---|---|---|---|---|---|---|---|---|
| = $rank ?> | = esc($cls['section_name']) ?> | = esc($s['name']) ?> | = $isMale ? 'M' : 'F' ?> | = $s['fall_score'] !== null ? number_format($s['fall_score'], 1) : '—' ?> | = $s['spring_score'] !== null ? number_format($s['spring_score'], 1) : '—' ?> | = $s['year_score'] !== null ? number_format($s['year_score'], 1) : '—' ?> | = $s['predicted'] ? 'Yes' : 'No' ?> | = $s['actual'] ? 'Yes' : 'No' ?> | = $statusLabel ?> |
| Class | Students | Predicted | Actual | ✓ Confirmed | ↑ Surprises | ↓ Missed | Accuracy | Fall ≥ | Year ≥ |
|---|---|---|---|---|---|---|---|---|---|
| = esc($cls['section_name']) ?> | = $cls['student_count'] ?> | = $cls['predicted_count'] ?> | = $cls['actual_count'] ?> | = $cls['confirmed'] ?> | = $cls['surprises'] ?> | = $cls['missed'] ?> | = $cls['accuracy'] ?>% | = $cls['fall_threshold'] !== null ? number_format((float)$cls['fall_threshold'], 1) : '—' ?> | = $cls['year_threshold'] !== null ? number_format((float)$cls['year_threshold'], 1) : '—' ?> |
| Total | = $totalStudents ?> | = $totalPredicted ?> | = $totalActual ?> | = $totalConfirmed ?> | = $totalSurprise ?> | = $totalMissed ?> | = $overallAccuracy ?>% | ||
Trophy Counts per Class
Prediction Accuracy per Class
Overall Outcome Breakdown
Winner Gender Breakdown
| Group | Winners | Percentage |
|---|---|---|
| Boys | = (int)$totalWinnerBoys ?> | = number_format($winnerBoysPct, 1) ?>% |
| Girls | = (int)$totalWinnerGirls ?> | = number_format($winnerGirlsPct, 1) ?>% |
| Unknown / Other | = (int)$totalWinnerOther ?> | = number_format($winnerOtherPct, 1) ?>% |
| Total Winners | = (int)$totalWinners ?> | = $totalWinners > 0 ? '100.0%' : '0.0%' ?> |