diff --git a/admin/localplugins.php b/admin/localplugins.php index 12672b2fd06d5..145f65ae20ec7 100644 --- a/admin/localplugins.php +++ b/admin/localplugins.php @@ -47,7 +47,7 @@ $table->setup(); $plugins = array(); -foreach (get_plugin_list('local') as $plugin => $plugindir) { +foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) { if (get_string_manager()->string_exists('pluginname', 'local_' . $plugin)) { $strpluginname = get_string('pluginname', 'local_' . $plugin); } else { diff --git a/admin/mnet/peer_forms.php b/admin/mnet/peer_forms.php index 1ff7293b9cf85..ce1c1c086ee6a 100644 --- a/admin/mnet/peer_forms.php +++ b/admin/mnet/peer_forms.php @@ -95,7 +95,7 @@ function definition() { $mform->addRule('wwwroot', get_string('maximumchars', '', 255), 'maxlength', 255, 'client'); $themes = array('' => get_string('forceno')); - foreach (array_keys(get_plugin_list('theme')) as $themename) { + foreach (array_keys(core_component::get_plugin_list('theme')) as $themename) { $themes[$themename] = get_string('pluginname', 'theme_'.$themename); } $mform->addElement('select', 'theme', get_string('forcetheme'), $themes); diff --git a/admin/plagiarism.php b/admin/plagiarism.php index db2cd2f1bf65a..ace710fd7bde4 100644 --- a/admin/plagiarism.php +++ b/admin/plagiarism.php @@ -39,7 +39,7 @@ $txt = get_strings(array('settings', 'name', 'version')); $txt->uninstall = get_string('uninstallplugin', 'core_admin'); -$plagiarismplugins = get_plugin_list('plagiarism'); +$plagiarismplugins = core_component::get_plugin_list('plagiarism'); if (empty($plagiarismplugins)) { echo $OUTPUT->notification(get_string('nopluginsinstalled', 'plagiarism')); echo $OUTPUT->footer(); diff --git a/admin/portfolio.php b/admin/portfolio.php index 1811f5f774fde..f5940536139f8 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -163,7 +163,7 @@ function portfolio_action_url($portfolio) { $output = $OUTPUT->box_start('generalbox'); - $plugins = get_plugin_list('portfolio'); + $plugins = core_component::get_plugin_list('portfolio'); $plugins = array_keys($plugins); $instances = portfolio_instances(false, false); $usedplugins = array(); diff --git a/admin/qbehaviours.php b/admin/qbehaviours.php index 3dd14a0775965..a000e0ced784e 100644 --- a/admin/qbehaviours.php +++ b/admin/qbehaviours.php @@ -39,7 +39,7 @@ admin_externalpage_setup('manageqbehaviours'); $thispageurl = new moodle_url('/admin/qbehaviours.php'); -$behaviours = get_plugin_list('qbehaviour'); +$behaviours = core_component::get_plugin_list('qbehaviour'); $pluginmanager = plugin_manager::instance(); // Get some data we will need - question counts and which types are needed. diff --git a/admin/reports.php b/admin/reports.php index 19fafdb1bf311..70ec9525d84a3 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -49,7 +49,7 @@ $table->setup(); $plugins = array(); -foreach (get_plugin_list('report') as $plugin => $plugindir) { +foreach (core_component::get_plugin_list('report') as $plugin => $plugindir) { if (get_string_manager()->string_exists('pluginname', 'report_' . $plugin)) { $strpluginname = get_string('pluginname', 'report_' . $plugin); } else { diff --git a/admin/repository.php b/admin/repository.php index aa77af99b2075..50a08ee2bbcb6 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -390,7 +390,7 @@ function repository_action_url($repository) { } // Get all the plugins that exist on disk - $plugins = get_plugin_list('repository'); + $plugins = core_component::get_plugin_list('repository'); if (!empty($plugins)) { foreach ($plugins as $plugin => $dir) { // Check that it has not already been listed diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index f9ca6d4d5d657..1367452d228b5 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -24,7 +24,7 @@ $ADMIN->add('themes', new admin_externalpage('themeselector', new lang_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php')); // settings for each theme - foreach (get_plugin_list('theme') as $theme => $themedir) { + foreach (core_component::get_plugin_list('theme') as $theme => $themedir) { $settings_path = "$themedir/settings.php"; if (file_exists($settings_path)) { $settings = new admin_settingpage('themesetting'.$theme, new lang_string('pluginname', 'theme_'.$theme)); diff --git a/admin/settings/grades.php b/admin/settings/grades.php index d2cc43ebcb9b5..b80bb4323f2f4 100644 --- a/admin/settings/grades.php +++ b/admin/settings/grades.php @@ -178,7 +178,7 @@ // Reports $ADMIN->add('grades', new admin_category('gradereports', new lang_string('reportsettings', 'grades'))); - foreach (get_plugin_list('gradereport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) { // Include all the settings commands for this plugin if there are any if (file_exists($plugindir.'/settings.php')) { $settings = new admin_settingpage('gradereport'.$plugin, new lang_string('pluginname', 'gradereport_'.$plugin), 'moodle/grade:manage'); @@ -191,7 +191,7 @@ // Imports $ADMIN->add('grades', new admin_category('gradeimports', new lang_string('importsettings', 'grades'))); - foreach (get_plugin_list('gradeimport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) { // Include all the settings commands for this plugin if there are any if (file_exists($plugindir.'/settings.php')) { @@ -206,7 +206,7 @@ // Exports $ADMIN->add('grades', new admin_category('gradeexports', new lang_string('exportsettings', 'grades'))); - foreach (get_plugin_list('gradeexport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) { // Include all the settings commands for this plugin if there are any if (file_exists($plugindir.'/settings.php')) { $settings = new admin_settingpage('gradeexport'.$plugin, new lang_string('pluginname', 'gradeexport_'.$plugin), 'moodle/grade:manage'); diff --git a/admin/settings/plugins.php b/admin/settings/plugins.php index 5962355642cce..502d5e667ad37 100644 --- a/admin/settings/plugins.php +++ b/admin/settings/plugins.php @@ -382,7 +382,7 @@ // Course reports settings if ($hassiteconfig) { $pages = array(); - foreach (get_plugin_list('coursereport') as $report => $path) { + foreach (core_component::get_plugin_list('coursereport') as $report => $path) { $file = $CFG->dirroot . '/course/report/' . $report . '/settings.php'; if (file_exists($file)) { $settings = new admin_settingpage('coursereport' . $report, @@ -405,7 +405,7 @@ // Now add reports $pages = array(); -foreach (get_plugin_list('report') as $report => $plugindir) { +foreach (core_component::get_plugin_list('report') as $report => $plugindir) { $settings_path = "$plugindir/settings.php"; if (file_exists($settings_path)) { $settings = new admin_settingpage('report' . $report, @@ -431,7 +431,7 @@ } // Now add various admin tools -foreach (get_plugin_list('tool') as $plugin => $plugindir) { +foreach (core_component::get_plugin_list('tool') as $plugin => $plugindir) { $settings_path = "$plugindir/settings.php"; if (file_exists($settings_path)) { include($settings_path); @@ -444,7 +444,7 @@ $ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php')); $ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php')); $ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache'))); - foreach (get_plugin_list('cachestore') as $plugin => $path) { + foreach (core_component::get_plugin_list('cachestore') as $plugin => $path) { $settingspath = $path.'/settings.php'; if (file_exists($settingspath)) { $settings = new admin_settingpage('cachestore_'.$plugin.'_settings', new lang_string('pluginname', 'cachestore_'.$plugin), 'moodle/site:config'); @@ -463,7 +463,7 @@ // extend settings for each local plugin. Note that their settings may be in any part of the // settings tree and may be visible not only for administrators. We can not use $allplugins here -foreach (get_plugin_list('local') as $plugin => $plugindir) { +foreach (core_component::get_plugin_list('local') as $plugin => $plugindir) { $settings_path = "$plugindir/settings.php"; if (file_exists($settings_path)) { include($settings_path); diff --git a/admin/tool/dbtransfer/locallib.php b/admin/tool/dbtransfer/locallib.php index 192081860d8db..190d86fc84ac0 100644 --- a/admin/tool/dbtransfer/locallib.php +++ b/admin/tool/dbtransfer/locallib.php @@ -107,7 +107,7 @@ function tool_dbtransfer_rebuild_target_log_actions(moodle_database $target, pro log_update_descriptions('moodle'); $plugintypes = core_component::get_plugin_types(); foreach ($plugintypes as $type => $location) { - $plugs = get_plugin_list($type); + $plugs = core_component::get_plugin_list($type); foreach ($plugs as $plug => $fullplug) { $component = $type.'_'.$plug; $DB->delete_records('log_display', array('component'=>$component)); diff --git a/admin/tool/qeupgradehelper/extracttestcase_form.php b/admin/tool/qeupgradehelper/extracttestcase_form.php index d9c568bf58c9f..0e60dc25e7100 100644 --- a/admin/tool/qeupgradehelper/extracttestcase_form.php +++ b/admin/tool/qeupgradehelper/extracttestcase_form.php @@ -44,7 +44,7 @@ public function definition() { 'adaptivenopenalty' => 'Adaptive (no penalties)', ); - $qtypes = get_plugin_list('qtype'); + $qtypes = core_component::get_plugin_list('qtype'); foreach ($qtypes as $qtype => $notused) { $qtypes[$qtype] = get_string($qtype, 'qtype_' . $qtype); } diff --git a/admin/tool/uploadcourse/tests/helper_test.php b/admin/tool/uploadcourse/tests/helper_test.php index f81c59f4a550a..873e221613083 100644 --- a/admin/tool/uploadcourse/tests/helper_test.php +++ b/admin/tool/uploadcourse/tests/helper_test.php @@ -53,7 +53,7 @@ public function test_generate_shortname() { public function test_get_course_formats() { $result = tool_uploadcourse_helper::get_course_formats(); - $this->assertSame(array_keys(get_plugin_list('format')), $result); + $this->assertSame(array_keys(core_component::get_plugin_list('format')), $result); // Should be similar as first result, as cached. $this->assertSame($result, tool_uploadcourse_helper::get_course_formats()); } diff --git a/admin/tools.php b/admin/tools.php index 51976bd2b3cfa..491e4511cc161 100644 --- a/admin/tools.php +++ b/admin/tools.php @@ -49,7 +49,7 @@ $table->setup(); $plugins = array(); -foreach (get_plugin_list('tool') as $plugin => $plugindir) { +foreach (core_component::get_plugin_list('tool') as $plugin => $plugindir) { if (get_string_manager()->string_exists('pluginname', 'tool_' . $plugin)) { $strpluginname = get_string('pluginname', 'tool_' . $plugin); } else { diff --git a/admin/webservice/protocols.php b/admin/webservice/protocols.php index 76587f29e805c..6c6ff67f9230c 100644 --- a/admin/webservice/protocols.php +++ b/admin/webservice/protocols.php @@ -40,7 +40,7 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL); // get currently installed and enabled auth plugins -$available_webservices = get_plugin_list('webservice'); +$available_webservices = core_component::get_plugin_list('webservice'); if (!empty($webservice) and empty($available_webservices[$webservice])) { redirect($returnurl); } diff --git a/admin/webservice/testclient.php b/admin/webservice/testclient.php index dd9dc4806da3f..25e4070ac5f57 100644 --- a/admin/webservice/testclient.php +++ b/admin/webservice/testclient.php @@ -67,7 +67,7 @@ } // list all enabled webservices -$available_protocols = get_plugin_list('webservice'); +$available_protocols = core_component::get_plugin_list('webservice'); $active_protocols = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols); $protocols = array(); foreach ($active_protocols as $p) { diff --git a/backup/converter/moodle1/handlerlib.php b/backup/converter/moodle1/handlerlib.php index 94c0b1d6e3580..539d804974f52 100644 --- a/backup/converter/moodle1/handlerlib.php +++ b/backup/converter/moodle1/handlerlib.php @@ -84,7 +84,7 @@ protected static function get_plugin_handlers($type, moodle1_converter $converte global $CFG; $handlers = array(); - $plugins = get_plugin_list($type); + $plugins = core_component::get_plugin_list($type); foreach ($plugins as $name => $dir) { $handlerfile = $dir . '/backup/moodle1/lib.php'; $handlerclass = "moodle1_{$type}_{$name}_handler"; @@ -1335,7 +1335,7 @@ protected function get_qtype_handler($qtype) { if (is_null($this->qtypehandlers)) { // initialize the list of qtype handler instances $this->qtypehandlers = array(); - foreach (get_plugin_list('qtype') as $qtypename => $qtypelocation) { + foreach (core_component::get_plugin_list('qtype') as $qtypename => $qtypelocation) { $filename = $qtypelocation.'/backup/moodle1/lib.php'; if (file_exists($filename)) { $classname = 'moodle1_qtype_'.$qtypename.'_handler'; diff --git a/backup/moodle2/backup_plan_builder.class.php b/backup/moodle2/backup_plan_builder.class.php index e164ddfca83a7..b78fbad5063df 100644 --- a/backup/moodle2/backup_plan_builder.class.php +++ b/backup/moodle2/backup_plan_builder.class.php @@ -50,7 +50,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_custom_fields.php'); // Load all the activity tasks for moodle2 format -$mods = get_plugin_list('mod'); +$mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod => $moddir) { $taskpath = $moddir . '/backup/moodle2/backup_' . $mod . '_activity_task.class.php'; if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) { @@ -61,7 +61,7 @@ } // Load all the block tasks for moodle2 format -$blocks = get_plugin_list('block'); +$blocks = core_component::get_plugin_list('block'); foreach ($blocks as $block => $blockdir) { $taskpath = $blockdir . '/backup/moodle2/backup_' . $block . '_block_task.class.php'; if (file_exists($taskpath)) { diff --git a/backup/moodle2/backup_qtype_plugin.class.php b/backup/moodle2/backup_qtype_plugin.class.php index d75f3d36f01ee..09838c25e004c 100644 --- a/backup/moodle2/backup_qtype_plugin.class.php +++ b/backup/moodle2/backup_qtype_plugin.class.php @@ -176,7 +176,7 @@ protected function add_question_datasets($element) { public static function get_components_and_fileareas($filter = null) { $components = array(); // Get all the plugins of this type - $qtypes = get_plugin_list('qtype'); + $qtypes = core_component::get_plugin_list('qtype'); foreach ($qtypes as $name => $path) { // Apply filter if specified if (!is_null($filter) && $filter != $name) { diff --git a/backup/moodle2/backup_stepslib.php b/backup/moodle2/backup_stepslib.php index 952cc26ca285f..e2f47f6498c15 100644 --- a/backup/moodle2/backup_stepslib.php +++ b/backup/moodle2/backup_stepslib.php @@ -121,7 +121,7 @@ protected function add_subplugin_structure($subplugintype, $element, $multiple) $element->add_child($optigroup); // Add optigroup to stay connected since beginning // Get all the optigroup_elements, looking across all the subplugin dirs - $subpluginsdirs = get_plugin_list($subplugintype); + $subpluginsdirs = core_component::get_plugin_list($subplugintype); foreach ($subpluginsdirs as $name => $subpluginsdir) { $classname = 'backup_' . $subplugintype . '_' . $name . '_subplugin'; $backupfile = $subpluginsdir . '/backup/moodle2/' . $classname . '.class.php'; diff --git a/backup/moodle2/backup_xml_transformer.class.php b/backup/moodle2/backup_xml_transformer.class.php index 25c8503bcf754..3b9a02a865832 100644 --- a/backup/moodle2/backup_xml_transformer.class.php +++ b/backup/moodle2/backup_xml_transformer.class.php @@ -157,7 +157,7 @@ private function register_link_encoders() { $encoders['backup_course_task'] = 'encode_content_links'; // Add the module ones. Each module supporting moodle2 backups MUST have it - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod => $moddir) { if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) { $encoders['backup_' . $mod . '_activity_task'] = 'encode_content_links'; @@ -165,7 +165,7 @@ private function register_link_encoders() { } // Add the block encoders - $blocks = get_plugin_list('block'); + $blocks = core_component::get_plugin_list('block'); foreach ($blocks as $block => $blockdir) { if (class_exists('backup_' . $block . '_block_task')) { $encoders['backup_' . $block . '_block_task'] = 'encode_content_links'; diff --git a/backup/moodle2/restore_plan_builder.class.php b/backup/moodle2/restore_plan_builder.class.php index 04a91d7027345..1f830ac9728a3 100644 --- a/backup/moodle2/restore_plan_builder.class.php +++ b/backup/moodle2/restore_plan_builder.class.php @@ -57,7 +57,7 @@ require_once($CFG->dirroot . '/backup/moodle2/restore_stepslib.php'); // Load all the activity tasks for moodle2 format -$mods = get_plugin_list('mod'); +$mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod => $moddir) { $taskpath = $moddir . '/backup/moodle2/restore_' . $mod . '_activity_task.class.php'; if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) { @@ -68,7 +68,7 @@ } // Load all the block tasks for moodle2 format -$blocks = get_plugin_list('block'); +$blocks = core_component::get_plugin_list('block'); foreach ($blocks as $block => $blockdir) { $taskpath = $blockdir . '/backup/moodle2/restore_' . $block . '_block_task.class.php'; if (file_exists($taskpath)) { diff --git a/backup/moodle2/restore_plugin.class.php b/backup/moodle2/restore_plugin.class.php index de0d446d0a58a..b90bcdf6fdd9d 100644 --- a/backup/moodle2/restore_plugin.class.php +++ b/backup/moodle2/restore_plugin.class.php @@ -135,7 +135,7 @@ static public function get_restore_decode_contents($plugintype) { // (only the needed ones have been loaded, so they will // be the ones being asked here). Fetch their restore contents // by calling (if exists) to their define_decode_contents() method - $plugins = get_plugin_list($plugintype); + $plugins = core_component::get_plugin_list($plugintype); foreach ($plugins as $plugin => $plugindir) { $classname = 'restore_' . $plugintype . '_' . $plugin . '_plugin'; if (class_exists($classname)) { diff --git a/backup/moodle2/restore_stepslib.php b/backup/moodle2/restore_stepslib.php index d25e46486c299..65241c99f61ad 100644 --- a/backup/moodle2/restore_stepslib.php +++ b/backup/moodle2/restore_stepslib.php @@ -1483,7 +1483,7 @@ protected function after_execute() { unset($roleids[$roleid]); } - foreach (get_plugin_list('mod') as $modname => $notused) { + foreach (core_component::get_plugin_list('mod') as $modname => $notused) { if (isset($this->legacyallowedmodules[$modname])) { // Module is allowed, no worries. continue; @@ -3184,7 +3184,7 @@ protected function add_subplugin_structure($subplugintype, $element) { throw new restore_step_exception('incorrect_subplugin_type', $subplugintype); } // Get all the restore path elements, looking across all the subplugin dirs - $subpluginsdirs = get_plugin_list($subplugintype); + $subpluginsdirs = core_component::get_plugin_list($subplugintype); foreach ($subpluginsdirs as $name => $subpluginsdir) { $classname = 'restore_' . $subplugintype . '_' . $name . '_subplugin'; $restorefile = $subpluginsdir . '/backup/moodle2/' . $classname . '.class.php'; diff --git a/backup/util/helper/backup_general_helper.class.php b/backup/util/helper/backup_general_helper.class.php index 03ab11fdaf639..03225a38aae50 100644 --- a/backup/util/helper/backup_general_helper.class.php +++ b/backup/util/helper/backup_general_helper.class.php @@ -72,7 +72,7 @@ public static function get_blocks_from_path($path) { static $availableblocks = array(); // Get and cache available blocks if (empty($availableblocks)) { - $availableblocks = array_keys(get_plugin_list('block')); + $availableblocks = array_keys(core_component::get_plugin_list('block')); } $path = $path . '/blocks'; // Always look under blocks subdir diff --git a/backup/util/helper/restore_decode_processor.class.php b/backup/util/helper/restore_decode_processor.class.php index 66dfbef55564e..0c7bf1e2cd7d2 100644 --- a/backup/util/helper/restore_decode_processor.class.php +++ b/backup/util/helper/restore_decode_processor.class.php @@ -110,7 +110,7 @@ public static function register_link_decoders($processor) { $tasks[] = 'restore_section_task'; // Add the module tasks - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod => $moddir) { if (class_exists('restore_' . $mod . '_activity_task')) { $tasks[] = 'restore_' . $mod . '_activity_task'; @@ -121,7 +121,7 @@ public static function register_link_decoders($processor) { $tasks[] = 'restore_default_block_task'; // Add the custom block tasks - $blocks = get_plugin_list('block'); + $blocks = core_component::get_plugin_list('block'); foreach ($blocks as $block => $blockdir) { if (class_exists('restore_' . $block . '_block_task')) { $tasks[] = 'restore_' . $block . '_block_task'; diff --git a/backup/util/helper/restore_logs_processor.class.php b/backup/util/helper/restore_logs_processor.class.php index e4c8176eae8ca..63ff8019fe33a 100644 --- a/backup/util/helper/restore_logs_processor.class.php +++ b/backup/util/helper/restore_logs_processor.class.php @@ -110,7 +110,7 @@ public static function register_log_rules_for_course() { $rules = array(); // To accumulate rules for course // Add the module tasks - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod => $moddir) { if (class_exists('restore_' . $mod . '_activity_task')) { $tasks[$mod] = 'restore_' . $mod . '_activity_task'; diff --git a/backup/util/plan/backup_structure_step.class.php b/backup/util/plan/backup_structure_step.class.php index aea978c7946c1..9c3d0e719fe39 100644 --- a/backup/util/plan/backup_structure_step.class.php +++ b/backup/util/plan/backup_structure_step.class.php @@ -146,7 +146,7 @@ protected function add_plugin_structure($plugintype, $element, $multiple) { $element->add_child($optigroup); // Add optigroup to stay connected since beginning // Get all the optigroup_elements, looking across all the plugin dirs - $pluginsdirs = get_plugin_list($plugintype); + $pluginsdirs = core_component::get_plugin_list($plugintype); foreach ($pluginsdirs as $name => $plugindir) { $classname = 'backup_' . $plugintype . '_' . $name . '_plugin'; $backupfile = $plugindir . '/backup/moodle2/' . $classname . '.class.php'; diff --git a/backup/util/plan/restore_structure_step.class.php b/backup/util/plan/restore_structure_step.class.php index 1432db1bdbc25..0fb1a4070f5b4 100644 --- a/backup/util/plan/restore_structure_step.class.php +++ b/backup/util/plan/restore_structure_step.class.php @@ -303,7 +303,7 @@ protected function add_plugin_structure($plugintype, $element) { } // Get all the restore path elements, looking across all the plugin dirs - $pluginsdirs = get_plugin_list($plugintype); + $pluginsdirs = core_component::get_plugin_list($plugintype); foreach ($pluginsdirs as $name => $pluginsdir) { // We need to add also backup plugin classes on restore, they may contain // some stuff used both in backup & restore diff --git a/blocks/community/renderer.php b/blocks/community/renderer.php index dca98393b14fc..fd01814f9d2a9 100644 --- a/blocks/community/renderer.php +++ b/blocks/community/renderer.php @@ -193,8 +193,8 @@ public function course_list($courses, $huburl, $contextcourseid) { //Create course content html - $blocks = get_plugin_list('block'); - $activities = get_plugin_list('mod'); + $blocks = core_component::get_plugin_list('block'); + $activities = core_component::get_plugin_list('mod'); if (!empty($course->contents)) { $activitieshtml = ''; $blockhtml = ''; diff --git a/cache/locallib.php b/cache/locallib.php index f68d7695f6a5b..c28de55c85b1e 100644 --- a/cache/locallib.php +++ b/cache/locallib.php @@ -954,7 +954,7 @@ public static function get_store_plugin_actions($name, array $plugindetails) { */ public static function get_add_store_form($plugin) { global $CFG; // Needed for includes. - $plugins = get_plugin_list('cachestore'); + $plugins = core_component::get_plugin_list('cachestore'); if (!array_key_exists($plugin, $plugins)) { throw new coding_exception('Invalid cache plugin used when trying to create an edit form.'); } @@ -986,7 +986,7 @@ public static function get_add_store_form($plugin) { */ public static function get_edit_store_form($plugin, $store) { global $CFG; // Needed for includes. - $plugins = get_plugin_list('cachestore'); + $plugins = core_component::get_plugin_list('cachestore'); if (!array_key_exists($plugin, $plugins)) { throw new coding_exception('Invalid cache plugin used when trying to create an edit form.'); } @@ -1215,7 +1215,7 @@ public static function get_addable_lock_options() { */ public static function get_add_lock_form($plugin, array $lockplugin = null) { global $CFG; // Needed for includes. - $plugins = get_plugin_list('cachelock'); + $plugins = core_component::get_plugin_list('cachelock'); if (!array_key_exists($plugin, $plugins)) { throw new coding_exception('Invalid cache lock plugin requested when trying to create a form.'); } diff --git a/course/externallib.php b/course/externallib.php index 75b400c0f0461..46e43d1407ed5 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -528,7 +528,7 @@ public static function create_courses($courses) { $params = self::validate_parameters(self::create_courses_parameters(), array('courses' => $courses)); - $availablethemes = get_plugin_list('theme'); + $availablethemes = core_component::get_plugin_list('theme'); $availablelangs = get_string_manager()->get_list_of_translations(); $transaction = $DB->start_delegated_transaction(); @@ -692,7 +692,7 @@ public static function update_courses($courses) { $params = self::validate_parameters(self::update_courses_parameters(), array('courses' => $courses)); - $availablethemes = get_plugin_list('theme'); + $availablethemes = core_component::get_plugin_list('theme'); $availablelangs = get_string_manager()->get_list_of_translations(); foreach ($params['courses'] as $course) { diff --git a/course/format/lib.php b/course/format/lib.php index 5723eff86686b..84017f72f4b12 100644 --- a/course/format/lib.php +++ b/course/format/lib.php @@ -134,7 +134,7 @@ protected static final function get_class_name($format) { global $CFG; static $classnames = array('site' => 'format_site'); if (!isset($classnames[$format])) { - $plugins = get_plugin_list('format'); + $plugins = core_component::get_plugin_list('format'); $usedformat = self::get_format_or_default($format); if (file_exists($plugins[$usedformat].'/lib.php')) { require_once($plugins[$usedformat].'/lib.php'); diff --git a/course/lib.php b/course/lib.php index 787160b6fec45..28cc82af1bebc 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2985,7 +2985,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules = */ function get_sorted_course_formats($enabledonly = false) { global $CFG; - $formats = get_plugin_list('format'); + $formats = core_component::get_plugin_list('format'); if (!empty($CFG->format_plugins_sortorder)) { $order = explode(',', $CFG->format_plugins_sortorder); diff --git a/course/report.php b/course/report.php index 5cf8d7a6b52db..90b51b800fea5 100644 --- a/course/report.php +++ b/course/report.php @@ -19,7 +19,7 @@ $PAGE->set_heading($course->fullname.': '.$strreports); echo $OUTPUT->header(); - $reports = get_plugin_list('coursereport'); + $reports = core_component::get_plugin_list('coursereport'); foreach ($reports as $report => $reportdirectory) { $pluginfile = $reportdirectory.'/mod.php'; diff --git a/grade/edit/settings/form.php b/grade/edit/settings/form.php index b90f056c0653a..918d44b5ca63c 100644 --- a/grade/edit/settings/form.php +++ b/grade/edit/settings/form.php @@ -104,7 +104,7 @@ function definition() { $types = array('report', 'export', 'import'); foreach($types as $type) { - foreach (get_plugin_list('grade'.$type) as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('grade'.$type) as $plugin => $plugindir) { // Include all the settings commands for this plugin if there are any if (file_exists($plugindir.'/lib.php')) { require_once($plugindir.'/lib.php'); diff --git a/grade/grading/lib.php b/grade/grading/lib.php index 70451da16ebf8..c0cd8ce4dee6f 100644 --- a/grade/grading/lib.php +++ b/grade/grading/lib.php @@ -253,7 +253,7 @@ public static function available_methods($includenone = true) { $list = array(); } - foreach (get_plugin_list('gradingform') as $name => $location) { + foreach (core_component::get_plugin_list('gradingform') as $name => $location) { $list[$name] = get_string('pluginname', 'gradingform_'.$name); } diff --git a/grade/lib.php b/grade/lib.php index 7f67b190b04ab..c08ff66fa6078 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -2513,7 +2513,7 @@ public static function get_plugins_reports($courseid) { $context = context_course::instance($courseid); $gradereports = array(); $gradepreferences = array(); - foreach (get_plugin_list('gradereport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) { //some reports make no sense if we're not within a course if ($courseid==$SITE->id && ($plugin=='grader' || $plugin=='user')) { continue; @@ -2679,7 +2679,7 @@ public static function get_plugins_import($courseid) { $context = context_course::instance($courseid); if (has_capability('moodle/grade:import', $context)) { - foreach (get_plugin_list('gradeimport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradeimport') as $plugin => $plugindir) { if (!has_capability('gradeimport/'.$plugin.':view', $context)) { continue; } @@ -2717,7 +2717,7 @@ public static function get_plugins_export($courseid) { $context = context_course::instance($courseid); $exportplugins = array(); if (has_capability('moodle/grade:export', $context)) { - foreach (get_plugin_list('gradeexport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradeexport') as $plugin => $plugindir) { if (!has_capability('gradeexport/'.$plugin.':view', $context)) { continue; } diff --git a/grade/report/index.php b/grade/report/index.php index 5683fcf360da2..5e7522ae07301 100644 --- a/grade/report/index.php +++ b/grade/report/index.php @@ -36,7 +36,7 @@ $context = context_course::instance($course->id); /// find all accessible reports -$reports = get_plugin_list('gradereport'); // Get all installed reports +$reports = core_component::get_plugin_list('gradereport'); // Get all installed reports foreach ($reports as $plugin => $plugindir) { // Remove ones we can't see if (!has_capability('gradereport/'.$plugin.':view', $context)) { diff --git a/lib/accesslib.php b/lib/accesslib.php index d127a4547ce37..80a1f664d392b 100644 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -6863,7 +6863,7 @@ public function get_capabilities() { include($subpluginsfile); if (!empty($subplugins)) { foreach (array_keys($subplugins) as $subplugintype) { - foreach (array_keys(get_plugin_list($subplugintype)) as $subpluginname) { + foreach (array_keys(core_component::get_plugin_list($subplugintype)) as $subpluginname) { $subcaps = array_merge($subcaps, array_keys(load_capability_def($subplugintype.'_'.$subpluginname))); } } diff --git a/lib/adminlib.php b/lib/adminlib.php index 37f7a8772c497..bc426b2ccd8c3 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -368,7 +368,7 @@ function get_component_version($component, $source='installed') { if ($source === 'installed') { return $DB->get_field('modules', 'version', array('name'=>$name)); } else { - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); if (empty($mods[$name]) or !is_readable($mods[$name].'/version.php')) { return false; } else { @@ -384,7 +384,7 @@ function get_component_version($component, $source='installed') { if ($source === 'installed') { return $DB->get_field('block', 'version', array('name'=>$name)); } else { - $blocks = get_plugin_list('block'); + $blocks = core_component::get_plugin_list('block'); if (empty($blocks[$name]) or !is_readable($blocks[$name].'/version.php')) { return false; } else { @@ -399,7 +399,7 @@ function get_component_version($component, $source='installed') { if ($source === 'installed') { return get_config($type.'_'.$name, 'version'); } else { - $plugins = get_plugin_list($type); + $plugins = core_component::get_plugin_list($type); if (empty($plugins[$name])) { return false; } else { @@ -497,7 +497,7 @@ function get_db_directories() { /// Then, all the ones defined by core_component::get_plugin_types() $plugintypes = core_component::get_plugin_types(); foreach ($plugintypes as $plugintype => $pluginbasedir) { - if ($plugins = get_plugin_list($plugintype)) { + if ($plugins = core_component::get_plugin_list($plugintype)) { foreach ($plugins as $plugin => $plugindir) { $dbdirs[] = $plugindir.'/db'; } @@ -4732,7 +4732,7 @@ public function load_choices() { } $this->choices = array(); - if ($plugins = get_plugin_list('gradeexport')) { + if ($plugins = core_component::get_plugin_list('gradeexport')) { foreach($plugins as $plugin => $unused) { $this->choices[$plugin] = get_string('pluginname', 'gradeexport_'.$plugin); } @@ -4902,7 +4902,7 @@ public function load_choices() { global $CFG; require_once($CFG->libdir.'/gradelib.php'); - foreach (get_plugin_list('gradereport') as $plugin => $plugindir) { + foreach (core_component::get_plugin_list('gradereport') as $plugin => $plugindir) { if (file_exists($plugindir.'/lib.php')) { require_once($plugindir.'/lib.php'); $functionname = 'grade_report_'.$plugin.'_profilereport'; @@ -5411,7 +5411,7 @@ public function search($query) { $found = false; require_once($CFG->dirroot . '/question/engine/lib.php'); - foreach (get_plugin_list('qbehaviour') as $behaviour => $notused) { + foreach (core_component::get_plugin_list('qbehaviour') as $behaviour => $notused) { if (strpos(textlib::strtolower(question_engine::get_behaviour_name($behaviour)), $query) !== false) { $found = true; @@ -5499,7 +5499,7 @@ public function search($query) { } $found = false; - $portfolios = get_plugin_list('portfolio'); + $portfolios = core_component::get_plugin_list('portfolio'); foreach ($portfolios as $p => $dir) { if (strpos($p, $query) !== false) { $found = true; @@ -5550,7 +5550,7 @@ public function search($query) { } $found = false; - $repositories= get_plugin_list('repository'); + $repositories= core_component::get_plugin_list('repository'); foreach ($repositories as $p => $dir) { if (strpos($p, $query) !== false) { $found = true; @@ -5632,7 +5632,7 @@ public function is_related($query) { return true; } - $authsavailable = get_plugin_list('auth'); + $authsavailable = core_component::get_plugin_list('auth'); foreach ($authsavailable as $auth => $dir) { if (strpos($auth, $query) !== false) { return true; @@ -5663,7 +5663,7 @@ public function output_html($data, $query='') { 'up', 'down', 'none')); $txt->updown = "$txt->up/$txt->down"; - $authsavailable = get_plugin_list('auth'); + $authsavailable = core_component::get_plugin_list('auth'); get_enabled_auth_plugins(true); // fix the list of enabled auths if (empty($CFG->auth)) { $authsenabled = array(); @@ -6782,7 +6782,7 @@ function db_replace($search, $replace) { rebuild_course_cache(0, true); // TODO: we should ask all plugins to do the search&replace, for now let's do only blocks... - $blocks = get_plugin_list('block'); + $blocks = core_component::get_plugin_list('block'); foreach ($blocks as $blockname=>$fullblock) { if ($blockname === 'NEWBLOCK') { // Someone has unzipped the template, ignore it continue; @@ -6875,7 +6875,7 @@ public function is_related($query) { return true; } - $repositories= get_plugin_list('repository'); + $repositories= core_component::get_plugin_list('repository'); foreach ($repositories as $p => $dir) { if (strpos($p, $query) !== false) { return true; @@ -7040,7 +7040,7 @@ public function output_html($data, $query='') { } // Get all the plugins that exist on disk - $plugins = get_plugin_list('repository'); + $plugins = core_component::get_plugin_list('repository'); if (!empty($plugins)) { foreach ($plugins as $plugin => $dir) { // Check that it has not already been listed @@ -7784,7 +7784,7 @@ public function is_related($query) { return true; } - $protocols = get_plugin_list('webservice'); + $protocols = core_component::get_plugin_list('webservice'); foreach ($protocols as $protocol=>$location) { if (strpos($protocol, $query) !== false) { return true; @@ -7816,7 +7816,7 @@ public function output_html($data, $query='') { $strdisable = get_string('disable'); $strversion = get_string('version'); - $protocols_available = get_plugin_list('webservice'); + $protocols_available = core_component::get_plugin_list('webservice'); $active_protocols = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols); ksort($protocols_available); diff --git a/lib/cronlib.php b/lib/cronlib.php index 0e7bbe148aca6..80d2a18c9ce26 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -443,7 +443,7 @@ function cron_run() { // and finally run any local cronjobs, if any - if ($locals = get_plugin_list('local')) { + if ($locals = core_component::get_plugin_list('local')) { mtrace('Processing customized cron scripts ...', ''); // new cron functions in lib.php first cron_execute_plugin_type('local'); @@ -589,7 +589,7 @@ function cron_bc_hack_plugin_functions($plugintype, $plugins) { if ($plugintype === 'report') { // Admin reports only - not course report because course report was // never implemented before, so doesn't need BC - foreach (get_plugin_list($plugintype) as $pluginname=>$dir) { + foreach (core_component::get_plugin_list($plugintype) as $pluginname=>$dir) { $component = $plugintype . '_' . $pluginname; if (isset($plugins[$component])) { // We already have detected the function using the new API @@ -612,7 +612,7 @@ function cron_bc_hack_plugin_functions($plugintype, $plugins) { // Detect old style cron function names // Plugin gradeexport_frog used to use grade_export_frog_cron() instead of // new standard API gradeexport_frog_cron(). Also applies to gradeimport, gradereport - foreach(get_plugin_list($plugintype) as $pluginname=>$dir) { + foreach(core_component::get_plugin_list($plugintype) as $pluginname=>$dir) { $component = $plugintype.'_'.$pluginname; if (isset($plugins[$component])) { // We already have detected the function using the new API diff --git a/lib/editor/tinymce/adminlib.php b/lib/editor/tinymce/adminlib.php index 8e57b69ab5dd9..882e387f39071 100644 --- a/lib/editor/tinymce/adminlib.php +++ b/lib/editor/tinymce/adminlib.php @@ -135,7 +135,7 @@ public function is_related($query) { return true; } - $subplugins = get_plugin_list('tinymce'); + $subplugins = core_component::get_plugin_list('tinymce'); foreach ($subplugins as $name=>$dir) { if (stripos($name, $query) !== false) { return true; @@ -173,7 +173,7 @@ public function output_html($data, $query='') { $struninstall = get_string('uninstallplugin', 'core_admin'); $strversion = get_string('version'); - $subplugins = get_plugin_list('tinymce'); + $subplugins = core_component::get_plugin_list('tinymce'); $return = $OUTPUT->heading(get_string('subplugintype_tinymce_plural', 'editor_tinymce'), 3, 'main', true); $return .= $OUTPUT->box_start('generalbox tinymcesubplugins'); diff --git a/lib/editor/tinymce/all_strings.php b/lib/editor/tinymce/all_strings.php index 0758f43c6ec5d..de13312e415a2 100644 --- a/lib/editor/tinymce/all_strings.php +++ b/lib/editor/tinymce/all_strings.php @@ -68,7 +68,7 @@ } // Add subplugin strings, accept only those with proper pluginname prefix with colon. -foreach (get_plugin_list('tinymce') as $component => $ignored) { +foreach (core_component::get_plugin_list('tinymce') as $component => $ignored) { $componentstrings = get_string_manager()->load_component_strings( 'tinymce_' . $component, $lang); foreach ($componentstrings as $key => $value) { diff --git a/lib/editor/tinymce/classes/plugin.php b/lib/editor/tinymce/classes/plugin.php index 349673adb372c..6d41b25c54582 100644 --- a/lib/editor/tinymce/classes/plugin.php +++ b/lib/editor/tinymce/classes/plugin.php @@ -378,7 +378,7 @@ public static function all_update_init_params(array &$params, global $CFG; // Get list of plugin directories. - $plugins = get_plugin_list('tinymce'); + $plugins = core_component::get_plugin_list('tinymce'); // Get list of disabled subplugins. $disabled = array(); diff --git a/lib/editorlib.php b/lib/editorlib.php index 4c73e1d341813..8080d804d4282 100644 --- a/lib/editorlib.php +++ b/lib/editorlib.php @@ -158,7 +158,7 @@ function get_texteditor($editorname) { */ function editors_get_available() { $editors = array(); - foreach (get_plugin_list('editor') as $editorname => $dir) { + foreach (core_component::get_plugin_list('editor') as $editorname => $dir) { $editors[$editorname] = get_string('pluginname', 'editor_'.$editorname); } return $editors; diff --git a/lib/enrollib.php b/lib/enrollib.php index 7e70bff7e2fc1..b000654b41c10 100644 --- a/lib/enrollib.php +++ b/lib/enrollib.php @@ -86,7 +86,7 @@ function enrol_get_plugins($enabled) { } } else { // sorted alphabetically - $plugins = get_plugin_list('enrol'); + $plugins = core_component::get_plugin_list('enrol'); ksort($plugins); } diff --git a/lib/filterlib.php b/lib/filterlib.php index 624ceadefbf0d..fb674fffc9185 100644 --- a/lib/filterlib.php +++ b/lib/filterlib.php @@ -513,7 +513,7 @@ function filter_get_all_installed() { global $CFG; $filternames = array(); - foreach (get_plugin_list('filter') as $filter => $fulldir) { + foreach (core_component::get_plugin_list('filter') as $filter => $fulldir) { if (is_readable("$fulldir/filter.php")) { $filternames[$filter] = filter_get_name($filter); } diff --git a/lib/gradelib.php b/lib/gradelib.php index e95a2af3db41b..fc026170614b0 100644 --- a/lib/gradelib.php +++ b/lib/gradelib.php @@ -1138,7 +1138,7 @@ function grade_grab_course_grades($courseid, $modname=null, $userid=0) { return; } - if (!$mods = get_plugin_list('mod') ) { + if (!$mods = core_component::get_plugin_list('mod') ) { print_error('nomodules', 'debug'); } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index a8ef132b19756..f79a2dbe7ca73 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -8215,7 +8215,7 @@ function get_plugin_list_with_function($plugintype, $function, $file = 'lib.php' * Lists plugin-like directories within specified directory * * This function was originally used for standard Moodle plugins, please use - * new get_plugin_list() now. + * new core_component::get_plugin_list() now. * * This function is used for general directory listing and backwards compatility. * diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 258d2731ddeae..776e293a1e775 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2222,7 +2222,7 @@ protected function load_for_user($user=null, $forceforcontext=false) { } else if ($course->id == $SITE->id && has_capability('moodle/user:viewdetails', $usercontext) && (!in_array('mycourses', $hiddenfields) || has_capability('moodle/user:viewhiddendetails', $coursecontext))) { // Add view grade report is permitted - $reports = get_plugin_list('gradereport'); + $reports = core_component::get_plugin_list('gradereport'); arsort($reports); // user is last, we want to test it first $userscourses = enrol_get_users_courses($user->id); @@ -3572,7 +3572,7 @@ protected function load_course_settings($forceopen = false) { if (has_capability('moodle/site:viewreports', $coursecontext)) { // Basic capability for listing of reports. $reportnav = $coursenode->add(get_string('reports'), null, self::TYPE_CONTAINER, null, null, new pix_icon('i/stats', '')); - $coursereports = get_plugin_list('coursereport'); + $coursereports = core_component::get_plugin_list('coursereport'); foreach ($coursereports as $report => $dir) { $libfile = $CFG->dirroot.'/course/report/'.$report.'/lib.php'; if (file_exists($libfile)) { @@ -3595,7 +3595,7 @@ protected function load_course_settings($forceopen = false) { if (has_capability('moodle/grade:viewall', $coursecontext)) { $reportavailable = true; } else if (!empty($course->showgrades)) { - $reports = get_plugin_list('gradereport'); + $reports = core_component::get_plugin_list('gradereport'); if (is_array($reports) && count($reports)>0) { // Get all installed reports arsort($reports); // user is last, we want to test it first foreach ($reports as $plugin => $plugindir) { @@ -4297,7 +4297,7 @@ protected function load_front_page_settings($forceopen = false) { if (has_capability('moodle/site:viewreports', $coursecontext)) { // Basic capability for listing of reports. $frontpagenav = $frontpage->add(get_string('reports'), null, self::TYPE_CONTAINER, null, null, new pix_icon('i/stats', '')); - $coursereports = get_plugin_list('coursereport'); + $coursereports = core_component::get_plugin_list('coursereport'); foreach ($coursereports as $report=>$dir) { $libfile = $CFG->dirroot.'/course/report/'.$report.'/lib.php'; if (file_exists($libfile)) { diff --git a/lib/outputlib.php b/lib/outputlib.php index 26ed10261fec0..03407525f6ec1 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -609,7 +609,7 @@ public function editor_css_files() { $files = array(); // first editor plugins - $plugins = get_plugin_list('editor'); + $plugins = core_component::get_plugin_list('editor'); foreach ($plugins as $plugin=>$fulldir) { $sheetfile = "$fulldir/editor_styles.css"; if (is_readable($sheetfile)) { @@ -778,7 +778,7 @@ public function css_files() { if ($type === 'theme' || (!empty($excludes[$type]) and $excludes[$type] === true)) { continue; } - $plugins = get_plugin_list($type); + $plugins = core_component::get_plugin_list($type); foreach ($plugins as $plugin=>$fulldir) { if (!empty($excludes[$type]) and is_array($excludes[$type]) and in_array($plugin, $excludes[$type])) { diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index d750713a4110f..517d441b2175b 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -1665,7 +1665,7 @@ private function get_moodle_metadata() { // And finally the plugins. $plugintypes = core_component::get_plugin_types(); foreach ($plugintypes as $plugintype => $pathroot) { - $pluginlist = get_plugin_list($plugintype); + $pluginlist = core_component::get_plugin_list($plugintype); foreach ($pluginlist as $plugin => $path) { if ($module = $this->get_moodle_path_metadata($path)) { $moodlemodules = array_merge($moodlemodules, $module); diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index 471de07daa4b5..b04940904b5ca 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -459,7 +459,7 @@ public static function build_config_file() { $plugintypes = core_component::get_plugin_types(); ksort($plugintypes); foreach ($plugintypes as $type=>$unused) { - $plugs = get_plugin_list($type); + $plugs = core_component::get_plugin_list($type); ksort($plugs); foreach ($plugs as $plug=>$fullplug) { if (!file_exists("$fullplug/tests/")) { diff --git a/lib/plagiarismlib.php b/lib/plagiarismlib.php index 59272134c938a..566587d74920c 100644 --- a/lib/plagiarismlib.php +++ b/lib/plagiarismlib.php @@ -188,7 +188,7 @@ function plagiarism_load_available_plugins() { if (empty($CFG->enableplagiarism)) { return array(); } - $plagiarismplugins = get_plugin_list('plagiarism'); + $plagiarismplugins = core_component::get_plugin_list('plagiarism'); $availableplugins = array(); foreach($plagiarismplugins as $plugin => $dir) { //check this plugin is enabled and a lib file exists. diff --git a/lib/pluginlib.php b/lib/pluginlib.php index 3f598f77ff512..cf7a75101c677 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -2460,7 +2460,7 @@ abstract class plugininfo_base { public static function get_plugins($type, $typerootdir, $typeclass) { // get the information about plugins at the disk - $plugins = get_plugin_list($type); + $plugins = core_component::get_plugin_list($type); $ondisk = array(); foreach ($plugins as $pluginname => $pluginrootdir) { $ondisk[$pluginname] = plugininfo_default_factory::make($type, $typerootdir, diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index 1b42e436a6405..2cff7a0e14094 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -815,7 +815,7 @@ function portfolio_plugin_sanity_check($plugins=null) { if (is_string($plugins)) { $plugins = array($plugins); } else if (empty($plugins)) { - $plugins = get_plugin_list('portfolio'); + $plugins = core_component::get_plugin_list('portfolio'); $plugins = array_keys($plugins); } diff --git a/lib/questionlib.php b/lib/questionlib.php index 71734e51f59e5..86abddccdb7c3 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -138,7 +138,7 @@ function questions_in_use($questionids) { return true; } - foreach (get_plugin_list('mod') as $module => $path) { + foreach (core_component::get_plugin_list('mod') as $module => $path) { $lib = $path . '/lib.php'; if (is_readable($lib)) { include_once($lib); diff --git a/lib/testing/classes/tests_finder.php b/lib/testing/classes/tests_finder.php index 10d98172e028d..666e34087fbbf 100644 --- a/lib/testing/classes/tests_finder.php +++ b/lib/testing/classes/tests_finder.php @@ -66,7 +66,7 @@ private static function get_all_plugins_with_tests($testtype) { $plugintypes = core_component::get_plugin_types(); ksort($plugintypes); foreach ($plugintypes as $type => $unused) { - $plugs = get_plugin_list($type); + $plugs = core_component::get_plugin_list($type); ksort($plugs); foreach ($plugs as $plug => $fullplug) { // Look for tests recursively diff --git a/lib/testing/classes/util.php b/lib/testing/classes/util.php index e51865cb33f35..71ebacc7de797 100644 --- a/lib/testing/classes/util.php +++ b/lib/testing/classes/util.php @@ -690,7 +690,7 @@ public static function get_version_hash() { $versions['core'] = $version; // modules - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); ksort($mods); foreach ($mods as $mod => $fullmod) { $module = new stdClass(); @@ -704,7 +704,7 @@ public static function get_version_hash() { unset($plugintypes['mod']); ksort($plugintypes); foreach ($plugintypes as $type => $unused) { - $plugs = get_plugin_list($type); + $plugs = core_component::get_plugin_list($type); ksort($plugs); foreach ($plugs as $plug => $fullplug) { $plugin = new stdClass(); diff --git a/lib/upgradelib.php b/lib/upgradelib.php index cf4b15c10187d..a84fc7abf3d09 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -385,7 +385,7 @@ function upgrade_plugins($type, $startcallback, $endcallback, $verbose) { return upgrade_plugins_blocks($startcallback, $endcallback, $verbose); } - $plugs = get_plugin_list($type); + $plugs = core_component::get_plugin_list($type); foreach ($plugs as $plug=>$fullplug) { // Reset time so that it works when installing a large number of plugins @@ -540,7 +540,7 @@ function upgrade_plugins($type, $startcallback, $endcallback, $verbose) { function upgrade_plugins_modules($startcallback, $endcallback, $verbose) { global $CFG, $DB; - $mods = get_plugin_list('mod'); + $mods = core_component::get_plugin_list('mod'); foreach ($mods as $mod=>$fullmod) { @@ -715,7 +715,7 @@ function upgrade_plugins_blocks($startcallback, $endcallback, $verbose) { //Is this a first install $first_install = null; - $blocks = get_plugin_list('block'); + $blocks = core_component::get_plugin_list('block'); foreach ($blocks as $blockname=>$fullblock) { diff --git a/mod/assign/adminlib.php b/mod/assign/adminlib.php index 2a78c0ac4a749..45703624e6a96 100644 --- a/mod/assign/adminlib.php +++ b/mod/assign/adminlib.php @@ -65,7 +65,7 @@ public function search($query) { $found = false; $textlib = new textlib(); - foreach (get_plugin_list($this->subtype) as $name => $notused) { + foreach (core_component::get_plugin_list($this->subtype) as $name => $notused) { if (strpos($textlib::strtolower(get_string('pluginname', $this->subtype . '_' . $name)), $query) !== false) { $found = true; @@ -116,7 +116,7 @@ public function __construct($subtype) { * @return array The list of plugins */ public function get_sorted_plugins_list() { - $names = get_plugin_list($this->subtype); + $names = core_component::get_plugin_list($this->subtype); $result = array(); diff --git a/mod/assign/assignmentplugin.php b/mod/assign/assignmentplugin.php index f3c68c40b1899..cda69f19dd57c 100644 --- a/mod/assign/assignmentplugin.php +++ b/mod/assign/assignmentplugin.php @@ -75,7 +75,7 @@ public final function is_first() { * @return bool */ public final function is_last() { - $lastindex = count(get_plugin_list($this->get_subtype()))-1; + $lastindex = count(core_component::get_plugin_list($this->get_subtype()))-1; $currentindex = get_config($this->get_subtype() . '_' . $this->get_type(), 'sortorder'); if ($lastindex == $currentindex) { return true; diff --git a/mod/assign/lib.php b/mod/assign/lib.php index 0cff70dff91a2..49a13f102606b 100644 --- a/mod/assign/lib.php +++ b/mod/assign/lib.php @@ -858,7 +858,7 @@ function assign_cron() { require_once($CFG->dirroot . '/mod/assign/locallib.php'); assign::cron(); - $plugins = get_plugin_list('assignsubmission'); + $plugins = core_component::get_plugin_list('assignsubmission'); foreach ($plugins as $name => $plugin) { $disabled = get_config('assignsubmission_' . $name, 'disabled'); @@ -868,7 +868,7 @@ function assign_cron() { $class::cron(); } } - $plugins = get_plugin_list('assignfeedback'); + $plugins = core_component::get_plugin_list('assignfeedback'); foreach ($plugins as $name => $plugin) { $disabled = get_config('assignfeedback_' . $name, 'disabled'); diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 290235f3caf2d..f29ed2a672d20 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -331,7 +331,7 @@ protected function load_plugins($subtype) { global $CFG; $result = array(); - $names = get_plugin_list($subtype); + $names = core_component::get_plugin_list($subtype); foreach ($names as $name => $path) { if (file_exists($path . '/locallib.php')) { diff --git a/mod/assign/settings.php b/mod/assign/settings.php index bc8c1c31346db..038d31e47060f 100644 --- a/mod/assign/settings.php +++ b/mod/assign/settings.php @@ -40,7 +40,7 @@ if ($ADMIN->fulltree) { $menu = array(); - foreach (get_plugin_list('assignfeedback') as $type => $notused) { + foreach (core_component::get_plugin_list('assignfeedback') as $type => $notused) { $visible = !get_config('assignfeedback_' . $type, 'disabled'); if ($visible) { $menu['assignfeedback_' . $type] = new lang_string('pluginname', 'assignfeedback_' . $type); diff --git a/mod/assign/tests/locallib_test.php b/mod/assign/tests/locallib_test.php index ba5f13581ad5d..e7054db6d7ffc 100644 --- a/mod/assign/tests/locallib_test.php +++ b/mod/assign/tests/locallib_test.php @@ -54,7 +54,7 @@ public function test_return_links() { public function test_get_feedback_plugins() { $this->setUser($this->editingteachers[0]); $assign = $this->create_instance(); - $installedplugins = array_keys(get_plugin_list('assignfeedback')); + $installedplugins = array_keys(core_component::get_plugin_list('assignfeedback')); foreach ($assign->get_feedback_plugins() as $plugin) { $this->assertContains($plugin->get_type(), $installedplugins, 'Feedback plugin not in list of installed plugins'); @@ -64,7 +64,7 @@ public function test_get_feedback_plugins() { public function test_get_submission_plugins() { $this->setUser($this->editingteachers[0]); $assign = $this->create_instance(); - $installedplugins = array_keys(get_plugin_list('assignsubmission')); + $installedplugins = array_keys(core_component::get_plugin_list('assignsubmission')); foreach ($assign->get_submission_plugins() as $plugin) { $this->assertContains($plugin->get_type(), $installedplugins, 'Submission plugin not in list of installed plugins'); diff --git a/mod/assignment/backup/moodle1/lib.php b/mod/assignment/backup/moodle1/lib.php index 68c955292f4da..b61bea06f1ad3 100644 --- a/mod/assignment/backup/moodle1/lib.php +++ b/mod/assignment/backup/moodle1/lib.php @@ -173,7 +173,7 @@ protected function get_subplugin_handler($subplugin) { if (is_null($this->subpluginhandlers)) { $this->subpluginhandlers = array(); - $subplugins = get_plugin_list('assignment'); + $subplugins = core_component::get_plugin_list('assignment'); foreach ($subplugins as $name => $dir) { $handlerfile = $dir.'/backup/moodle1/lib.php'; $handlerclass = "moodle1_mod_assignment_{$name}_subplugin_handler"; diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index ba560cff26cff..7065ce539802e 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -2825,7 +2825,7 @@ function assignment_cron () { global $CFG, $USER, $DB; /// first execute all crons in plugins - if ($plugins = get_plugin_list('assignment')) { + if ($plugins = core_component::get_plugin_list('assignment')) { foreach ($plugins as $plugin=>$dir) { require_once("$dir/assignment.class.php"); $assignmentclass = "assignment_$plugin"; @@ -3637,7 +3637,7 @@ function assignment_get_coursemodule_info($coursemodule) { */ function assignment_types() { $types = array(); - $names = get_plugin_list('assignment'); + $names = core_component::get_plugin_list('assignment'); foreach ($names as $name=>$dir) { $types[$name] = get_string('type'.$name, 'assignment'); @@ -3820,7 +3820,7 @@ function assignment_get_types() { } /// Drop-in extra assignment types - $assignmenttypes = get_plugin_list('assignment'); + $assignmenttypes = core_component::get_plugin_list('assignment'); foreach ($assignmenttypes as $assignmenttype=>$fulldir) { if (!empty($CFG->{'assignment_hide_'.$assignmenttype})) { // Not wanted continue; @@ -3880,7 +3880,7 @@ function assignment_reset_userdata($data) { global $CFG; $status = array(); - foreach (get_plugin_list('assignment') as $type=>$dir) { + foreach (core_component::get_plugin_list('assignment') as $type=>$dir) { require_once("$dir/assignment.class.php"); $assignmentclass = "assignment_$type"; $ass = new $assignmentclass(); diff --git a/mod/book/lib.php b/mod/book/lib.php index b6307f73f8704..9b2eb211c8780 100644 --- a/mod/book/lib.php +++ b/mod/book/lib.php @@ -229,7 +229,7 @@ function book_get_view_actions() { $return = array('view', 'view all'); - $plugins = get_plugin_list('booktool'); + $plugins = core_component::get_plugin_list('booktool'); foreach ($plugins as $plugin => $dir) { if (file_exists("$dir/lib.php")) { require_once("$dir/lib.php"); @@ -254,7 +254,7 @@ function book_get_post_actions() { $return = array('update'); - $plugins = get_plugin_list('booktool'); + $plugins = core_component::get_plugin_list('booktool'); foreach ($plugins as $plugin => $dir) { if (file_exists("$dir/lib.php")) { require_once("$dir/lib.php"); @@ -303,7 +303,7 @@ function book_supports($feature) { function book_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $booknode) { global $USER, $PAGE; - $plugins = get_plugin_list('booktool'); + $plugins = core_component::get_plugin_list('booktool'); foreach ($plugins as $plugin => $dir) { if (file_exists("$dir/lib.php")) { require_once("$dir/lib.php"); diff --git a/mod/data/field.php b/mod/data/field.php index 4a08a41118f48..a24d6284139b2 100644 --- a/mod/data/field.php +++ b/mod/data/field.php @@ -240,7 +240,7 @@ /// Print the browsing interface ///get the list of possible fields (plugins) -$plugins = get_plugin_list('datafield'); +$plugins = core_component::get_plugin_list('datafield'); $menufield = array(); foreach ($plugins as $plugin=>$fulldir){ diff --git a/mod/data/lib.php b/mod/data/lib.php index 2da45f7cc28a8..eecd8acfd5ffa 100644 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -1877,7 +1877,7 @@ function data_get_available_presets($context) { $presets = array(); // First load the ratings sub plugins that exist within the modules preset dir - if ($dirs = get_plugin_list('datapreset')) { + if ($dirs = core_component::get_plugin_list('datapreset')) { foreach ($dirs as $dir=>$fulldir) { if (is_directory_a_preset($fulldir)) { $preset = new stdClass(); diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index 56eead8cafb5f..a94c4a9dfe253 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -803,7 +803,7 @@ function lesson_extend_settings_navigation($settings, $lessonnode) { */ function lesson_get_import_export_formats($type) { global $CFG; - $fileformats = get_plugin_list("qformat"); + $fileformats = core_component::get_plugin_list("qformat"); $fileformatname=array(); foreach ($fileformats as $fileformat=>$fdir) { diff --git a/mod/quiz/db/upgrade.php b/mod/quiz/db/upgrade.php index 89d2dfc8e8b85..da853983220b9 100644 --- a/mod/quiz/db/upgrade.php +++ b/mod/quiz/db/upgrade.php @@ -113,7 +113,7 @@ function xmldb_quiz_upgrade($oldversion) { // Get a list of response variables that have files. require_once($CFG->dirroot . '/question/type/questiontypebase.php'); $variables = array(); - foreach (get_plugin_list('qtype') as $qtypename => $path) { + foreach (core_component::get_plugin_list('qtype') as $qtypename => $path) { $file = $path . '/questiontype.php'; if (!is_readable($file)) { continue; diff --git a/mod/quiz/report/reportlib.php b/mod/quiz/report/reportlib.php index 344513e5afe26..bc88dc84f8c50 100644 --- a/mod/quiz/report/reportlib.php +++ b/mod/quiz/report/reportlib.php @@ -331,7 +331,7 @@ function quiz_report_list($context) { } $reports = $DB->get_records('quiz_reports', null, 'displayorder DESC', 'name, capability'); - $reportdirs = get_plugin_list('quiz'); + $reportdirs = core_component::get_plugin_list('quiz'); // Order the reports tab in descending order of displayorder. $reportcaps = array(); diff --git a/mod/scorm/report/reportlib.php b/mod/scorm/report/reportlib.php index d6d50c6fd8bf4..2b16607e9bd78 100644 --- a/mod/scorm/report/reportlib.php +++ b/mod/scorm/report/reportlib.php @@ -35,7 +35,7 @@ function scorm_report_list($context) { if (!empty($reportlist)) { return $reportlist; } - $installed = get_plugin_list('scormreport'); + $installed = core_component::get_plugin_list('scormreport'); foreach ($installed as $reportname => $notused) { $pluginfile = $CFG->dirroot.'/mod/scorm/report/'.$reportname.'/report.php'; if (is_readable($pluginfile)) { diff --git a/mod/workshop/backup/moodle1/lib.php b/mod/workshop/backup/moodle1/lib.php index 4405280c6e378..bbb6aec0e6e84 100644 --- a/mod/workshop/backup/moodle1/lib.php +++ b/mod/workshop/backup/moodle1/lib.php @@ -268,7 +268,7 @@ protected function get_strategy_handler($strategy) { if (is_null($this->strategyhandlers)) { $this->strategyhandlers = array(); - $subplugins = get_plugin_list('workshopform'); + $subplugins = core_component::get_plugin_list('workshopform'); foreach ($subplugins as $name => $dir) { $handlerfile = $dir.'/backup/moodle1/lib.php'; $handlerclass = "moodle1_workshopform_{$name}_handler"; diff --git a/mod/workshop/lib.php b/mod/workshop/lib.php index 54d74b4488142..b4ad846bfa24d 100644 --- a/mod/workshop/lib.php +++ b/mod/workshop/lib.php @@ -211,21 +211,21 @@ function workshop_delete_instance($id) { $DB->delete_records_list('workshop_submissions', 'id', array_keys($submissions)); // call the static clean-up methods of all available subplugins - $strategies = get_plugin_list('workshopform'); + $strategies = core_component::get_plugin_list('workshopform'); foreach ($strategies as $strategy => $path) { require_once($path.'/lib.php'); $classname = 'workshop_'.$strategy.'_strategy'; call_user_func($classname.'::delete_instance', $workshop->id); } - $allocators = get_plugin_list('workshopallocation'); + $allocators = core_component::get_plugin_list('workshopallocation'); foreach ($allocators as $allocator => $path) { require_once($path.'/lib.php'); $classname = 'workshop_'.$allocator.'_allocator'; call_user_func($classname.'::delete_instance', $workshop->id); } - $evaluators = get_plugin_list('workshopeval'); + $evaluators = core_component::get_plugin_list('workshopeval'); foreach ($evaluators as $evaluator => $path) { require_once($path.'/lib.php'); $classname = 'workshop_'.$evaluator.'_evaluation'; @@ -974,7 +974,7 @@ function workshop_cron() { function workshop_scale_used($workshopid, $scaleid) { global $CFG; // other files included from here - $strategies = get_plugin_list('workshopform'); + $strategies = core_component::get_plugin_list('workshopform'); foreach ($strategies as $strategy => $strategypath) { $strategylib = $strategypath . '/lib.php'; if (is_readable($strategylib)) { @@ -1007,7 +1007,7 @@ function workshop_scale_used($workshopid, $scaleid) { function workshop_scale_used_anywhere($scaleid) { global $CFG; // other files included from here - $strategies = get_plugin_list('workshopform'); + $strategies = core_component::get_plugin_list('workshopform'); foreach ($strategies as $strategy => $strategypath) { $strategylib = $strategypath . '/lib.php'; if (is_readable($strategylib)) { diff --git a/mod/workshop/locallib.php b/mod/workshop/locallib.php index dcbde8e70a648..c377cf0a00e9f 100644 --- a/mod/workshop/locallib.php +++ b/mod/workshop/locallib.php @@ -212,7 +212,7 @@ public function __construct(stdclass $dbrecord, stdclass $cm, stdclass $course, * @return array Array ['string' => 'string'] of localized allocation method names */ public static function installed_allocators() { - $installed = get_plugin_list('workshopallocation'); + $installed = core_component::get_plugin_list('workshopallocation'); $forms = array(); foreach ($installed as $allocation => $allocationpath) { if (file_exists($allocationpath . '/lib.php')) { @@ -287,7 +287,7 @@ public static function available_example_modes_list() { * @return array ['string' => 'string'] */ public static function available_strategies_list() { - $installed = get_plugin_list('workshopform'); + $installed = core_component::get_plugin_list('workshopform'); $forms = array(); foreach ($installed as $strategy => $strategypath) { if (file_exists($strategypath . '/lib.php')) { diff --git a/mod/workshop/settings.php b/mod/workshop/settings.php index 35cbd08b8af1f..ff28604d4d9ce 100644 --- a/mod/workshop/settings.php +++ b/mod/workshop/settings.php @@ -61,7 +61,7 @@ get_string('configexamplesmode', 'workshop'), workshop::EXAMPLES_VOLUNTARY, $options)); // include the settings of allocation subplugins - $allocators = get_plugin_list('workshopallocation'); + $allocators = core_component::get_plugin_list('workshopallocation'); foreach ($allocators as $allocator => $path) { if (file_exists($settingsfile = $path . '/settings.php')) { $settings->add(new admin_setting_heading('workshopallocationsetting'.$allocator, @@ -71,7 +71,7 @@ } // include the settings of grading strategy subplugins - $strategies = get_plugin_list('workshopform'); + $strategies = core_component::get_plugin_list('workshopform'); foreach ($strategies as $strategy => $path) { if (file_exists($settingsfile = $path . '/settings.php')) { $settings->add(new admin_setting_heading('workshopformsetting'.$strategy, @@ -81,7 +81,7 @@ } // include the settings of grading evaluation subplugins - $evaluations = get_plugin_list('workshopeval'); + $evaluations = core_component::get_plugin_list('workshopeval'); foreach ($evaluations as $evaluation => $path) { if (file_exists($settingsfile = $path . '/settings.php')) { $settings->add(new admin_setting_heading('workshopevalsetting'.$evaluation, diff --git a/question/engine/bank.php b/question/engine/bank.php index b329b31409abc..b104da2834f0e 100644 --- a/question/engine/bank.php +++ b/question/engine/bank.php @@ -133,7 +133,7 @@ public static function qtype_enabled($qtypename) { * @return bool whether this question type exists. */ public static function qtype_exists($qtypename) { - return array_key_exists($qtypename, get_plugin_list('qtype')); + return array_key_exists($qtypename, core_component::get_plugin_list('qtype')); } /** @@ -149,7 +149,7 @@ public static function get_qtype_name($qtypename) { */ public static function get_all_qtypes() { $qtypes = array(); - foreach (get_plugin_list('qtype') as $plugin => $notused) { + foreach (core_component::get_plugin_list('qtype') as $plugin => $notused) { try { $qtypes[$plugin] = self::get_qtype($plugin); } catch (coding_exception $e) { diff --git a/question/engine/lib.php b/question/engine/lib.php index a5e5d12f1b98a..80db5b4b46d58 100644 --- a/question/engine/lib.php +++ b/question/engine/lib.php @@ -225,7 +225,7 @@ public static function load_behaviour_class($behaviour) { */ public static function get_archetypal_behaviours() { $archetypes = array(); - $behaviours = get_plugin_list('qbehaviour'); + $behaviours = core_component::get_plugin_list('qbehaviour'); foreach ($behaviours as $behaviour => $notused) { if (self::is_behaviour_archetypal($behaviour)) { $archetypes[$behaviour] = self::get_behaviour_name($behaviour); diff --git a/theme/index.php b/theme/index.php index 7f6eb61a032a6..66a400cfb71f6 100644 --- a/theme/index.php +++ b/theme/index.php @@ -152,7 +152,7 @@ $table->id = 'adminthemeselector'; $table->head = array(get_string('theme'), get_string('info')); - $themes = get_plugin_list('theme'); + $themes = core_component::get_plugin_list('theme'); foreach ($themes as $themename => $themedir) { diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index 1fc2c1e6ea56e..ac6a3917eeb1b 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -46,7 +46,7 @@ function definition() { $mform->addRule('username', $strrequired, 'required', null, 'client'); $mform->setType('username', PARAM_RAW); - $auths = get_plugin_list('auth'); + $auths = core_component::get_plugin_list('auth'); $enabled = get_string('pluginenabled', 'core_plugin'); $disabled = get_string('plugindisabled', 'core_plugin'); $auth_options = array($enabled=>array(), $disabled=>array()); diff --git a/user/externallib.php b/user/externallib.php index dbde297f812b8..7947f2ecfb234 100644 --- a/user/externallib.php +++ b/user/externallib.php @@ -112,11 +112,11 @@ public static function create_users($users) { // If any problems are found then exceptions are thrown with helpful error messages $params = self::validate_parameters(self::create_users_parameters(), array('users'=>$users)); - $availableauths = get_plugin_list('auth'); + $availableauths = core_component::get_plugin_list('auth'); unset($availableauths['mnet']); // these would need mnethostid too unset($availableauths['webservice']); // we do not want new webservice users for now - $availablethemes = get_plugin_list('theme'); + $availablethemes = core_component::get_plugin_list('theme'); $availablelangs = get_string_manager()->get_list_of_translations(); $transaction = $DB->start_delegated_transaction(); diff --git a/user/filters/lib.php b/user/filters/lib.php index 6c6a8395be7f1..19839ba896df5 100644 --- a/user/filters/lib.php +++ b/user/filters/lib.php @@ -121,7 +121,7 @@ function get_field($fieldname, $advanced) { case 'nevermodified': return new user_filter_checkbox('nevermodified', get_string('nevermodified', 'filters'), $advanced, array('timemodified', 'timecreated'), array('timemodified_sck', 'timemodified_eck')); case 'cohort': return new user_filter_cohort($advanced); case 'auth': - $plugins = get_plugin_list('auth'); + $plugins = core_component::get_plugin_list('auth'); $choices = array(); foreach ($plugins as $auth => $unused) { $choices[$auth] = get_string('pluginname', "auth_{$auth}"); diff --git a/user/profile/definelib.php b/user/profile/definelib.php index c73baf32486fc..1b87534e10465 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -392,7 +392,7 @@ function profile_list_datatypes() { $datatypes = array(); - $plugins = get_plugin_list('profilefield'); + $plugins = core_component::get_plugin_list('profilefield'); foreach ($plugins as $type=>$unused) { $datatypes[$type] = get_string('pluginname', 'profilefield_'.$type); }