report cadr and trophy
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user