mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-50670-master-fix' of https://github.com/marinaglancy/moodle
This commit is contained in:
commit
529d52f39a
@ -700,7 +700,9 @@ abstract class format_base {
|
||||
if (isset($option['type'])) {
|
||||
$mform->setType($optionname, $option['type']);
|
||||
}
|
||||
if (is_null($mform->getElementValue('id')) && isset($option['default'])) {
|
||||
if (isset($option['default']) && !array_key_exists($optionname, $mform->_defaultValues)) {
|
||||
// Set defaults for the elements in the form.
|
||||
// Since we call this method after set_data() make sure that we don't override what was already set.
|
||||
$mform->setDefault($optionname, $option['default']);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user