2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Defines message providers (types of messages being sent)
20 * The providers defined on this file are processed and registered into
21 * the Moodle DB after any install or upgrade operation. All plugins
24 * For more information, take a look to the documentation available:
25 * - Message API: {@link http://docs.moodle.org/dev/Message_API}
26 * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
30 * @copyright 2008 onwards Martin Dougiamas http://dougiamas.com
31 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34 defined('MOODLE_INTERNAL') ||
die();
36 $messageproviders = array (
38 // Notices that an admin might be interested in
40 'capability' => 'moodle/site:config'
43 // Important errors that an admin ought to know about
45 'capability' => 'moodle/site:config'
48 // cron-based notifications about available moodle and/or additional plugin updates
49 'availableupdate' => array(
50 'capability' => 'moodle/site:config',
52 'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF
57 'instantmessage' => array (
59 'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF
,
60 'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF
,
65 'capability' => 'moodle/site:config'
68 // Course creation request notification
69 'courserequested' => array (
70 'capability' => 'moodle/site:approvecourse'
73 // Course request approval notification
74 'courserequestapproved' => array (
75 'capability' => 'moodle/course:request'
78 // Course request rejection notification
79 'courserequestrejected' => array (
80 'capability' => 'moodle/course:request'
83 // Badge award notification to a badge recipient.
84 'badgerecipientnotice' => array (
86 'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF
,
87 'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF
,
89 'capability' => 'moodle/badges:earnbadge'
92 // Badge award notification to a badge creator (mostly cron-based).
93 'badgecreatornotice' => array (
95 'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF
,