fix db tables to have school year

This commit is contained in:
root
2026-07-12 01:02:04 -04:00
parent ed11cccecc
commit ec9fca8c45
42 changed files with 988 additions and 195 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ class EnrollmentModel extends Model
/**
* Get all enrolled students (full student info) for a given parent.
*/
public function getEnrolledStudents(int $parentId, string $schoolYear = null, string $semester = null): array
public function getEnrolledStudents(int $parentId, ?string $schoolYear = null, ?string $semester = null): array
{
$builder = $this->select('students.*')
->join('students', 'students.id = enrollments.student_id')
@@ -106,7 +106,7 @@ class EnrollmentModel extends Model
/**
* Get student basic info (ID, name, grade) for a given parent where status is enrolled or Payment pending.
*/
public function getenrolledStudentDetails(int $parentId, string $schoolYear = null): array
public function getenrolledStudentDetails(int $parentId, ?string $schoolYear = null): array
{
$builder = $this->db->table('enrollments')
->select('students.id, students.firstname, students.lastname, students.grade_level')