diff --git a/adminlib.php b/adminlib.php index d984afa9a2a..2de989a139b 100644 --- a/adminlib.php +++ b/adminlib.php @@ -66,7 +66,7 @@ public function search($query) { $found = false; - foreach (core_component::get_plugin_list($this->subtype) as $name => $unused) { + foreach (\core_component::get_plugin_list($this->subtype) as $name => $unused) { if (strpos(strtolower(get_string('pluginname', $this->subtype.'_'.$name)), $query) !== false) { $found = true; break; @@ -123,7 +123,7 @@ public function __construct($subtype) { * @return array The list of plugins */ public function get_sorted_plugins_list() { - $names = core_component::get_plugin_list($this->subtype); + $names = \core_component::get_plugin_list($this->subtype); $result = []; diff --git a/classes/output/action_bar.php b/classes/output/action_bar.php index cee01898cc2..5abba47215c 100644 --- a/classes/output/action_bar.php +++ b/classes/output/action_bar.php @@ -421,7 +421,7 @@ public function draw_reports_action_bar(): string { $canaccessownreports = has_capability('mod/surveypro:accessownreports', $this->context); $canalwaysseeowner = has_capability('mod/surveypro:alwaysseeowner', $this->context); - if ($surveyproreportlist = get_plugin_list('surveyproreport')) { + if ($surveyproreportlist = \core_component::get_plugin_list('surveyproreport')) { foreach ($surveyproreportlist as $reportname => $reportpath) { $classname = 'surveyproreport_'.$reportname.'\report'; $reportman = new $classname($this->cm, $this->context, $this->surveypro); diff --git a/classes/view_cover.php b/classes/view_cover.php index 9b496f1eae5..cb04552164d 100644 --- a/classes/view_cover.php +++ b/classes/view_cover.php @@ -192,7 +192,7 @@ public function display_cover() { } // Begin of: report section. - $surveyproreportlist = get_plugin_list('surveyproreport'); + $surveyproreportlist = \core_component::get_plugin_list('surveyproreport'); $paramurl = ['s' => $this->cm->instance, 'area' => 'reports', 'section' => 'apply']; foreach ($surveyproreportlist as $reportname => $pluginpath) { diff --git a/lib.php b/lib.php index d3dac42c2c3..ae464ff1af5 100644 --- a/lib.php +++ b/lib.php @@ -1109,7 +1109,7 @@ function surveypro_get_first_allowed_report() { $return = ''; $context = \context_module::instance($cm->id); $surveypro = $DB->get_record('surveypro', ['id' => $cm->instance], '*', MUST_EXIST); - if ($surveyproreportlist = get_plugin_list('surveyproreport')) { + if ($surveyproreportlist = \core_component::get_plugin_list('surveyproreport')) { foreach ($surveyproreportlist as $reportname => $reportpath) { $classname = 'surveyproreport_'.$reportname.'\report'; $reportman = new $classname($cm, $context, $surveypro); @@ -1151,9 +1151,9 @@ function surveypro_get_plugin_list($plugintype=null, $includetype=false, $count= if ($plugintype == SURVEYPRO_TYPEFIELD || is_null($plugintype)) { if ($count) { - $plugincount += count(get_plugin_list('surveypro'.SURVEYPRO_TYPEFIELD)); + $plugincount += count(\core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFIELD)); } else { - $fieldplugins = core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFIELD); + $fieldplugins = \core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFIELD); if (!empty($includetype)) { foreach ($fieldplugins as $k => $v) { if (!get_config('surveyprofield_'.$k, 'disabled')) { @@ -1176,9 +1176,9 @@ function surveypro_get_plugin_list($plugintype=null, $includetype=false, $count= } if ($plugintype == SURVEYPRO_TYPEFORMAT || is_null($plugintype)) { if ($count) { - $plugincount += count(core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFORMAT)); + $plugincount += count(\core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFORMAT)); } else { - $formatplugins = core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFORMAT); + $formatplugins = \core_component::get_plugin_list('surveypro'.SURVEYPRO_TYPEFORMAT); if (!empty($includetype)) { foreach ($formatplugins as $k => $v) { if (!get_config('surveyproformat_'.$k, 'disabled')) {