From a92a7cc35115dba2c3a7cf98cb08a9ae0795da5a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 16 Aug 2017 18:22:12 +0200 Subject: [locationinfo] Fix davinci backend connection test, minor tweaks to web view --- .../locationinfo/inc/coursebackend/coursebackend_davinci.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules-available/locationinfo/inc') 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) -- cgit v1.2.3-55-g7522