/** * Tests whether the airnotifier settings have been configured * * @since Moodle 2.7 */ public static function is_system_configured() { global $DB; // First, check if the plugin is disabled. $processor = $DB->get_record('message_processors', array('name' => 'airnotifier'), '*', MUST_EXIST); if (!$processor->enabled) { return 0; } // Then, check if the plugin is completly configured. $manager = new message_airnotifier_manager(); return (int) $manager->is_system_configured(); }
/** * Tests whether the airnotifier settings have been configured * @return boolean true if airnotifier is configured */ public function is_system_configured() { $airnotifiermanager = new message_airnotifier_manager(); return $airnotifiermanager->is_system_configured(); }