Skip to content
Snippets Groups Projects
Commit 025a65fa authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Suggested patch to core_component::get_plugin_list_with_file

parent 3f00dba5
No related branches found
No related tags found
No related merge requests found
...@@ -43,10 +43,15 @@ class qtype_stack_admin_setting_maths_display_method extends admin_setting_confi ...@@ -43,10 +43,15 @@ class qtype_stack_admin_setting_maths_display_method extends admin_setting_confi
// Remove this if statement once we no longer need to support Moodle 2.5.x. // Remove this if statement once we no longer need to support Moodle 2.5.x.
if (class_exists('core_component')) { if (class_exists('core_component')) {
$cc = new core_component;
if (method_exists($cc, 'get_plugin_list_with_file')) {
$filters = core_component::get_plugin_list_with_file('filter', 'filter.php'); $filters = core_component::get_plugin_list_with_file('filter', 'filter.php');
} else { } else {
$filters = get_plugin_list_with_file('filter', 'filter.php'); $filters = get_plugin_list_with_file('filter', 'filter.php');
} }
} else {
$filters = get_plugin_list_with_file('filter', 'filter.php');
}
if (array_key_exists('tex', $filters)) { if (array_key_exists('tex', $filters)) {
$this->choices['tex'] = get_string('settingmathsdisplay_tex', 'qtype_stack'); $this->choices['tex'] = get_string('settingmathsdisplay_tex', 'qtype_stack');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment