diff options
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php')
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php index 523823bf..367bfb0d 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php @@ -4,22 +4,27 @@ class Coursebackend_Davinci extends CourseBackend { - public function setCredentials($json, $location, $serverID) + public function setCredentials($data, $location, $serverID) { + if ($location = "") { + $this->error = true; + $this->errormsg = "No url is given"; + return !$this->error; + } $this->location = $location . "/DAVINCIIS.dll?"; $this->serverID = $serverID; //Davinci doesn't have credentials - return $this->checkConnection(); + return true; } public function checkConnection() { if ($this->location != "") { - $this->fetchSchedulesInternal('B206'); + $this->fetchArray('B206'); return !$this->error; } $this->error = true; - $this->errormsg = "No url is given"; + $this->errormsg = "Credentials are not set"; return !$this->error; } @@ -115,7 +120,6 @@ class Coursebackend_Davinci extends CourseBackend ); array_push($timetable, $json); } - $timetable = json_encode($timetable); $schedules[$sroomId] = $timetable; } } catch (Exception $e) { |