MDL-50670 course: correctly apply defaults for format options

This commit is contained in:
Marina Glancy
2017-05-02 17:36:53 +08:00
committed by Mark Nelson
parent 75528e9305
commit 3179ca58b7
+1 -1
View File
@@ -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']);
}
}