MDL-50670 course: correctly apply defaults for format options

This commit is contained in:
Marina Glancy
2017-05-02 16:06:46 +08:00
committed by Mark Nelson
parent 06e3b6d8ba
commit 98b3fa4c63
+1 -1
View File
@@ -700,7 +700,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']);
}
}