mirror of
https://github.com/moodle/moodle.git
synced 2025-05-11 18:56:09 +02:00
MDL-50670 course: correctly apply defaults for format options
This commit is contained in:
parent
06e3b6d8ba
commit
98b3fa4c63
@ -700,7 +700,7 @@ abstract class format_base {
|
|||||||
if (isset($option['type'])) {
|
if (isset($option['type'])) {
|
||||||
$mform->setType($optionname, $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']);
|
$mform->setDefault($optionname, $option['default']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user