summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc
diff options
context:
space:
mode:
authorSimon Rettberg2017-08-16 18:22:12 +0200
committerSimon Rettberg2017-08-16 18:22:12 +0200
commita92a7cc35115dba2c3a7cf98cb08a9ae0795da5a (patch)
treedb25ac6dacd7d7769c420af854b6a52439b4cd30 /modules-available/locationinfo/inc
parent[sysconfig] Add support to disable fixNumeric hack in ldadp (diff)
downloadslx-admin-a92a7cc35115dba2c3a7cf98cb08a9ae0795da5a.tar.gz
slx-admin-a92a7cc35115dba2c3a7cf98cb08a9ae0795da5a.tar.xz
slx-admin-a92a7cc35115dba2c3a7cf98cb08a9ae0795da5a.zip
[locationinfo] Fix davinci backend connection test, minor tweaks to web view
Diffstat (limited to 'modules-available/locationinfo/inc')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
index 53617a61..fac3f296 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
@@ -25,7 +25,9 @@ class CourseBackend_Davinci extends CourseBackend
if (empty($this->location)) {
$this->error = "Credentials are not set";
} else {
- $data = $this->fetchRoomRaw('someroomid123');
+ $startDate = new DateTime('today 0:00');
+ $endDate = new DateTime('+7 days 0:00');
+ $data = $this->fetchRoomRaw('someroomid123', $startDate, $endDate);
if ($data !== false && strpos($data, 'DAVINCI SERVER') === false) {
$this->error = "Unknown reply; this doesn't seem to be a DAVINCI server.";
}
@@ -58,7 +60,9 @@ class CourseBackend_Davinci extends CourseBackend
}
/**
- * @param $roomId string name of the room
+ * @param string $roomId unique name of the room, as used by davinci
+ * @param \DateTime $startDate start date to fetch
+ * @param \DateTime $endDate end date of range to fetch
* @return array|bool if successful the arrayrepresentation of the timetable
*/
private function fetchRoomRaw($roomId, $startDate, $endDate)