diff --git a/db/upgrade.php b/db/upgrade.php index 42c6e10..d399d06 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -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.