fix is_new issue with enrollment fixes
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m22s

This commit is contained in:
root
2026-08-20 19:57:25 -04:00
parent 127098b87c
commit 889c037660
29 changed files with 77306 additions and 293 deletions
+6 -9
View File
@@ -26,8 +26,9 @@ class ClassPrepController extends PrintablesBaseController
$isGrade5 = static fn(string $g) => (bool) preg_match('/^5(\-|$)/', trim($g));
$b = $this->db->table('student_class sc')
->select('sc.student_id, s.firstname, s.lastname, s.is_new, cs.class_section_name AS grade_label')
->select('sc.student_id, s.firstname, s.lastname, COALESCE(sys.is_new, s.is_new, 1) AS is_new, cs.class_section_name AS grade_label', false)
->join('students s', 's.id = sc.student_id', 'inner')
->join('student_year_status sys', 'sys.student_id = s.id AND sys.school_year = sc.school_year', 'left')
->join('classSection cs', 'cs.class_section_id = sc.class_section_id', 'inner')
->join('classes c', 'c.id = cs.class_id', 'inner')
->where('sc.school_year', $schoolYear);
@@ -122,14 +123,9 @@ class ClassPrepController extends PrintablesBaseController
// --- Pull roster: student_class -> classSection -> classes -> students ---
$builder = $this->db->table('student_class sc')
->select([
'sc.student_id',
's.firstname',
's.lastname',
's.is_new',
'cs.class_section_name AS grade_label',
])
->select('sc.student_id, s.firstname, s.lastname, COALESCE(sys.is_new, s.is_new, 1) AS is_new, cs.class_section_name AS grade_label', false)
->join('students s', 's.id = sc.student_id')
->join('student_year_status sys', 'sys.student_id = s.id AND sys.school_year = sc.school_year', 'left')
->join('classSection cs', 'cs.class_section_id = sc.class_section_id')
->join('classes c', 'c.id = cs.class_id')
->where('sc.school_year', $schoolYear);
@@ -217,8 +213,9 @@ class ClassPrepController extends PrintablesBaseController
$isGrade5 = static fn($g) => (bool) preg_match('/^5(\-|$)/', trim($g));
$b = $this->db->table('student_class sc')
->select('sc.student_id, s.firstname, s.lastname, s.is_new, cs.class_section_name AS grade_label')
->select('sc.student_id, s.firstname, s.lastname, COALESCE(sys.is_new, s.is_new, 1) AS is_new, cs.class_section_name AS grade_label', false)
->join('students s', 's.id = sc.student_id')
->join('student_year_status sys', 'sys.student_id = s.id AND sys.school_year = sc.school_year', 'left')
->join('classSection cs', 'cs.class_section_id = sc.class_section_id')
->join('classes c', 'c.id = cs.class_id')
->where('sc.school_year', $schoolYear)