From 45a3dfee35a2a03296531b865bd6ea2cac0d7c53 Mon Sep 17 00:00:00 2001 From: Dirk Riestere Date: Wed, 22 Mar 2017 18:57:57 +0100 Subject: Übersetzungen der Credentials eingebaut und nicht fatale errors werden nun im errorlog ausgegeben --- .../inc/coursebackend/coursebackend_hisinone.inc.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php') diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php index b250d114..61d50938 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php @@ -41,7 +41,7 @@ class CourseBackend_HisInOne extends CourseBackend $this->error = true; $this->errormsg = "Credentials are not set"; } - $this->fetchSchedulesInternal([190=>190]); + $this->findUnit(190); return !$this->error; } @@ -219,7 +219,7 @@ class CourseBackend_HisInOne extends CourseBackend public function getCredentials() { - $credentials = ["username" => ["string", "Name used to identify on HisInOne", false], "role" =>["string", "Role used to identify on HisInOne", false], "password" => ["string", "Password for the username on HisInOne", true], "open" => ["bool", "If checked the opencourseservice interface is used", false]]; + $credentials = ["username" => "string", "role" =>"string", "password" => "password", "open" => "bool"]; return $credentials; } @@ -237,13 +237,12 @@ class CourseBackend_HisInOne extends CourseBackend foreach ($param as $ID) { $unitID = $this->findUnit($ID); if ($unitID == false) { - return false; + $this->error = false; + error_log($this->errormsg); + continue; } $eventIDs = array_merge($eventIDs, $unitID); $eventIDs = array_unique($eventIDs); - if ($this->error == true) { - return false; - } } if (empty($eventIDs)) { foreach ($param as $room) { @@ -256,7 +255,9 @@ class CourseBackend_HisInOne extends CourseBackend foreach ($eventIDs as $each_event) { $event = $this->readUnit(intval($each_event)); if ($event === false) { - return false; + $this->error = false; + error_log($this->errormsg); + continue; } $events[] = $event; } -- cgit v1.2.3-55-g7522