fix widthraw spelling
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 47s
Tests / PHPUnit (push) Failing after 1m16s

This commit is contained in:
root
2026-08-20 16:07:34 -04:00
parent bfa343b69f
commit 246def8ca9
7 changed files with 20 additions and 31 deletions
@@ -2833,25 +2833,17 @@ class AdministratorController extends BaseController
$hasRemovalCondition = false;
if ($hasIsWithdrawn) {
$builder->where('is_withdrawn', 1);
$builder->orWhere('is_withdrawn', 1);
$hasRemovalCondition = true;
}
if ($hasEnrollmentStatus) {
if ($hasRemovalCondition) {
$builder->orWhereIn('enrollment_status', ['withdrawn', 'widthran', 'denied']);
} else {
$builder->whereIn('enrollment_status', ['withdrawn', 'widthran', 'denied']);
}
$builder->orWhereIn('enrollment_status', ['withdrawn', 'denied']);
$hasRemovalCondition = true;
}
if ($hasAdmissionStatus) {
if ($hasRemovalCondition) {
$builder->orWhere('admission_status', 'denied');
} else {
$builder->where('admission_status', 'denied');
}
$builder->orWhere('admission_status', 'denied');
$hasRemovalCondition = true;
}
@@ -2901,7 +2893,7 @@ class AdministratorController extends BaseController
return 'denied';
}
if (in_array($enrollmentStatus, ['withdrawn', 'widthran'], true) || (int)($row['is_withdrawn'] ?? 0) === 1) {
if ($enrollmentStatus === 'withdrawn' || (int)($row['is_withdrawn'] ?? 0) === 1) {
return 'withdrawn';
}
+9 -9
View File
@@ -1007,7 +1007,7 @@ class GradingController extends BaseController
->join('classes c', 'c.id = cs.class_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->orderBy('s.lastname', 'ASC')
@@ -1049,7 +1049,7 @@ class GradingController extends BaseController
->whereIn('ps.batch_id', $batchIds)
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->orderBy('ps.batch_id', 'ASC')
@@ -1688,7 +1688,7 @@ public function belowSixty()
->where('sc.school_year', $schoolYear)
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd();
@@ -1888,7 +1888,7 @@ public function belowSixty()
->join('classSection cs', 'cs.class_section_id = ss.class_section_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where('ss.school_year', $schoolYear)
@@ -1940,7 +1940,7 @@ public function belowSixty()
->join('classSection cs', 'cs.class_section_id = ss.class_section_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where('ss.school_year', $schoolYear)
@@ -2060,7 +2060,7 @@ public function belowSixty()
->where('ss.student_id', $studentId)
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where("LOWER(TRIM(ss.semester))", $semesterKey)
@@ -2411,7 +2411,7 @@ public function belowSixty()
->join('classSection cs', 'cs.class_section_id = ss.class_section_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where('ss.school_year', $schoolYear)
@@ -3472,7 +3472,7 @@ public function allDecisions()
->join('classes c', 'c.id = cs.class_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where('ss.school_year', $schoolYear)
@@ -3692,7 +3692,7 @@ public function generateAllDecisions()
->join('classSection cs', 'cs.class_section_id = ss.class_section_id', 'left')
->groupStart()
->where('s.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->where('ss.school_year', $schoolYear)
+2 -2
View File
@@ -5,7 +5,7 @@ if (!function_exists('student_normalized_enrollment_status')) {
{
$studentId = (int)($student['student_id'] ?? $student['id'] ?? 0);
$status = strtolower(trim((string)($student['enrollment_status'] ?? '')));
if ($status === 'widthran' || $status === 'widthrawan' || $status === 'withdrawan' || $status === 'withdrawn student' || (int)($student['is_withdrawn'] ?? 0) === 1) {
if ($status === 'withdrawn student' || (int)($student['is_withdrawn'] ?? 0) === 1) {
$status = 'withdrawn';
}
@@ -35,7 +35,7 @@ if (!function_exists('student_normalized_enrollment_status')) {
->get(1)
->getRowArray();
$rowStatus = strtolower(trim((string)($row['enrollment_status'] ?? '')));
if ($rowStatus === 'widthran' || $rowStatus === 'widthrawan' || $rowStatus === 'withdrawan' || $rowStatus === 'withdrawn student' || (int)($row['is_withdrawn'] ?? 0) === 1) {
if ($rowStatus === 'withdrawn student' || (int)($row['is_withdrawn'] ?? 0) === 1) {
$rowStatus = 'withdrawn';
}
$statusCache[$cacheKey] = $rowStatus;
-3
View File
@@ -60,9 +60,6 @@ class StudentClassModel extends Model
$terminalStatuses = array_map([$this->db, 'escape'], [
'denied',
'withdrawn',
'widthran',
'widthrawan',
'withdrawan',
'waitlist',
]);
+3 -3
View File
@@ -305,7 +305,7 @@ class StudentModel extends Model
->where('sc.school_year', $school_year)
->groupStart()
->where('students.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd();
@@ -346,7 +346,7 @@ class StudentModel extends Model
->where('student_class.school_year', $schoolYear)
->groupStart()
->where('students.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd()
->groupBy('students.id, students.school_id, students.firstname, students.lastname, students.is_active, e.enrollment_status, e.is_withdrawn')
@@ -502,7 +502,7 @@ class StudentModel extends Model
$builder->groupStart()
->where('students.is_active', 1)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','widthran','widthrawan','withdrawan','waitlist')", null, false)
->orWhere("LOWER(TRIM(e.enrollment_status)) IN ('denied','withdrawn','waitlist')", null, false)
->orWhere('e.is_withdrawn', 1)
->groupEnd();
+1 -1
View File
@@ -1396,7 +1396,7 @@ final class EnrollmentTransitionService
$admission = strtolower(trim((string) ($enrollment['admission_status'] ?? '')));
return $admission === 'denied'
|| in_array($status, ['denied', 'withdrawn', 'widthran'], true)
|| in_array($status, ['denied', 'withdrawn'], true)
|| (int) ($enrollment['is_withdrawn'] ?? 0) === 1;
}
@@ -41,7 +41,7 @@ final class DeliberationDecision
str_contains($compact, 'repeat') || str_contains($compact, 'keepkg') => self::REPEAT_CLASS,
str_contains($compact, 'makeupexam') || str_contains($compact, 'makeupexamfall') || str_contains($compact, 'makeup') => self::MAKE_UP_EXAM,
str_contains($compact, 'deferred') || str_contains($compact, 'pendingdecision') => self::DEFERRED_DECISION,
str_contains($compact, 'withdraw') || str_contains($compact, 'widthraw') || str_contains($compact, 'widthdraw') || str_contains($compact, 'widthrwan') => self::WITHDRAWN,
str_contains($compact, 'withdraw') => self::WITHDRAWN,
str_contains($compact, 'expel') => self::EXPELLED,
default => null,
};