From 33d35b28433564d628e9c27f4e77b5e91e559d8b Mon Sep 17 00:00:00 2001 From: Justice Addison Date: Fri, 4 Oct 2024 16:15:54 +0000 Subject: [PATCH] Get the number part of the progID from the sits xml without removing digits. --- application/tasks/sitsimport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",