Competition: = esc($competition['title']) ?>
School Year: = esc($competition['school_year'] ?? '-') ?>
Published: = !empty($competition['is_published']) ? 'Yes' : 'No' ?>
'#fde2c2', 'hover' => '#f8c996'],
['bg' => '#cfe6ff', 'hover' => '#b5d6ff'],
['bg' => '#c9f2e7', 'hover' => '#a6e6d4'],
['bg' => '#f7c8c7', 'hover' => '#f1a6a3'],
['bg' => '#fff1a8', 'hover' => '#ffe38a'],
['bg' => '#e4c7f2', 'hover' => '#d1a9e8'],
['bg' => '#d6d9de', 'hover' => '#c2c8cf'],
['bg' => '#c9efc5', 'hover' => '#aee3a9'],
];
$paletteCount = count($palette);
?>
No published winners yet. Publish winners to see the list.
| Class |
School ID |
Student |
Photo Consent |
Rank |
Score |
Prize |
0 ? ($classId % $paletteCount) : 0;
$questionCount = $questionCounts[$classId] ?? null;
$scoreValue = $row['score'] ?? null;
$scoreLabel = '-';
$prizeValue = null;
$photoConsentLabel = '-';
if (array_key_exists('photo_consent', $row)) {
$photoConsentLabel = ((int) $row['photo_consent'] === 1) ? 'Yes' : 'No';
}
if (isset($row['prize_amount']) && $row['prize_amount'] !== '' && is_numeric($row['prize_amount'])) {
$prizeValue = (float) $row['prize_amount'];
$totalPrize += $prizeValue;
}
if ($scoreValue !== null && $scoreValue !== '' && is_numeric($scoreValue)) {
$scoreDisplay = number_format((float) $scoreValue, 0, '.', '');
$scoreLabel = $scoreDisplay;
if ($questionCount !== null) {
$scoreLabel = $scoreDisplay . '/' . $questionCount;
}
}
?>
| = esc($classLabel) ?> |
= esc($row['school_id'] ?? $row['student_id'] ?? '-') ?> |
= esc($studentLabel) ?> |
= esc($photoConsentLabel) ?> |
= esc($row['rank'] ?? '-') ?> |
= esc($scoreLabel) ?> |
= esc($prizeValue !== null ? $prizeValue : '-') ?> |
| Total Prizes |
= esc(number_format($totalPrize, 2, '.', '')) ?> |
= $this->endSection() ?>