Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1434 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
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.
8
//
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.
13
//
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/>.
16
 
17
/**
18
 * Add event handlers for the notification local plugin.
19
 *
20
 * @package     local_moofactory_notification
21
 * @copyright   2020 Patrick ROCHET <patrick.r@lmsfactory.com>
22
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 *
24
 */
25
 
26
defined('MOODLE_INTERNAL') || die();
27
 
28
$observers = [
29
    array(
30
        'eventname' => 'core\event\user_enrolment_created',
31
        'callback' => 'local_moofactory_notification_user_enrolment_created',
32
        'includefile'   => '/local/moofactory_notification/lib.php',
33
    ),
34
    array(
35
        'eventname' => '\local_moofactory_resetmod\event\user_enrolment_reactivated',
36
        'callback'  => 'local_moofactory_notification_user_enrolment_created',
37
        'includefile'   => '/local/moofactory_notification/lib.php',
38
    ),
39
    array(
40
        'eventname' => '\core\event\user_enrolment_updated',
41
        'callback'  => 'local_moofactory_notification_user_enrolment_updated',
42
        'includefile'   => '/local/moofactory_notification/lib.php',
43
    ),
44
    array(
45
        'eventname' => '\core\event\user_enrolment_deleted',
46
        'callback'  => 'local_moofactory_notification_user_enrolment_deleted',
47
        'includefile'   => '/local/moofactory_notification/lib.php',
48
    ),
49
    array(
50
        'eventname' => 'core\event\course_viewed',
51
        'callback' => 'local_moofactory_notification_course_viewed',
52
        'includefile'   => '/local/moofactory_notification/lib.php',
53
    ),
54
    array(
55
        'eventname' => 'core\event\course_updated',
56
        'callback' => 'local_moofactory_notification_course_updated',
57
        'includefile'   => '/local/moofactory_notification/lib.php',
58
    ),
59
    array(
60
        'eventname' => 'core\event\course_module_deleted',
61
        'callback' => 'local_moofactory_notification_module_deleted',
62
        'includefile'   => '/local/moofactory_notification/lib.php',
63
    ),
64
];