Merge branch 'master_MDL-80509' of https://github.com/mattporritt/moodle

This commit is contained in:
Huong Nguyen 2024-01-18 10:01:36 +07:00
commit b515240f28

View File

@ -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);