apply the school year concept
Tests / PHPUnit (push) Failing after 1m19s

This commit is contained in:
root
2026-07-14 00:59:00 -04:00
parent 504c3bc9f9
commit feb1b29a32
73 changed files with 4288 additions and 620 deletions
@@ -70,28 +70,6 @@ class AttendanceTrackingController extends BaseController
->findAll();
$debugInfo['class_students'] = count($classStudents);
// Fallback: if the configured school_year has no class assignments, look up the latest term
if (empty($classStudents)) {
$latestTerm = $this->db->table('student_class')
->select('school_year, semester')
->orderBy('id', 'DESC')
->limit(1)
->get()
->getRowArray();
if ($latestTerm && !empty($latestTerm['school_year'])) {
$schoolYear = (string)$latestTerm['school_year'];
if (!empty($latestTerm['semester'])) {
$semester = (string)$latestTerm['semester'];
}
$classStudents = $this->studentClassModel
->active()
->where('student_class.school_year', $schoolYear)
->findAll();
}
}
// Gather candidate student identifiers (numeric IDs and code-like IDs)
$studentIds = [];
$studentCodes = [];