summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo
diff options
context:
space:
mode:
authorSimon Rettberg2018-04-05 15:09:55 +0200
committerSimon Rettberg2018-04-05 15:09:55 +0200
commitd364765916f07b3d47eb6704b1af06e751454c13 (patch)
treeb6233e5b5397bdc9db9fc8aa3999be54ca3e188a /modules-available/locationinfo
parent[locationinfo] Add exchange backend (diff)
downloadslx-admin-d364765916f07b3d47eb6704b1af06e751454c13.tar.gz
slx-admin-d364765916f07b3d47eb6704b1af06e751454c13.tar.xz
slx-admin-d364765916f07b3d47eb6704b1af06e751454c13.zip
[locationinfo] Fix default setting for "select" backend options
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r--modules-available/locationinfo/inc/coursebackend.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php
index 7162c885..1da0086a 100644
--- a/modules-available/locationinfo/inc/coursebackend.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend.inc.php
@@ -370,6 +370,9 @@ class BackendProperty {
* @param mixed $current current value of this property.
*/
public function initForRender($current = null) {
+ if ($current === null) {
+ $current = $this->default;
+ }
if (is_array($this->type)) {
$this->template = 'dropdown';
$this->select_list = [];
@@ -391,7 +394,7 @@ class BackendProperty {
} elseif ($this->type === 'password') {
$this->inputtype = Property::getPasswordFieldType();
}
- $this->currentvalue = $current === null ? $this->default : $current;
+ $this->currentvalue = $current;
}
public $inputtype;
public $template;