mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
Merge branch 'MDL-77749-unset-config-duration-MOODLE_401_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
f1f87dbd6b
@ -4050,13 +4050,13 @@ class admin_setting_configduration extends admin_setting {
|
||||
$context = (object) [
|
||||
'id' => $this->get_id(),
|
||||
'name' => $this->get_full_name(),
|
||||
'value' => $data['v'],
|
||||
'value' => $data['v'] ?? '',
|
||||
'readonly' => $this->is_readonly(),
|
||||
'options' => array_map(function($unit) use ($units, $data, $defaultunit) {
|
||||
return [
|
||||
'value' => $unit,
|
||||
'name' => $units[$unit],
|
||||
'selected' => ($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u']
|
||||
'selected' => isset($data) && (($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u'])
|
||||
];
|
||||
}, array_keys($units))
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user