summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-21 12:34:04 +0200
committerSimon Rettberg2017-04-21 12:34:04 +0200
commit2935cc4f1fc4a0af10324bd11df77cb6a0589f10 (patch)
tree8fa4c251b8bbd245f91401231a1fe4881972d2f8
parent[locationinfo] Generate credentials in server-settings server side (diff)
downloadslx-admin-2935cc4f1fc4a0af10324bd11df77cb6a0589f10.tar.gz
slx-admin-2935cc4f1fc4a0af10324bd11df77cb6a0589f10.tar.xz
slx-admin-2935cc4f1fc4a0af10324bd11df77cb6a0589f10.zip
[locationinfo] Backend: Proper checkConnection() for davinci, make course service in hisinone a dropdown box
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php4
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
index 88e50df4..a9756dda 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_davinci.inc.php
@@ -26,8 +26,8 @@ class CourseBackend_Davinci extends CourseBackend
$this->error = "Credentials are not set";
} else {
$data = $this->fetchRoomRaw('someroomid123');
- if (strpos($data, 'DAVINCI SERVER') === false) {
- $this->error = "This doesn't seem to be a DAVINCI server";
+ if ($data !== false && strpos($data, 'DAVINCI SERVER') === false) {
+ $this->error = "Unknown reply; this doesn't seem to be a DAVINCI server.";
}
}
return $this->error === false;
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
index 0a222b6f..65f52e6b 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
@@ -29,7 +29,7 @@ class CourseBackend_HisInOne extends CourseBackend
$this->error = false;
$this->username = $data['username'] . "\t" . $data['role'];
$this->password = $data['password'];
- $this->open = $data['open'];
+ $this->open = $data['open'] !== 'CourseService';
$url = preg_replace('#(/+qisserver(/+services\d+(/+OpenCourseService)?)?)?\W*$#i', '', $data['baseUrl']);
if ($this->open) {
$this->location = $url . "/qisserver/services2/OpenCourseService";
@@ -49,7 +49,7 @@ class CourseBackend_HisInOne extends CourseBackend
new BackendProperty('username', 'string'),
new BackendProperty('role', 'string'),
new BackendProperty('password', 'password'),
- new BackendProperty('open', 'bool', true),
+ new BackendProperty('open', ['OpenCourseService', 'CourseService'], 'OpenCourseService'),
new BackendProperty('verifyCert', 'bool', true),
new BackendProperty('verifyHostname', 'bool', true)
];