MDL-50670 course: correctly apply defaults for format options
This commit is contained in:
committed by
Mark Nelson
parent
75528e9305
commit
3179ca58b7
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user