fix teacher pages display between school years
Tests / PHPUnit (push) Failing after 1m12s

This commit is contained in:
root
2026-07-15 20:52:19 -04:00
parent 5f27dccd0f
commit 9de2ab2a9f
9 changed files with 106 additions and 53 deletions
+2 -2
View File
@@ -57,6 +57,7 @@ class TeacherController extends BaseController
// Retrieve the configuration values
$this->semester = $this->configModel->getConfig('semester');
$this->schoolYear = $this->configModel->getConfig('school_year');
$this->schoolYear = $this->currentSchoolYearName((string) ($this->schoolYear ?? ''));
}
@@ -123,7 +124,7 @@ class TeacherController extends BaseController
if (!empty($classSectionIds)) {
// 1) Fetch all students for the selected class sections
$students = $this->studentClassModel->getStudentsByClassSectionIds($classSectionIds);
$students = $this->studentClassModel->getStudentsByClassSectionIds($classSectionIds, (string) $this->schoolYear);
if (!empty($students)) {
// 2) Collect unique student IDs
@@ -344,7 +345,6 @@ class TeacherController extends BaseController
'section_id' => $sectionId,
'class_section_name' => $classNames[$sectionId] ?? 'N/A',
'role' => $role,
'semester' => (string)($assign['semester'] ?? $this->semester ?? ''),
'school_year' => (string)($assign['school_year'] ?? $schoolYear),
];
}