mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
"MDL-13766, delete config if checkbox element is unchecked"
This commit is contained in:
parent
6b3c4d65c7
commit
b3efb4cfd4
1 changed files with 16 additions and 12 deletions
|
@ -70,6 +70,10 @@ if (!empty($edit) || !empty($new)) {
|
|||
foreach($configs as $config) {
|
||||
if (!empty($fromform->$config)) {
|
||||
$settings[$config] = $fromform->$config;
|
||||
} else {
|
||||
// if the config name is not appear in $fromform
|
||||
// empty this config value
|
||||
$settings[$config] = '';
|
||||
}
|
||||
}
|
||||
$instanceoptionnames = repository::static_function($edit, 'get_instance_option_names');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue