fix widthraw spelling
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -60,9 +60,6 @@ class StudentClassModel extends Model
|
||||
$terminalStatuses = array_map([$this->db, 'escape'], [
|
||||
'denied',
|
||||
'withdrawn',
|
||||
'widthran',
|
||||
'widthrawan',
|
||||
'withdrawan',
|
||||
'waitlist',
|
||||
]);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user