diff --git a/app/Controllers/View/ReportCardsController.php b/app/Controllers/View/ReportCardsController.php index c8317df..e7a58bc 100644 --- a/app/Controllers/View/ReportCardsController.php +++ b/app/Controllers/View/ReportCardsController.php @@ -73,19 +73,6 @@ class ReportCardsController extends PrintablesBaseController $semesters = array_values(array_filter(array_map(static fn($r) => (string)($r['semester'] ?? ''), $rs))); } catch (\Throwable $e) { } - try { - $rs2 = $this->db->table('student_class') - ->select('DISTINCT semester', false) - ->where('school_year', $year) - ->where('semester IS NOT NULL', null, false) - ->orderBy('semester', 'ASC') - ->get()->getResultArray(); - foreach ($rs2 as $r) { - $val = (string)($r['semester'] ?? ''); - if ($val !== '' && !in_array($val, $semesters, true)) $semesters[] = $val; - } - } catch (\Throwable $e) { - } // Ensure standard options are present even if data is missing (so Spring can be selected) $defaults = array_values(array_filter([(string)($this->semester ?? ''), 'Fall', 'Spring'], static fn($v) => $v !== '')); foreach ($defaults as $d) { diff --git a/app/Views/administrator/trophy_final.php b/app/Views/administrator/trophy_final.php index fc45137..12aa98f 100644 --- a/app/Views/administrator/trophy_final.php +++ b/app/Views/administrator/trophy_final.php @@ -362,7 +362,7 @@ $overallAccuracy = $totalPredicted > 0 ? round($totalConfirmed / $totalPredicted $rank = 0; foreach ($classResults as $cls): foreach ($cls['students'] as $s): - if ($s['status'] === 'none') continue; + if (!in_array($s['status'], ['confirmed', 'surprise'], true)) continue; $rank++; $isMale = strtolower($s['gender'] ?? '') === 'male'; $statusLabel = match ($s['status']) {