MDL-45052 events: Cleanup db/events.php

This commit is contained in:
Ankit Agarwal 2014-04-11 14:28:18 +08:00
parent e471fc6c9d
commit c4652889f1
2 changed files with 8 additions and 132 deletions

View File

@ -15,14 +15,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Definition of core event handler and description of all events throws from core.
* Definition of core event observers.
*
* The handlers defined on this file are processed and registered into
* the Moodle DB after any install or upgrade operation. All plugins
* The observers defined in this file are notified when respective events are triggered. All plugins
* support this.
*
* For more information, take a look to the documentation available:
* - Events API: {@link http://docs.moodle.org/dev/Events_API}
* - Events API: {@link http://docs.moodle.org/dev/Event_2}
* - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
*
* @package core
@ -33,12 +32,14 @@
defined('MOODLE_INTERNAL') || die();
/* List of legacy event handlers */
// List of legacy event handlers.
$handlers = array(
/* No more old events! */
// No more old events!
);
// List of events_2 observers.
$observers = array(
array(
@ -56,75 +57,4 @@ $observers = array(
);
/* List of events thrown from Moodle core
==== user related events ====
user_created - object user table record
user_updated - object user table record
user_deleted - object user table record
user_logout - full $USER object
==== course related events ====
course_category_updated - object course_categories table record
course_category_created - object course_categories table record
course_category_deleted - object course_categories table record
course_created - object course table record
course_updated - object course table record
course_content_removed - object course table record + context property
course_deleted - object course table record + context property
course_restored - custom object with courseid, userid and restore information
user_enrolled - object record from user_enrolments table + courseid,enrol
user_enrol_modified - object record from user_enrolments table + courseid,enrol
user_unenrolled - object record from user_enrolments table + courseid,enrol,lastenrol
==== cohort related events ===
cohort_added - object cohort table record
cohort_updated - object cohort table record
cohort_deleted - object cohort table record
cohort_member_added - object cohortid, userid properties
cohort_member_removed - object cohortid, userid properties
==== group related events ====
groups_group_created - object groups_group table record
groups_group_updated - object groups_group table record
groups_group_deleted - object groups_group table record
groups_member_added - object userid, groupid properties
groups_member_removed - object userid, groupid properties
groups_grouping_created - object groups_grouping table record
groups_grouping_updated - object groups_grouping table record
groups_grouping_deleted - object groups_grouping table record
groups_members_removed - object courseid+userid - removed all users (or one user) from all groups in course
groups_groupings_groups_removed - int course id - removed all groups from all groupings in course
groups_groups_deleted - int course id - deleted all course groups
groups_groupings_deleted - int course id - deleted all course groupings
==== role related events ====
role_assigned - object role_assignments table record
role_unassigned - object role_assignments table record
==== activity module events ====
mod_deleted - int courseid, int cmid, text modulename - happens when a module is deleted
mod_created - int courseid, int cmid, text modulename - happens when a module is created
mod_updated - int courseid, int cmid, text modulename - happens when a module is updated
=== blog events
blog_entry_added - blog post object
blog_entry_edited - blog post object
blog_entry_deleteded - blog post object
*/
// List of all events triggered by Moodle can be found using Events list report.

View File

@ -1,54 +0,0 @@
<?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/>.
/**
* List of events generated by the assignment module
*
* @package mod_assign
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$handlers = array();
/* List of events generated by the assign module, with the fields on the event object.
assessable_content_uploaded
->modulename = 'assign';
->cmid = // The cmid of the assign.
->itemid = // The submission id of the user submission.
->courseid = // The course id of the course the assign belongs to.
->userid = // The user id that the attempt belongs to.
->content = // The text content entered by the user (empty if no content submitted).
->pathnamehashes = // An array of pathnamehashes of the files submitted by the user (var not passed if not set).
assessable_file_uploaded
->modulename = 'assign';
->cmid = // The cmid of the assign.
->itemid = // The submission id of the user submission.
->courseid = // The course id of the course the assign belongs to.
->userid = // The user id that the attempt belongs to.
->pathnamehashes = // An array of pathnamehashes of the files submitted by the user (var not passed if not set).
assessable_submitted
->modulename = 'assign';
->cmid = // The cmid of the assign.
->itemid = // The submission id of the user submission.
->courseid = // The course id of the course the assign belongs to.
->userid = // The user id that the attempt belongs to.
->params = // Array of module specific parameters.
-> submission_editable = // Whether user can edit submission before assessment has been done.
*/