From 3179ca58b7bb675387d888ea94c19171aa6ece74 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 23 Jun 2015 10:09:32 +0800 Subject: [PATCH] MDL-50670 course: correctly apply defaults for format options --- course/format/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/format/lib.php b/course/format/lib.php index 3bb98305c96..10ccf813e1d 100644 --- a/course/format/lib.php +++ b/course/format/lib.php @@ -678,7 +678,7 @@ abstract class format_base { if (isset($option['type'])) { $mform->setType($optionname, $option['type']); } - if (is_null($mform->getElementValue($optionname)) && isset($option['default'])) { + if (is_null($mform->getElementValue('id')) && isset($option['default'])) { $mform->setDefault($optionname, $option['default']); } }