fix missing school year pages
Tests / PHPUnit (push) Failing after 42s

This commit is contained in:
root
2026-07-12 19:09:38 -04:00
parent e06ccc9cc0
commit 55f8027550
14 changed files with 471 additions and 113 deletions
+1 -6
View File
@@ -706,7 +706,6 @@ class GradingController extends Controller
$existing = $this->placementLevelModel
->where('student_id', $studentId)
->where('school_year', $schoolYear)
->first();
if ($level === null) {
@@ -718,7 +717,6 @@ class GradingController extends Controller
$payload = [
'student_id' => $studentId,
'school_year' => $schoolYear,
'level' => $level,
'updated_by' => session()->get('user_id'),
];
@@ -768,7 +766,6 @@ class GradingController extends Controller
if (!empty($studentIds)) {
$rows = $this->placementLevelModel
->whereIn('student_id', $studentIds)
->where('school_year', $schoolYear)
->findAll();
foreach ($rows as $row) {
$levels[(int) $row['student_id']] = $row['level'] ?? null;
@@ -806,7 +803,6 @@ class GradingController extends Controller
if (!empty($validIds)) {
$rows = $this->placementLevelModel
->whereIn('student_id', $validIds)
->where('school_year', $schoolYear)
->findAll();
foreach ($rows as $row) {
$existingRows[(int) $row['student_id']] = $row;
@@ -834,7 +830,6 @@ class GradingController extends Controller
$payload = [
'student_id' => $studentId,
'school_year' => $schoolYear,
'level' => $level,
'updated_by' => $userId,
];
@@ -1648,7 +1643,7 @@ public function belowSixty()
->join('students s', 's.id = sc.student_id', 'inner')
->join(
'placement_levels pl',
"pl.student_id = s.id AND pl.school_year = {$yrEsc}",
'pl.student_id = s.id',
'left'
)