Talk:Events API

Jump to: navigation, search
  • Gah! Already updated the "Events which exist" list a few weeks ago, but my changes appear to have been lost (and don't appear in the history). Was the page reset during the MoodleDocs maintenance?
  • Any how .. here's complete list of events (with raw-ish params used in code) triggered by v2.0.2, according to a code search for "trigger_event":
    • assessable_file_uploaded - $eventdata
    • assessable_files_done - $eventdata
    • cohort_added - $cohort
    • cohort_deleted - $cohort
    • cohort_member_added - {$cohortid, $userid}
    • cohort_member_removed - {$cohortid, $userid}
    • cohort_updated - $cohort
    • course_category_deleted - $category
    • course_content_removed - $course
    • course_created - $course
    • course_deleted - $course
    • course_updated - $course
    • groups_group_created - $group
    • groups_group_deleted - $group
    • groups_group_updated - $group
    • groups_grouping_created - $data
    • groups_grouping_deleted - $grouping
    • groups_grouping_updated - $data
    • groups_groupings_deleted - $courseid
    • groups_groupings_groups_removed - $courseid
    • groups_groups_deleted - $courseid
    • groups_member_added - $eventdata
    • groups_member_removed - $eventdata
    • groups_members_removed - $eventdata
    • mod_created - $eventdata
    • mod_deleted - $eventdata
    • mod_updated - $eventdata
    • portfolio_send - $this->id
    • quiz_attempt_processed - $eventdata
    • quiz_attempt_started - $eventdata
    • role_assigned - $ra
    • role_unassigned - $ra
    • user_created - $user
    • user_deleted - $user
    • user_enrolled - $ue
    • user_logout - $params
    • user_unenrol_modified - $ue
    • user_unenrolled - $ue
    • user_updated - $user

--B Johnson 08:19, 7 June 2011 (WST)


Anonymous suggestion by rachael harkin moved from the main page:

Hook for overriding the views of moodle pages. event that would look something like event_hook(moodle_event,my_new_page,parameters) so it would be something like: event_hook(view_page,my_new_page,param1)

This suggestion shows no awareness of how Moodle works. See Themes_2.0_overriding_a_renderer for what you can do in Moodle.--Tim Hunt 03:54, 20 October 2011 (WST)


message_send no longer used

As of https://github.com/moodle/moodle/commit/7c7d3afab5767fa0e9a3bded9ff9294ea92b0c13#lib/messagelib.php the "message_send" event isn't used by the messaging API any more. The events page discusses this extensively, so it should be updated. I've added it to my to-do list.

I've just done that - updated to use 'user_enrolled'. :-) Aparup Banerjee 10:51, 24 July 2012 (WST)