2009-11-01 11:31:16 +00:00
|
|
|
<?php
|
2010-08-03 08:07:49 +00:00
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
2008-07-31 08:01:46 +00:00
|
|
|
|
2010-08-03 08:07:49 +00:00
|
|
|
/**
|
|
|
|
* Defines message providers (types of messages being sent)
|
|
|
|
*
|
2012-04-01 22:48:17 +02:00
|
|
|
* The providers defined on this file are processed and registered into
|
|
|
|
* the Moodle DB after any install or upgrade operation. All plugins
|
|
|
|
* support this.
|
|
|
|
*
|
|
|
|
* For more information, take a look to the documentation available:
|
|
|
|
* - Message API: {@link http://docs.moodle.org/dev/Message_API}
|
|
|
|
* - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
|
|
|
|
*
|
|
|
|
* @package core
|
|
|
|
* @category message
|
|
|
|
* @copyright 2008 onwards Martin Dougiamas http://dougiamas.com
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
2010-08-03 08:07:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
defined('MOODLE_INTERNAL') || die();
|
2008-07-31 08:01:46 +00:00
|
|
|
|
|
|
|
$messageproviders = array (
|
|
|
|
|
2021-07-30 10:29:23 +02:00
|
|
|
'newlogin' => array (
|
|
|
|
'defaults' => array(
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
2012-04-01 22:48:17 +02:00
|
|
|
// Notices that an admin might be interested in
|
2009-11-01 16:48:45 +00:00
|
|
|
'notices' => array (
|
2008-07-31 08:01:46 +00:00
|
|
|
'capability' => 'moodle/site:config'
|
|
|
|
),
|
|
|
|
|
2012-04-01 22:48:17 +02:00
|
|
|
// Important errors that an admin ought to know about
|
2008-07-31 08:01:46 +00:00
|
|
|
'errors' => array (
|
|
|
|
'capability' => 'moodle/site:config'
|
2009-06-19 14:25:56 +00:00
|
|
|
),
|
2008-07-31 08:01:46 +00:00
|
|
|
|
2012-03-22 17:19:57 +01:00
|
|
|
// cron-based notifications about available moodle and/or additional plugin updates
|
|
|
|
'availableupdate' => array(
|
|
|
|
'capability' => 'moodle/site:config',
|
|
|
|
'defaults' => array(
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
2009-06-19 14:25:56 +00:00
|
|
|
'instantmessage' => array (
|
2011-05-20 15:10:27 +01:00
|
|
|
'defaults' => array(
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
2009-06-19 14:25:56 +00:00
|
|
|
),
|
2009-11-01 16:48:45 +00:00
|
|
|
|
backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
CPY [schedule,core],[automatedbackupschedule,core_backup]
MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
|
|
|
'backup' => array (
|
|
|
|
'capability' => 'moodle/site:config'
|
2011-01-04 13:35:08 +08:00
|
|
|
),
|
|
|
|
|
2012-04-01 22:48:17 +02:00
|
|
|
// Course creation request notification
|
2011-01-04 13:35:08 +08:00
|
|
|
'courserequested' => array (
|
|
|
|
'capability' => 'moodle/site:approvecourse'
|
|
|
|
),
|
|
|
|
|
2012-04-01 22:48:17 +02:00
|
|
|
// Course request approval notification
|
2011-01-04 13:35:08 +08:00
|
|
|
'courserequestapproved' => array (
|
2019-02-05 10:58:18 +01:00
|
|
|
'capability' => 'moodle/course:request',
|
|
|
|
'defaults' => array(
|
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
2011-01-04 13:35:08 +08:00
|
|
|
),
|
|
|
|
|
2012-04-01 22:48:17 +02:00
|
|
|
// Course request rejection notification
|
2011-01-04 13:35:08 +08:00
|
|
|
'courserequestrejected' => array (
|
2019-02-05 10:58:18 +01:00
|
|
|
'capability' => 'moodle/course:request',
|
|
|
|
'defaults' => array(
|
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
2013-09-24 16:09:44 +12:00
|
|
|
),
|
backup MDL-22184 Scheduled backups are now possible again through cron.
AMOS BEGIN
MOV [move scheduledsetup,core_backup],[automatedsetup,core_backup]
MOV [scheduledsettings,core_backup],[automatedsettings,core_backup]
MOV [scheduledstorage,core_backup],[automatedstorage,core_backup]
MOV [scheduledstoragehelp,core_backup],[automatedstoragehelp,core_backup]
MOV [scheduledbackupsinactive,core],[automatedbackupsinactive,core_backup]
MOV [scheduledbackupstatus,core],[automatedbackupstatus,core_backup]
CPY [schedule,core],[automatedbackupschedule,core_backup]
MOV [backupschedulehelp,core],[automatedbackupschedulehelp,core_backup]
AMOS END
2010-11-10 06:07:43 +00:00
|
|
|
|
2020-09-17 17:57:13 +02:00
|
|
|
// Course completed. Requires course completion configured at course level. It does not work with just activity progress.
|
|
|
|
'coursecompleted' => [],
|
|
|
|
|
2021-07-28 11:58:08 +02:00
|
|
|
// Course content updated. New content (activities or resources) has been created or existing content updated.
|
|
|
|
'coursecontentupdated' => array (
|
|
|
|
'defaults' => array(
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
2013-09-24 16:09:44 +12:00
|
|
|
// Badge award notification to a badge recipient.
|
|
|
|
'badgerecipientnotice' => array (
|
|
|
|
'defaults' => array(
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
2019-02-05 10:58:18 +01:00
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
2013-09-24 16:09:44 +12:00
|
|
|
),
|
|
|
|
'capability' => 'moodle/badges:earnbadge'
|
|
|
|
),
|
|
|
|
|
|
|
|
// Badge award notification to a badge creator (mostly cron-based).
|
|
|
|
'badgecreatornotice' => array (
|
|
|
|
'defaults' => array(
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
)
|
2016-04-04 16:35:41 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
// A comment was left on a plan.
|
|
|
|
'competencyplancomment' => array(),
|
|
|
|
|
|
|
|
// A comment was left on a user competency.
|
|
|
|
'competencyusercompcomment' => array(),
|
2017-05-23 17:43:46 +08:00
|
|
|
|
|
|
|
// User insights.
|
|
|
|
'insights' => array (
|
2019-02-08 13:46:43 +01:00
|
|
|
'defaults' => [
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
2019-02-05 10:58:18 +01:00
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
2019-02-08 13:46:43 +01:00
|
|
|
]
|
2018-09-10 15:04:15 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
// Message contact requests.
|
|
|
|
'messagecontactrequests' => [
|
|
|
|
'defaults' => [
|
2019-07-15 14:30:58 +08:00
|
|
|
// We don't need to notify in the popup output here because the message drawer
|
|
|
|
// already notifies users of contact requests.
|
2018-09-10 15:04:15 +08:00
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
2019-02-05 10:58:18 +01:00
|
|
|
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
2018-09-10 15:04:15 +08:00
|
|
|
]
|
|
|
|
],
|
2018-12-20 15:32:46 +11:00
|
|
|
|
|
|
|
// Asyncronhous backup/restore notifications.
|
|
|
|
'asyncbackupnotification' => array(
|
|
|
|
'defaults' => array(
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
)
|
|
|
|
),
|
2019-10-25 05:11:56 +11:00
|
|
|
|
|
|
|
'gradenotifications' => [
|
2019-11-11 10:25:01 +08:00
|
|
|
'defaults' => array(
|
|
|
|
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDOFF,
|
|
|
|
),
|
2019-10-25 05:11:56 +11:00
|
|
|
],
|
2020-03-15 20:09:48 +11:00
|
|
|
|
|
|
|
// Infected files.
|
2020-05-27 10:57:33 +10:00
|
|
|
'infected' => array(
|
|
|
|
'capability' => 'moodle/site:config',
|
2020-03-15 20:09:48 +11:00
|
|
|
),
|
2021-11-04 09:21:30 +00:00
|
|
|
|
|
|
|
// Report builder schedules.
|
|
|
|
'reportbuilderschedule' => [
|
|
|
|
'defaults' => [
|
|
|
|
'email' => MESSAGE_FORCED,
|
|
|
|
],
|
|
|
|
],
|
2008-07-31 08:01:46 +00:00
|
|
|
);
|