Skip to content
Snippets Groups Projects
Commit aecc39b6 authored by Elke Kreim's avatar Elke Kreim
Browse files

Add message provider

parent d4aa1243
No related branches found
No related tags found
No related merge requests found
<?php
// 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/>.
/**
* Defines message providers (types of messages being sent)
*
* 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 local_hshs
* @category message
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$messageproviders = array (
// Course request approval notification
'courserequestapproved_hsh' => array (
'capability' => 'local/hsh:request',
'defaults' => array(
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
),
// Course request rejection notification
'courserequestrejected_hsh' => array (
'capability' => 'local/hsh:request',
'defaults' => array(
'airnotifier' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
),
),
);
...@@ -392,7 +392,7 @@ class course_request_hsh ...@@ -392,7 +392,7 @@ class course_request_hsh
$this->notify( $this->notify(
$user, $user,
$USER, $USER,
'courserequestapproved', 'courserequestapproved_hsh',
get_string('courseapprovedsubject', 'local_hsh', $a), get_string('courseapprovedsubject', 'local_hsh', $a),
$messageplain, $messageplain,
$course->id $course->id
...@@ -416,7 +416,7 @@ class course_request_hsh ...@@ -416,7 +416,7 @@ class course_request_hsh
$this->notify( $this->notify(
$user, $user,
$USER, $USER,
'courserequestrejected', 'courserequestrejected_hsh',
get_string('courserejectsubject', 'local_hsh'), get_string('courserejectsubject', 'local_hsh'),
get_string('courserejectemail', 'local_hsh', $notice) get_string('courserejectemail', 'local_hsh', $notice)
); );
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->component = 'local_hsh'; $plugin->component = 'local_hsh';
$plugin->version = 2023012002; $plugin->version = 2023012003;
$plugin->release = '4.0.0 (Build: 2015042300)'; $plugin->release = '4.0.0 (Build: 2015042300)';
$plugin->requires = 2019111800; $plugin->requires = 2019111800;
$plugin->maturity = MATURITY_ALPHA; $plugin->maturity = MATURITY_ALPHA;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment