diff --git a/settings.php b/settings.php index fa082c6..5af7589 100644 --- a/settings.php +++ b/settings.php @@ -24,8 +24,11 @@ */ defined('MOODLE_INTERNAL') || die; -// FIXME If plugin not installed, it is still generating the category Outage under Auth Plugins. -if ($hassiteconfig) { +// Check if plugin is enabled, if not do not create menu entries. +$enabled = core_plugin_manager::instance()->get_enabled_plugins('auth'); +$enabled = array_key_exists('outage', $enabled); + +if ($hassiteconfig && $enabled) { // Configure default settings page. $settings->visiblename = get_string('menudefaults', 'auth_outage'); $settings->add( @@ -54,4 +57,4 @@ if ($hassiteconfig) { new moodle_url($CFG->wwwroot . '/auth/outage/list.php') ) ); -} \ No newline at end of file +}