Skip to content

Commit

Permalink
Merge pull request #178 from aneno-m-e/copy-default-on-course-creation
Browse files Browse the repository at this point in the history
Update existing settings only
  • Loading branch information
danmarsden authored Jul 15, 2024
2 parents 88b09ae + 9dbc02e commit 0844489
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,10 @@ function xmldb_local_recompletion_upgrade($oldversion) {
];

foreach ($update as $old => $new) {
set_config($new, get_config('local_recompletion', $old), 'local_recompletion');
unset_config($old, 'local_recompletion');
if ($DB->get_record('config_plugins', ['name' => $old, 'plugin' => 'local_recompletion']) != false) {
set_config($new, get_config('local_recompletion', $old), 'local_recompletion');
unset_config($old, 'local_recompletion');
}
}

// Recompletion savepoint reached.
Expand Down

0 comments on commit 0844489

Please sign in to comment.