summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php
diff options
context:
space:
mode:
authorJannik Schönartz2017-03-09 00:23:56 +0100
committerJannik Schönartz2017-03-09 00:23:56 +0100
commit326766e9ce7caeaa653cb2bac20962d1147a7e6a (patch)
treefa48f4e8530dc64cabb4a48c04bde9149ba62155 /modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php
parentfrontend: fixed vertical mode in doorsign (diff)
downloadslx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.gz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.xz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.zip
Locationinfo: Errors from the CourseBackend are now safes in the db and shown in the Admin-Panel. Refresh-button added for the servers. Install.php needs to be executed!
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php
index 02883df5..3dd0f7aa 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php
@@ -1,14 +1,30 @@
<?php
class Coursebackend_Dummy extends CourseBackend {
-
-
-
+ private $pw;
public function setCredentials($json,$location,$serverID) {
+ $x = $json;
+ $this->pw = $x['password'];
+
+ if ($this->pw == "mfg") {
+ $this->error = false;
+ return true;
+ } else {
+ $this->errormsg = "USE mfg as password!";
+ $this->error = true;
+ return false;
+ }
}
public function checkConnection(){
- return "Your Error could be shown here!";
+ if ($this->pw == "mfg") {
+ $this->error = false;
+ return true;
+ } else {
+ $this->errormsg = "USE mfg as password!";
+ $this->error = true;
+ return false;
+ }
}
public function getCredentials(){