1 |
efrain |
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 |
* give moodle the data for the storage helper inside the loggedin event
|
|
|
19 |
*/
|
|
|
20 |
$observers = array(
|
|
|
21 |
array(
|
|
|
22 |
'eventname' => 'core\event\user_loggedin',
|
|
|
23 |
'callback' => 'training_redirector::init',
|
|
|
24 |
'includefile' => '/report/training/lib.php',
|
|
|
25 |
'internal' => true,
|
|
|
26 |
'priority' => 9999,
|
|
|
27 |
),
|
|
|
28 |
|
|
|
29 |
/*
|
|
|
30 |
core\event\user_loggedin - core user loggedin
|
|
|
31 |
core\event\user_loggedinas
|
|
|
32 |
*/
|
|
|
33 |
|
|
|
34 |
array(
|
|
|
35 |
//'eventname' => '\core\event\*',
|
|
|
36 |
'eventname' => 'core\event\course_module_viewed',
|
|
|
37 |
'callback' => 'training_redirector::store',
|
|
|
38 |
'includefile' => '/report/training/lib.php',
|
|
|
39 |
'internal' => true,
|
|
|
40 |
'priority' => 9000,
|
|
|
41 |
),
|
|
|
42 |
array(
|
|
|
43 |
'eventname' => 'core\event\course_module_deleted',
|
|
|
44 |
'callback' => 'training_redirector::remove',
|
|
|
45 |
'internal' => true,
|
|
|
46 |
'priority' => 9999,
|
|
|
47 |
),
|
|
|
48 |
array(
|
|
|
49 |
'eventname' => 'core\event\course_completed',
|
|
|
50 |
'callback' => 'training_redirector::completed',
|
|
|
51 |
'includefile' => '/report/training/lib.php',
|
|
|
52 |
'internal' => true,
|
|
|
53 |
'priority' => 200,
|
|
|
54 |
),
|
|
|
55 |
|
|
|
56 |
array(
|
|
|
57 |
'eventname' => 'mod_forum\event\post_created',
|
|
|
58 |
'callback' => 'training_redirector::store',
|
|
|
59 |
'includefile' => '/report/training/lib.php',
|
|
|
60 |
'internal' => true,
|
|
|
61 |
'priority' => 9999,
|
|
|
62 |
),
|
|
|
63 |
);
|