From 086ba0ed7a0af637bacc7f01ab4b45e0156d388f Mon Sep 17 00:00:00 2001 From: Dirk Riestere Date: Mon, 27 Feb 2017 20:26:58 +0100 Subject: Bugfixes and Errorcode implementation --- modules-available/locationinfo/inc/coursebackend.inc.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'modules-available/locationinfo/inc/coursebackend.inc.php') diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php index 47eb73f4..49448cca 100644 --- a/modules-available/locationinfo/inc/coursebackend.inc.php +++ b/modules-available/locationinfo/inc/coursebackend.inc.php @@ -12,10 +12,14 @@ abstract class CourseBackend /** * @var array list of known backends + * $error boolean true if there was an error + * $errormsg string with the error message */ private static $backendTypes = false; + public $error; + public $errormsg; - /** + /** * Load all known backend types. This is done * by including *.inc.php from inc/coursebackend/. */ @@ -161,5 +165,15 @@ abstract class CourseBackend } return $result[$roomID]; } + + /** + * @return false if there was no error string with error message if there was one + */ + public final function getError(){ + if($this->error){ + return $this->errormsg; + } + return false; + } } -- cgit v1.2.3-55-g7522