diff --git a/application/tasks/sitsimport.php b/application/tasks/sitsimport.php index 92a4e995..1a279a64 100644 --- a/application/tasks/sitsimport.php +++ b/application/tasks/sitsimport.php @@ -266,7 +266,7 @@ public function getProgramme($course, $level, $processYears = null) } $model = $level === "ug" ? "UG_Programme" : "PG_Programme"; - $courseID = substr($course->progID, 0, strlen((string) $course->progID) - 3); + $courseID = filter_var($course->progID, FILTER_SANITIZE_NUMBER_INT); return $model::where( "instance_id",