summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
diff options
context:
space:
mode:
authorDirk Riestere2017-03-08 18:23:58 +0100
committerDirk Riestere2017-03-08 18:23:58 +0100
commite4f91cedd4a29139d10edc1cbdedcadd83de3ce8 (patch)
tree4c9533824f673cd943d0a40701dffc0ce4506423 /modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
parentAPI: setCredentials without json_encode (diff)
downloadslx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.tar.gz
slx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.tar.xz
slx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.zip
setCredentials wie im Treffen besprochen geändert und fetchshedule gibt jetzt nur noch arrays zurück
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php14
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) {