Simplified code to check if enabled. Issue #16

This commit is contained in:
Daniel Thee Roperto
2016-09-07 10:40:06 +10:00
parent f4abd4b84e
commit a63d2f9d4c

View File

@@ -24,11 +24,7 @@
*/
defined('MOODLE_INTERNAL') || die;
// 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) {
if ($hassiteconfig && is_enabled_auth('outage')) {
// Configure default settings page.
$settings->visiblename = get_string('menudefaults', 'auth_outage');
$settings->add(