fix is_active student flag and apply it in all pages
This commit is contained in:
@@ -125,6 +125,9 @@ class TeacherController extends BaseController
|
||||
if (!empty($classSectionIds)) {
|
||||
// 1) Fetch all students for the selected class sections
|
||||
$students = $this->studentClassModel->getStudentsByClassSectionIds($classSectionIds, (string) $this->schoolYear);
|
||||
$students = array_values(array_filter($students, static function (array $student): bool {
|
||||
return (int)($student['is_active'] ?? 0) === 1;
|
||||
}));
|
||||
|
||||
if (!empty($students)) {
|
||||
// 2) Collect unique student IDs
|
||||
|
||||
Reference in New Issue
Block a user