summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
diff options
context:
space:
mode:
authorDirk Riestere2017-03-22 18:57:57 +0100
committerDirk Riestere2017-03-22 18:57:57 +0100
commit45a3dfee35a2a03296531b865bd6ea2cac0d7c53 (patch)
treeb6039986c08922c4f348078a3ebdbcf18a17a822 /modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
parentfrontend fixed scrolling (diff)
downloadslx-admin-45a3dfee35a2a03296531b865bd6ea2cac0d7c53.tar.gz
slx-admin-45a3dfee35a2a03296531b865bd6ea2cac0d7c53.tar.xz
slx-admin-45a3dfee35a2a03296531b865bd6ea2cac0d7c53.zip
Übersetzungen der Credentials eingebaut und nicht fatale errors werden nun im errorlog ausgegeben
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php15
1 files changed, 8 insertions, 7 deletions
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;
}