From ee6251345da2fd5be5b35d2107b01d137f8ceca2 Mon Sep 17 00:00:00 2001 From: sam marshall Date: Wed, 23 Oct 2024 15:45:11 +0100 Subject: [PATCH] MDL-83529 Analytics: Upgrade can break if core module is deleted --- analytics/classes/manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics/classes/manager.php b/analytics/classes/manager.php index 8e7c6985845..4cb2882e321 100644 --- a/analytics/classes/manager.php +++ b/analytics/classes/manager.php @@ -788,7 +788,7 @@ class manager { if (preg_match('~^\\\\mod_([^\\\\]+)\\\\~', $indicator, $matches)) { if (!$allmodules) { // The first time, get all modules. - $allmodules = \core\plugin_manager::instance()->get_plugins_of_type('mod'); + $allmodules = \core\plugin_manager::instance()->get_present_plugins('mod'); } if (!array_key_exists($matches[1], $allmodules)) { // Module does not exist, so skip indicator.