Commit | Line | Data |
---|---|---|
117bd748 | 1 | <?php |
5b4a78e2 PS |
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/>. | |
ca4bcf58 | 16 | |
5b4a78e2 | 17 | /** |
c4652889 | 18 | * Definition of core event observers. |
5b4a78e2 | 19 | * |
c4652889 | 20 | * The observers defined in this file are notified when respective events are triggered. All plugins |
39b90b51 EL |
21 | * support this. |
22 | * | |
23 | * For more information, take a look to the documentation available: | |
c4652889 | 24 | * - Events API: {@link http://docs.moodle.org/dev/Event_2} |
39b90b51 EL |
25 | * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API} |
26 | * | |
27 | * @package core | |
28 | * @category event | |
1d1719f5 | 29 | * @copyright 2007 onwards Martin Dougiamas http://dougiamas.com |
39b90b51 | 30 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
5b4a78e2 | 31 | */ |
ca4bcf58 | 32 | |
5b4a78e2 | 33 | defined('MOODLE_INTERNAL') || die(); |
2942a5cd | 34 | |
c4652889 | 35 | // List of legacy event handlers. |
2942a5cd | 36 | |
df997f84 | 37 | $handlers = array( |
c4652889 | 38 | // No more old events! |
3b120e46 | 39 | ); |
40 | ||
c4652889 AA |
41 | // List of events_2 observers. |
42 | ||
137d94f3 | 43 | $observers = array( |
ca4bcf58 | 44 | |
137d94f3 RT |
45 | array( |
46 | 'eventname' => '\core\event\course_module_completion_updated', | |
47 | 'callback' => 'core_badges_observer::course_module_criteria_review', | |
06f8ea7b RT |
48 | ), |
49 | array( | |
50 | 'eventname' => '\core\event\course_completed', | |
51 | 'callback' => 'core_badges_observer::course_criteria_review', | |
bb78e249 RT |
52 | ), |
53 | array( | |
54 | 'eventname' => '\core\event\user_updated', | |
55 | 'callback' => 'core_badges_observer::profile_criteria_review', | |
db48207e | 56 | ), |
c88b6c05 FM |
57 | |
58 | // Competencies. | |
59 | array( | |
60 | 'eventname' => '\core\event\course_completed', | |
61 | 'callback' => 'core_competency\api::observe_course_completed', | |
62 | ), | |
63 | array( | |
64 | 'eventname' => '\core\event\course_module_completion_updated', | |
65 | 'callback' => 'core_competency\api::observe_course_module_completion_updated', | |
66 | ), | |
137d94f3 | 67 | ); |
2942a5cd | 68 | |
c4652889 | 69 | // List of all events triggered by Moodle can be found using Events list report. |