diff options
author | Jannik Schönartz | 2017-02-28 22:49:28 +0100 |
---|---|---|
committer | Jannik Schönartz | 2017-02-28 22:49:28 +0100 |
commit | 737e8fa01022a20b4ee3fb6a43c5a83fde53963b (patch) | |
tree | 0ec2e9b6e631c9ae02d6fbc77e7825e1dc6e63b4 /modules-available/locationinfo | |
parent | Bugfixes (diff) | |
download | slx-admin-737e8fa01022a20b4ee3fb6a43c5a83fde53963b.tar.gz slx-admin-737e8fa01022a20b4ee3fb6a43c5a83fde53963b.tar.xz slx-admin-737e8fa01022a20b4ee3fb6a43c5a83fde53963b.zip |
Dummy modification
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r-- | modules-available/locationinfo/api.inc.php | 3 | ||||
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php index 7520eedc..e04e7e65 100644 --- a/modules-available/locationinfo/api.inc.php +++ b/modules-available/locationinfo/api.inc.php @@ -90,8 +90,7 @@ function getCalendar($idList) { foreach ($serverList as $server) { $serverInstance = CourseBackend::getInstance($server['type']); $serverInstance->setCredentials(json_encode($server['credentials']), $server['serverurl'], $server['serverid']); - $calendarFromBackend = $serverInstance->fetchSchedule($server['idList']); - + $calendarFromBackend = json_decode($serverInstance->fetchSchedule($server['idList']), true); $resultarray = array_merge($resultarray, $calendarFromBackend); } diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php index 6fa4f32f..64cf29fd 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php @@ -30,7 +30,20 @@ class Coursebackend_Dummy extends CourseBackend { } public function fetchSchedulesInternal($roomId){ - + $a = array(); + foreach ($roomId as $id) { + $x['id'] = $id; + $calendar['title'] = "test exam"; + $calendar['start'] = "2017-February-20 10:00:00"; + $calendar['end'] = "2017-February-20 12:00:00"; + $calarray = array(); + $calarray[] = $calendar; + $x['calendar'] = $calarray; + $a[] = $x; + } + + + return json_encode($a, true); } } |