diff --git a/lib/upgradelib.php b/lib/upgradelib.php index 355a234ccfe..37e3ee3bbc5 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -1947,9 +1947,6 @@ function upgrade_core($version, $verbose) { $syscontext->mark_dirty(); core_upgrade_time::record_detail('context_system::mark_dirty'); - // Prompt admin to register site. Reminder flow handles sites already registered, so admin won't be prompted if registered. - set_config('registrationpending', true); - print_upgrade_part_end('moodle', false, $verbose); } catch (Exception $ex) { upgrade_handle_exception($ex); @@ -2002,6 +1999,10 @@ function upgrade_noncore($verbose) { set_config('allcomponenthash', core_component::get_all_component_hash()); core_upgrade_time::record_detail('core_component::get_all_component_hash'); + // Prompt admin to register site. Reminder flow handles sites already registered, so admin won't be prompted if registered. + // Defining for non-core upgrades also covers core upgrades. + set_config('registrationpending', true); + // Purge caches again, just to be sure we arn't holding onto old stuff now. if (!defined('CLI_UPGRADE_RUNNING') || !CLI_UPGRADE_RUNNING) { cache_helper::purge_all(true);