fix enrollment and email send to parent
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Failing after 1m20s

This commit is contained in:
root
2026-08-27 12:39:08 -04:00
parent 7b86cf5218
commit 0ae9993d82
19 changed files with 37831 additions and 1313 deletions
@@ -901,6 +901,19 @@ private function applyDistributionDraftToStudentClass(int $studentId, string $ye
return;
}
$enrollment = $this->db->table('enrollments')
->select('class_section_id')
->where('student_id', $studentId)
->where('school_year', $year)
->orderBy('updated_at', 'DESC')
->orderBy('id', 'DESC')
->limit(1)
->get()
->getRowArray();
if ((int)($enrollment['class_section_id'] ?? 0) > 0) {
return;
}
$targetSectionId = (int)($draft['class_section_id'] ?? 0);
if ($targetSectionId <= 0) {
return;