MDL-13766, fixed repository instance name and configplugin language string
[moodle.git] / lib / db / events.php
CommitLineData
117bd748 1<?php
ca4bcf58 2
3///////////////////////////////////////////////////////////////////////////
4// Defines core event handlers //
5///////////////////////////////////////////////////////////////////////////
6// //
7// NOTICE OF COPYRIGHT //
8// //
9// Moodle - Modular Object-Oriented Dynamic Learning Environment //
10// http://moodle.org //
11// //
12// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
13// //
14// This program is free software; you can redistribute it and/or modify //
15// it under the terms of the GNU General Public License as published by //
df997f84 16// the Free Software Foundation; either version 3 of the License, or //
ca4bcf58 17// (at your option) any later version. //
18// //
19// This program is distributed in the hope that it will be useful, //
20// but WITHOUT ANY WARRANTY; without even the implied warranty of //
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
22// GNU General Public License for more details: //
23// //
24// http://www.gnu.org/copyleft/gpl.html //
25// //
26///////////////////////////////////////////////////////////////////////////
27
28
2942a5cd 29
30/* List of handlers */
31
df997f84 32$handlers = array(
3b120e46 33
fc053de9 34/*
35 * portfolio queued event - for non interactive file transfers
df997f84
PS
36 * NOTE: this is a HACK, please do not add any more things like this here
37 * (it is just abusing cron to do very time consuming things which is wrong any way)
38 *
39 * TODO: this has to be moved into separate queueing framework....
40 */
fc053de9 41 'portfolio_send' => array (
42 'handlerfile' => '/lib/portfolio.php',
43 'handlerfunction' => 'portfolio_handle_event', // argument to call_user_func(), could be an array
44 'schedule' => 'cron'
45 ),
3b120e46 46
fc053de9 47
df997f84 48/* no more here please, core should not consume any events!!!!!!! */
3b120e46 49);
50
ca4bcf58 51
2942a5cd 52
53
54/* List of events thrown from Moodle core
55
56==== user related events ====
57
58user_created - object user table record
59user_updated - object user table record
60user_deleted - object user table record
61
62==== course related events ====
63
64course_category_updated - object course_categories table record
65course_category_created - object course_categories table record
66course_category_deleted - object course_categories table record
67
68course_created - object course table record
69course_updated - object course table record
906fb8f8 70course_content_removed - object course table record
2942a5cd 71course_deleted - object course table record
72
df997f84
PS
73user_enrolled - object record from user_enrolments table + courseid,enrol
74user_unenrol_modified - object record from user_enrolments table + courseid,enrol
75user_unenrolled - object record from user_enrolments table + courseid,enrol,lastenrol
76
77==== cohort related events ===
78
79
80cohort_added - object cohort table record
81cohort_updated - object cohort table record
82cohort_deleted - object cohort table record
83
84cohort_member_added - object cohortid, userid properties
85cohort_member_removed - object cohortid, userid properties
86
2942a5cd 87==== group related events ====
88
89groups_group_created - object groups_group table record
90groups_group_updated - object groups_group table record
91groups_group_deleted - object groups_group table record
92
93groups_member_added - object userid, groupid properties
94groups_member_removed - object userid, groupid properties
95
96groups_grouping_created - object groups_grouping table record
97groups_grouping_updated - object groups_grouping table record
98groups_grouping_deleted - object groups_grouping table record
99
ffc670d9 100groups_members_removed - object courseid+userid - removed all users (or one user) from all groups in course
2942a5cd 101groups_groupings_groups_removed - int course id - removed all groups from all groupings in course
102groups_groups_deleted - int course id - deleted all course groups
103groups_groupings_deleted - int course id - deleted all course groupings
104
906fb8f8 105==== role related events ====
96608a55 106
107role_assigned - object role_assignments table record
108role_unassigned - object role_assignments table record
109
9645a484 110==== activity module events ====
75ba5fe4 111
9645a484
MD
112mod_deleted - int courseid, int cmid, text modulename - happens when a module is deleted
113mod_created - int courseid, int cmid, text modulename - happens when a module is created
114mod_updated - int courseid, int cmid, text modulename - happens when a module is updated
75ba5fe4 115
2942a5cd 116*/