summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
index 2d53e762..11882a1e 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
@@ -56,7 +56,7 @@ class Coursebackend_Davinci extends CourseBackend
private function toArray($response)
{
try {
- $cleanresponse = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $response);
+ $cleanresponse = preg_replace('/(<\/?)(\w+):([^>]*>)/', "$1$2$3", $response);
$xml = new SimpleXMLElement($cleanresponse);
$array = json_decode(json_encode((array)$xml), true);
} catch (Exception $exception) {
@@ -73,8 +73,8 @@ class Coursebackend_Davinci extends CourseBackend
*/
private function fetchArray($roomId)
{
- $startDate = new DateTime('monday this week');
- $endDate = new DateTime('sunday');
+ $startDate = new DateTime('today 0:00');
+ $endDate = new DateTime('+7 days 0:00');
$url = $this->location . "content=xml&type=room&name=" . $roomId . "&startdate=" . $startDate->format('d.m.Y') . "&enddate=" . $endDate->format('d.m.Y');
$ch = curl_init();
$options = array(
@@ -97,6 +97,7 @@ class Coursebackend_Davinci extends CourseBackend
///Operation completed successfully
}
curl_close($ch);
+ error_log($output);
return $this->toArray($output);
}