Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\event\base Class Reference
Inheritance diagram for core\event\base:
booktool_exportimscp\event\book_exported booktool_print\event\book_printed booktool_print\event\chapter_printed core\event\antivirus_scan_data_error core\event\antivirus_scan_file_error core\event\assessable_submitted core\event\assessable_uploaded core\event\badge_awarded core\event\badge_criteria_created core\event\badge_criteria_deleted core\event\badge_criteria_updated core\event\badge_deleted core\event\badge_listing_viewed core\event\badge_revoked core\event\blog_association_deleted core\event\blog_entries_viewed core\event\blog_external_removed core\event\blog_external_viewed core\event\calendar_subscription_created core\event\calendar_subscription_deleted core\event\calendar_subscription_updated core\event\capability_assigned core\event\capability_unassigned core\event\cohort_created core\event\cohort_deleted core\event\cohort_updated core\event\comments_viewed core\event\competency_created core\event\competency_deleted core\event\competency_framework_created core\event\competency_framework_deleted core\event\competency_framework_updated core\event\competency_framework_viewed core\event\competency_plan_approved core\event\competency_plan_completed core\event\competency_plan_created core\event\competency_plan_deleted core\event\competency_plan_reopened core\event\competency_plan_review_request_cancelled core\event\competency_plan_review_requested core\event\competency_plan_review_started core\event\competency_plan_review_stopped core\event\competency_plan_unapproved core\event\competency_plan_unlinked core\event\competency_plan_updated core\event\competency_plan_viewed core\event\competency_template_created core\event\competency_template_deleted core\event\competency_template_updated core\event\competency_template_viewed core\event\competency_updated core\event\competency_user_competency_plan_viewed core\event\competency_user_competency_rated core\event\competency_user_competency_rated_in_course core\event\competency_user_competency_rated_in_plan core\event\competency_user_competency_viewed_in_course core\event\competency_user_competency_viewed_in_plan core\event\competency_user_evidence_created core\event\competency_user_evidence_deleted core\event\competency_user_evidence_updated core\event\competency_viewed core\event\config_log_created core\event\contentbank_content_created core\event\contentbank_content_deleted core\event\contentbank_content_updated core\event\contentbank_content_uploaded core\event\contentbank_content_viewed core\event\context_locked core\event\context_unlocked core\event\course_backup_created core\event\course_category_created core\event\course_category_updated core\event\course_category_viewed core\event\course_completed core\event\course_completion_updated core\event\course_information_viewed core\event\course_module_deleted core\event\course_module_instance_list_viewed core\event\course_module_viewed core\event\course_resources_list_viewed core\event\course_section_deleted core\event\course_updated core\event\course_user_report_viewed core\event\course_viewed core\event\dashboard_reset core\event\dashboard_viewed core\event\dashboards_reset core\event\database_text_field_content_replaced core\event\grade_exported core\event\grade_letter_created core\event\grade_letter_deleted core\event\grade_letter_updated core\event\grade_report_viewed core\event\group_created core\event\group_deleted core\event\group_message_sent core\event\group_updated core\event\grouping_created core\event\grouping_deleted core\event\grouping_group_assigned core\event\grouping_group_unassigned core\event\grouping_updated core\event\insights_viewed core\event\message_deleted core\event\message_sent core\event\message_viewed core\event\moodlenet_resource_exported core\event\mycourses_viewed core\event\notes_viewed core\event\notification_sent core\event\qbank_plugin_base core\event\question_base core\event\question_category_base core\event\recent_activity_viewed core\event\role_allow_assign_updated core\event\role_allow_override_updated core\event\role_allow_switch_updated core\event\role_allow_view_updated core\event\role_capabilities_updated core\event\scale_created core\event\scale_deleted core\event\scale_updated core\event\search_indexed core\event\search_results_viewed core\event\section_viewed core\event\tag_collection_created core\event\tag_collection_deleted core\event\tag_collection_updated core\event\tag_created core\event\tag_deleted core\event\tag_flagged core\event\tag_unflagged core\event\tag_updated core\event\unknown_logged core\event\url_blocked core\event\user_deleted core\event\user_enrolment_created core\event\user_enrolment_updated core\event\user_graded core\event\user_list_viewed core\event\user_loggedout core\event\user_login_failed core\event\user_password_policy_failed core\event\user_password_updated core\event\userfeedback_give core\event\userfeedback_remind core\event\virus_infected_data_detected core\event\virus_infected_file_detected core\event\webservice_service_created core\event\webservice_service_deleted core\event\webservice_service_updated core\event\webservice_token_created core\event\webservice_token_sent core_customfield\event\category_created core_customfield\event\category_deleted core_customfield\event\category_updated core_customfield\event\field_created core_customfield\event\field_deleted core_customfield\event\field_updated core_payment\event\account_created core_payment\event\account_deleted core_payment\event\account_updated core_reportbuilder\event\audience_created core_reportbuilder\event\audience_deleted core_reportbuilder\event\audience_updated core_reportbuilder\event\schedule_created core_reportbuilder\event\schedule_deleted core_reportbuilder\event\schedule_updated factor_email\event\unauth_email factor_sms\event\sms_sent factor_token\event\token_created mod_assign\event\base mod_assign\event\group_override_created mod_assign\event\group_override_deleted mod_assign\event\group_override_updated mod_assign\event\user_override_created mod_assign\event\user_override_deleted mod_assign\event\user_override_updated mod_bigbluebuttonbn\event\base mod_book\event\chapter_created mod_book\event\chapter_deleted mod_book\event\chapter_updated mod_book\event\chapter_viewed mod_chat\event\sessions_viewed mod_choice\event\answer_created mod_choice\event\answer_deleted mod_choice\event\report_viewed mod_data\event\field_created mod_data\event\field_deleted mod_data\event\field_updated mod_feedback\event\response_deleted mod_feedback\event\response_submitted mod_folder\event\all_files_downloaded mod_folder\event\folder_updated mod_forum\event\discussion_lock_updated mod_forum\event\discussion_moved mod_forum\event\discussion_pinned mod_forum\event\discussion_unpinned mod_forum\event\discussion_viewed mod_forum\event\readtracking_disabled mod_forum\event\readtracking_enabled mod_forum\event\subscription_created mod_forum\event\subscription_deleted mod_forum\event\subscription_mode_updated mod_forum\event\user_report_viewed mod_glossary\event\category_created mod_glossary\event\category_deleted mod_glossary\event\category_updated mod_glossary\event\entry_approved mod_glossary\event\entry_created mod_glossary\event\entry_deleted mod_glossary\event\entry_disapproved mod_glossary\event\entry_updated mod_glossary\event\entry_viewed mod_h5pactivity\event\statement_received mod_lesson\event\content_page_viewed mod_lesson\event\group_override_created mod_lesson\event\group_override_deleted mod_lesson\event\group_override_updated mod_lesson\event\highscore_added mod_lesson\event\highscores_viewed mod_lesson\event\lesson_ended mod_lesson\event\lesson_restarted mod_lesson\event\lesson_resumed mod_lesson\event\lesson_started mod_lesson\event\user_override_created mod_lesson\event\user_override_deleted mod_lesson\event\user_override_updated mod_lti\event\unknown_service_api_called mod_quiz\event\attempt_abandoned mod_quiz\event\attempt_becameoverdue mod_quiz\event\attempt_deleted mod_quiz\event\attempt_manual_grading_completed mod_quiz\event\attempt_preview_started mod_quiz\event\attempt_reopened mod_quiz\event\attempt_reviewed mod_quiz\event\attempt_submitted mod_quiz\event\attempt_summary_viewed mod_quiz\event\group_override_created mod_quiz\event\group_override_deleted mod_quiz\event\group_override_updated mod_quiz\event\page_break_created mod_quiz\event\page_break_deleted mod_quiz\event\quiz_grade_item_created mod_quiz\event\quiz_grade_item_deleted mod_quiz\event\quiz_grade_item_updated mod_quiz\event\quiz_grade_updated mod_quiz\event\report_viewed mod_quiz\event\section_break_created mod_quiz\event\section_title_updated mod_quiz\event\slot_deleted mod_quiz\event\slot_displaynumber_updated mod_quiz\event\slot_moved mod_quiz\event\slot_requireprevious_updated mod_quiz\event\user_override_created mod_quiz\event\user_override_deleted mod_quiz\event\user_override_updated mod_scorm\event\cmielement_submitted mod_scorm\event\report_viewed mod_scorm\event\tracks_viewed mod_survey\event\report_viewed mod_wiki\event\page_created mod_wiki\event\page_deleted mod_wiki\event\page_diff_viewed mod_wiki\event\page_history_viewed mod_wiki\event\page_locks_deleted mod_wiki\event\page_updated mod_wiki\event\page_version_restored mod_wiki\event\page_version_viewed mod_wiki\event\page_viewed mod_workshop\event\assessment_evaluated mod_workshop\event\assessment_reevaluated mod_workshop\event\phase_automatically_switched mod_workshop\event\submission_assessed mod_workshop\event\submission_created mod_workshop\event\submission_deleted mod_workshop\event\submission_reassessed mod_workshop\event\submission_updated phpunit_event_mock quizaccess_seb\event\access_prevented quizaccess_seb\event\template_created quizaccess_seb\event\template_deleted quizaccess_seb\event\template_disabled quizaccess_seb\event\template_enabled quizaccess_seb\event\template_updated report_completion\event\report_viewed report_log\event\report_viewed report_log\event\user_report_viewed report_loglive\event\report_viewed report_outline\event\activity_report_viewed report_outline\event\report_viewed report_security\event\report_viewed report_stats\event\report_viewed tool_admin_presets\event\preset_deleted tool_admin_presets\event\preset_downloaded tool_admin_presets\event\preset_exported tool_admin_presets\event\preset_imported tool_admin_presets\event\preset_loaded tool_admin_presets\event\preset_previewed tool_admin_presets\event\preset_reverted tool_admin_presets\event\presets_listed tool_brickfield\event\analysis_requested tool_brickfield\event\report_downloaded tool_brickfield\event\report_viewed tool_capability\event\report_viewed tool_langimport\event\langpack_updated tool_mfa\event\user_deleted_factor tool_mfa\event\user_failed_mfa tool_mfa\event\user_passed_mfa tool_mfa\event\user_revoked_factor tool_mfa\event\user_setup_factor tool_monitor\event\rule_created tool_monitor\event\rule_deleted tool_monitor\event\rule_updated tool_monitor\event\subscription_created tool_monitor\event\subscription_deleted tool_recyclebin\event\category_bin_item_created tool_recyclebin\event\category_bin_item_deleted tool_recyclebin\event\category_bin_item_restored tool_recyclebin\event\course_bin_item_created tool_recyclebin\event\course_bin_item_deleted tool_recyclebin\event\course_bin_item_restored

Public Member Functions

 __get ($name)
 Magic getter for read only access.
 
 __isset ($name)
 Is data property set?
 
 __set ($name, $value)
 Magic setter.
 
 add_record_snapshot ($tablename, $record)
 Add cached data that will be most probably used in event observers.
 
 can_view ($user_or_id=null)
 This method was originally intended for granular access control on the event level, unfortunately the proper implementation would be too expensive in many cases.
 
 get_context ()
 Returns event context.
 
 get_data ()
 Return standardised event data as array.
 
 get_description ()
 Returns non-localised event description with id's for admin use only.
 
 get_logextra ()
 Return auxiliary data that was stored in logs.
 
 get_record_snapshot ($tablename, $id)
 Returns cached record or fetches data from database if not cached.
 
 get_url ()
 Returns relevant URL, override in subclasses.
 
 getIterator ()
 Create an iterator because magic vars can't be seen by 'foreach'.
 
 is_dispatched ()
 Used from event manager to prevent direct access.
 
 is_restored ()
 Was this event restored?
 
 is_triggered ()
 Was this event already triggered?
 
 trigger ()
 Trigger event.
 

Static Public Member Functions

static create (array $data=null)
 Create new event.
 
static get_explanation ()
 Get an explanation of what the class does.
 
static get_name ()
 Returns localised general event name.
 
static get_name_with_info ()
 Returns the event name complete with metadata information.
 
static get_objectid_mapping ()
 This is used when restoring course logs where it is required that we map the objectid to it's new value in the new course.
 
static get_other_mapping ()
 This is used when restoring course logs where it is required that we map the information in 'other' to it's new value in the new course.
 
static get_static_info ()
 Get static information about an event.
 
static is_deprecated ()
 Whether this event has been marked as deprecated.
 
static restore (array $data, array $logextra)
 Restore event from existing historic data.
 
static restore_legacy ($legacy)
 Create fake event from legacy log data.
 

Public Attributes

const LEVEL_OTHER = 0
 Other level.
 
const LEVEL_PARTICIPATING = 2
 Participating level.
 
const LEVEL_TEACHING = 1
 Teaching level.
 
const NOT_FOUND = -31338
 The value used when an id can not be found during a restore.
 
const NOT_MAPPED = -31337
 The value used when an id can not be mapped during a restore.
 
const USER_NOTLOGGEDIN = 0
 User id to use when the user is not logged in.
 
const USER_OTHER = -1
 User id to use when actor is not an actual user but system, cli or cron.
 

Protected Member Functions

 init ()
 Override in subclass.
 
 validate_before_trigger ()
 Validate all properties right before triggering the event.
 
 validate_data ()
 Let developers validate their custom data (such as $this->data['other'], contextlevel, etc.).
 

Static Protected Member Functions

static restore_unknown (array $data, array $logextra)
 Restore unknown event.
 

Protected Attributes

context $context
 of this event
 
array $data
 event data
 
array $logextra
 the format is standardised by logging API
 

Member Function Documentation

◆ __get()

core\event\base::__get ( $name)

Magic getter for read only access.

Parameters
string$name
Return values
mixed

◆ __isset()

core\event\base::__isset ( $name)

Is data property set?

Parameters
string$name
Return values
bool

◆ __set()

core\event\base::__set ( $name,
$value )

Magic setter.

Note: we must not allow modification of data from outside, after trigger() the data MUST NOT CHANGE!!!

Parameters
string$name
mixed$value
Exceptions
coding_exception

◆ add_record_snapshot()

core\event\base::add_record_snapshot ( $tablename,
$record )
final

Add cached data that will be most probably used in event observers.

This is used to improve performance, but it is required for data that was just deleted.

Parameters
string$tablename
stdClass$record
Exceptions
coding_exceptionif used after trigger()

◆ can_view()

core\event\base::can_view ( $user_or_id = null)

This method was originally intended for granular access control on the event level, unfortunately the proper implementation would be too expensive in many cases.

Deprecated
since 2.7
Parameters
int | stdClass$user_or_idID of the user.
Return values
boolTrue if the user can view the event, false otherwise.

Reimplemented in mod_feedback\event\response_deleted, and mod_feedback\event\response_submitted.

◆ create()

static core\event\base::create ( array $data = null)
staticfinal

Create new event.

The optional data keys as: 1/ objectid - the id of the object specified in class name 2/ context - the context of this event 3/ other - the other data describing the event, can not contain objects 4/ relateduserid - the id of user which is somehow related to this event

Parameters
array$data
Return values
core\event\basereturns instance of new event
Exceptions
coding_exception

◆ get_context()

core\event\base::get_context ( )

Returns event context.

Return values
context

◆ get_data()

core\event\base::get_data ( )

Return standardised event data as array.

Return values
arrayAll elements are scalars except the 'other' field which is array.

◆ get_description()

core\event\base::get_description ( )

Returns non-localised event description with id's for admin use only.

Return values
string

Reimplemented in assignsubmission_file\event\assessable_uploaded, assignsubmission_onlinetext\event\assessable_uploaded, booktool_exportimscp\event\book_exported, booktool_print\event\book_printed, booktool_print\event\chapter_printed, core\event\antivirus_scan_data_error, core\event\antivirus_scan_file_error, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_listing_viewed, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_entries_viewed, core\event\blog_external_removed, core\event\blog_external_viewed, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\capability_assigned, core\event\capability_unassigned, core\event\cohort_created, core\event\cohort_deleted, core\event\cohort_updated, core\event\comments_viewed, core\event\competency_created, core\event\competency_deleted, core\event\competency_framework_created, core\event\competency_framework_deleted, core\event\competency_framework_updated, core\event\competency_framework_viewed, core\event\competency_plan_approved, core\event\competency_plan_completed, core\event\competency_plan_created, core\event\competency_plan_deleted, core\event\competency_plan_reopened, core\event\competency_plan_review_request_cancelled, core\event\competency_plan_review_requested, core\event\competency_plan_review_started, core\event\competency_plan_review_stopped, core\event\competency_plan_unapproved, core\event\competency_plan_unlinked, core\event\competency_plan_updated, core\event\competency_plan_viewed, core\event\competency_template_created, core\event\competency_template_deleted, core\event\competency_template_updated, core\event\competency_template_viewed, core\event\competency_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\competency_user_evidence_created, core\event\competency_user_evidence_deleted, core\event\competency_user_evidence_updated, core\event\competency_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\context_locked, core\event\context_unlocked, core\event\course_backup_created, core\event\course_category_created, core\event\course_category_updated, core\event\course_category_viewed, core\event\course_completed, core\event\course_completion_updated, core\event\course_information_viewed, core\event\course_module_deleted, core\event\course_module_instance_list_viewed, core\event\course_module_viewed, core\event\course_resources_list_viewed, core\event\course_section_deleted, core\event\course_updated, core\event\course_user_report_viewed, core\event\course_viewed, core\event\dashboard_reset, core\event\dashboard_viewed, core\event\dashboards_reset, core\event\database_text_field_content_replaced, core\event\grade_exported, core\event\grade_letter_created, core\event\grade_letter_deleted, core\event\grade_letter_updated, core\event\grade_report_viewed, core\event\group_created, core\event\group_deleted, core\event\group_message_sent, core\event\group_updated, core\event\grouping_created, core\event\grouping_deleted, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\grouping_updated, core\event\insights_viewed, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\moodlenet_resource_exported, core\event\mycourses_viewed, core\event\notes_viewed, core\event\notification_sent, core\event\qbank_plugin_disabled, core\event\qbank_plugin_enabled, core\event\question_category_created, core\event\question_category_deleted, core\event\question_category_moved, core\event\question_category_updated, core\event\question_category_viewed, core\event\question_created, core\event\question_deleted, core\event\question_moved, core\event\question_updated, core\event\question_viewed, core\event\questions_exported, core\event\questions_imported, core\event\recent_activity_viewed, core\event\role_allow_assign_updated, core\event\role_allow_override_updated, core\event\role_allow_switch_updated, core\event\role_allow_view_updated, core\event\role_capabilities_updated, core\event\scale_created, core\event\scale_deleted, core\event\scale_updated, core\event\search_indexed, core\event\search_results_viewed, core\event\section_viewed, core\event\tag_collection_created, core\event\tag_collection_deleted, core\event\tag_collection_updated, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\unknown_logged, core\event\url_blocked, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\user_login_failed, core\event\user_password_policy_failed, core\event\user_password_updated, core\event\userfeedback_give, core\event\userfeedback_remind, core\event\virus_infected_data_detected, core\event\virus_infected_file_detected, core\event\webservice_service_created, core\event\webservice_service_deleted, core\event\webservice_service_updated, core\event\webservice_token_created, core\event\webservice_token_sent, core_customfield\event\category_created, core_customfield\event\category_deleted, core_customfield\event\category_updated, core_customfield\event\field_created, core_customfield\event\field_deleted, core_customfield\event\field_updated, core_payment\event\account_created, core_payment\event\account_deleted, core_payment\event\account_updated, core_reportbuilder\event\audience_created, core_reportbuilder\event\audience_deleted, core_reportbuilder\event\audience_updated, core_reportbuilder\event\schedule_created, core_reportbuilder\event\schedule_deleted, core_reportbuilder\event\schedule_updated, factor_email\event\unauth_email, factor_sms\event\sms_sent, factor_token\event\token_created, mod_assign\event\all_submissions_downloaded, mod_assign\event\feedback_viewed, mod_assign\event\grading_form_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\identities_revealed, mod_assign\event\marker_updated, mod_assign\event\remove_submission_form_viewed, mod_assign\event\statement_accepted, mod_assign\event\submission_duplicated, mod_assign\event\submission_form_viewed, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_bigbluebuttonbn\event\base, mod_book\event\chapter_created, mod_book\event\chapter_deleted, mod_book\event\chapter_updated, mod_book\event\chapter_viewed, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\report_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_folder\event\all_files_downloaded, mod_folder\event\folder_updated, mod_forum\event\assessable_uploaded, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_forum\event\user_report_viewed, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_h5pactivity\event\statement_received, mod_lesson\event\content_page_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\lesson_ended, mod_lesson\event\lesson_restarted, mod_lesson\event\lesson_resumed, mod_lesson\event\lesson_started, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_lti\event\unknown_service_api_called, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_scorm\event\cmielement_submitted, mod_scorm\event\report_viewed, mod_scorm\event\tracks_viewed, mod_survey\event\report_viewed, mod_wiki\event\comments_viewed, mod_wiki\event\page_created, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_history_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessable_uploaded, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\access_prevented, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, report_completion\event\report_viewed, report_log\event\report_viewed, report_log\event\user_report_viewed, report_loglive\event\report_viewed, report_outline\event\activity_report_viewed, report_outline\event\report_viewed, report_security\event\report_viewed, report_stats\event\report_viewed, tool_admin_presets\event\preset_deleted, tool_admin_presets\event\preset_downloaded, tool_admin_presets\event\preset_exported, tool_admin_presets\event\preset_imported, tool_admin_presets\event\preset_loaded, tool_admin_presets\event\preset_previewed, tool_admin_presets\event\preset_reverted, tool_admin_presets\event\presets_listed, tool_brickfield\event\analysis_requested, tool_brickfield\event\report_downloaded, tool_brickfield\event\report_viewed, tool_capability\event\report_viewed, tool_langimport\event\langpack_updated, tool_mfa\event\user_deleted_factor, tool_mfa\event\user_failed_mfa, tool_mfa\event\user_passed_mfa, tool_mfa\event\user_revoked_factor, tool_mfa\event\user_setup_factor, tool_monitor\event\rule_created, tool_monitor\event\rule_deleted, tool_monitor\event\rule_updated, tool_monitor\event\subscription_created, tool_monitor\event\subscription_deleted, tool_recyclebin\event\category_bin_item_created, tool_recyclebin\event\category_bin_item_deleted, tool_recyclebin\event\category_bin_item_restored, tool_recyclebin\event\course_bin_item_created, tool_recyclebin\event\course_bin_item_deleted, and tool_recyclebin\event\course_bin_item_restored.

◆ get_explanation()

static core\event\base::get_explanation ( )
static

Get an explanation of what the class does.

By default returns the phpdocs from the child event class. Ideally this should be overridden to return a translatable get_string style markdown. e.g. return new lang_string('eventyourspecialevent', 'plugin_type');

Return values
stringAn explanation of the event formatted in markdown style.

◆ get_logextra()

core\event\base::get_logextra ( )

Return auxiliary data that was stored in logs.

List of standard properties:

  • origin: IP number, cli,cron
  • realuserid: id of the user when logged-in-as
Return values
arraythe format is standardised by logging API

◆ get_name()

static core\event\base::get_name ( )
static

Returns localised general event name.

Override in subclass, we can not make it static and abstract at the same time.

Return values
string

Reimplemented in assignsubmission_file\event\assessable_uploaded, assignsubmission_onlinetext\event\assessable_uploaded, booktool_exportimscp\event\book_exported, booktool_print\event\book_printed, booktool_print\event\chapter_printed, core\event\antivirus_scan_data_error, core\event\antivirus_scan_file_error, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_listing_viewed, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_entries_viewed, core\event\blog_external_removed, core\event\blog_external_viewed, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\capability_assigned, core\event\capability_unassigned, core\event\cohort_created, core\event\cohort_deleted, core\event\cohort_updated, core\event\comments_viewed, core\event\competency_created, core\event\competency_deleted, core\event\competency_framework_created, core\event\competency_framework_deleted, core\event\competency_framework_updated, core\event\competency_framework_viewed, core\event\competency_plan_approved, core\event\competency_plan_completed, core\event\competency_plan_created, core\event\competency_plan_deleted, core\event\competency_plan_reopened, core\event\competency_plan_review_request_cancelled, core\event\competency_plan_review_requested, core\event\competency_plan_review_started, core\event\competency_plan_review_stopped, core\event\competency_plan_unapproved, core\event\competency_plan_unlinked, core\event\competency_plan_updated, core\event\competency_plan_viewed, core\event\competency_template_created, core\event\competency_template_deleted, core\event\competency_template_updated, core\event\competency_template_viewed, core\event\competency_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\competency_user_evidence_created, core\event\competency_user_evidence_deleted, core\event\competency_user_evidence_updated, core\event\competency_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\context_locked, core\event\context_unlocked, core\event\course_backup_created, core\event\course_category_created, core\event\course_category_updated, core\event\course_category_viewed, core\event\course_completed, core\event\course_completion_updated, core\event\course_information_viewed, core\event\course_module_deleted, core\event\course_module_instance_list_viewed, core\event\course_module_viewed, core\event\course_resources_list_viewed, core\event\course_section_deleted, core\event\course_updated, core\event\course_user_report_viewed, core\event\course_viewed, core\event\dashboard_reset, core\event\dashboard_viewed, core\event\dashboards_reset, core\event\database_text_field_content_replaced, core\event\grade_exported, core\event\grade_letter_created, core\event\grade_letter_deleted, core\event\grade_letter_updated, core\event\grade_report_viewed, core\event\group_created, core\event\group_deleted, core\event\group_message_sent, core\event\group_updated, core\event\grouping_created, core\event\grouping_deleted, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\grouping_updated, core\event\insights_viewed, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\moodlenet_resource_exported, core\event\mycourses_viewed, core\event\notes_viewed, core\event\notification_sent, core\event\qbank_plugin_disabled, core\event\qbank_plugin_enabled, core\event\question_category_created, core\event\question_category_deleted, core\event\question_category_moved, core\event\question_category_updated, core\event\question_category_viewed, core\event\question_created, core\event\question_deleted, core\event\question_moved, core\event\question_updated, core\event\question_viewed, core\event\questions_exported, core\event\questions_imported, core\event\recent_activity_viewed, core\event\role_allow_assign_updated, core\event\role_allow_override_updated, core\event\role_allow_switch_updated, core\event\role_allow_view_updated, core\event\role_capabilities_updated, core\event\scale_created, core\event\scale_deleted, core\event\scale_updated, core\event\search_indexed, core\event\search_results_viewed, core\event\section_viewed, core\event\tag_collection_created, core\event\tag_collection_deleted, core\event\tag_collection_updated, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\unknown_logged, core\event\url_blocked, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\user_login_failed, core\event\user_password_policy_failed, core\event\user_password_updated, core\event\userfeedback_give, core\event\userfeedback_remind, core\event\virus_infected_data_detected, core\event\virus_infected_file_detected, core\event\webservice_service_created, core\event\webservice_service_deleted, core\event\webservice_service_updated, core\event\webservice_token_created, core\event\webservice_token_sent, core_customfield\event\category_created, core_customfield\event\category_deleted, core_customfield\event\category_updated, core_customfield\event\field_created, core_customfield\event\field_deleted, core_customfield\event\field_updated, core_payment\event\account_created, core_payment\event\account_deleted, core_payment\event\account_updated, core_reportbuilder\event\audience_created, core_reportbuilder\event\audience_deleted, core_reportbuilder\event\audience_updated, core_reportbuilder\event\schedule_created, core_reportbuilder\event\schedule_deleted, core_reportbuilder\event\schedule_updated, factor_email\event\unauth_email, factor_sms\event\sms_sent, factor_token\event\token_created, gradereport_grader\event\grade_report_viewed, gradereport_history\event\grade_report_viewed, gradereport_outcomes\event\grade_report_viewed, mod_assign\event\all_submissions_downloaded, mod_assign\event\feedback_viewed, mod_assign\event\grading_form_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\identities_revealed, mod_assign\event\marker_updated, mod_assign\event\remove_submission_form_viewed, mod_assign\event\statement_accepted, mod_assign\event\submission_duplicated, mod_assign\event\submission_form_viewed, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_bigbluebuttonbn\event\activity_management_viewed, mod_bigbluebuttonbn\event\live_session_event, mod_bigbluebuttonbn\event\meeting_created, mod_bigbluebuttonbn\event\meeting_ended, mod_bigbluebuttonbn\event\meeting_joined, mod_bigbluebuttonbn\event\meeting_left, mod_bigbluebuttonbn\event\recording_deleted, mod_bigbluebuttonbn\event\recording_edited, mod_bigbluebuttonbn\event\recording_imported, mod_bigbluebuttonbn\event\recording_protected, mod_bigbluebuttonbn\event\recording_published, mod_bigbluebuttonbn\event\recording_unprotected, mod_bigbluebuttonbn\event\recording_unpublished, mod_bigbluebuttonbn\event\recording_viewed, mod_book\event\chapter_created, mod_book\event\chapter_deleted, mod_book\event\chapter_updated, mod_book\event\chapter_viewed, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\report_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_folder\event\all_files_downloaded, mod_folder\event\folder_updated, mod_forum\event\assessable_uploaded, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_forum\event\user_report_viewed, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_h5pactivity\event\statement_received, mod_lesson\event\content_page_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\lesson_ended, mod_lesson\event\lesson_restarted, mod_lesson\event\lesson_resumed, mod_lesson\event\lesson_started, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_lti\event\unknown_service_api_called, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_scorm\event\report_viewed, mod_scorm\event\scoreraw_submitted, mod_scorm\event\status_submitted, mod_scorm\event\tracks_viewed, mod_survey\event\report_viewed, mod_wiki\event\page_created, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_history_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessable_uploaded, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\access_prevented, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, report_completion\event\report_viewed, report_log\event\report_viewed, report_log\event\user_report_viewed, report_loglive\event\report_viewed, report_outline\event\activity_report_viewed, report_outline\event\report_viewed, report_security\event\report_viewed, report_stats\event\report_viewed, tool_admin_presets\event\preset_deleted, tool_admin_presets\event\preset_downloaded, tool_admin_presets\event\preset_exported, tool_admin_presets\event\preset_imported, tool_admin_presets\event\preset_loaded, tool_admin_presets\event\preset_previewed, tool_admin_presets\event\preset_reverted, tool_admin_presets\event\presets_listed, tool_brickfield\event\analysis_requested, tool_brickfield\event\report_downloaded, tool_brickfield\event\report_viewed, tool_capability\event\report_viewed, tool_langimport\event\langpack_updated, tool_mfa\event\user_deleted_factor, tool_mfa\event\user_failed_mfa, tool_mfa\event\user_passed_mfa, tool_mfa\event\user_revoked_factor, tool_mfa\event\user_setup_factor, tool_monitor\event\rule_created, tool_monitor\event\rule_deleted, tool_monitor\event\rule_updated, tool_monitor\event\subscription_created, tool_monitor\event\subscription_deleted, tool_recyclebin\event\category_bin_item_created, tool_recyclebin\event\category_bin_item_deleted, tool_recyclebin\event\category_bin_item_restored, tool_recyclebin\event\course_bin_item_created, tool_recyclebin\event\course_bin_item_deleted, and tool_recyclebin\event\course_bin_item_restored.

◆ get_name_with_info()

static core\event\base::get_name_with_info ( )
static

Returns the event name complete with metadata information.

This includes information about whether the event has been deprecated so should not be used in all situations - for example within reports themselves.

If overriding this function, please ensure that you call the parent version too.

Return values
string

◆ get_objectid_mapping()

static core\event\base::get_objectid_mapping ( )
static

This is used when restoring course logs where it is required that we map the objectid to it's new value in the new course.

Does nothing in the base class except display a debugging message warning the user that the event does not contain the required functionality to map this information. For events that do not store an objectid this won't be called, so no debugging message will be displayed.

Example of usage:

return array('db' => 'assign_submissions', 'restore' => 'submission');

If the objectid can not be mapped during restore set the value to core\event\base\NOT_MAPPED, example -

return array('db' => 'some_table', 'restore' => core\event\base\NOT_MAPPED);

Note - it isn't necessary to specify the 'db' and 'restore' values in this case, so you can also use -

return core\event\base\NOT_MAPPED;

The 'db' key refers to the database table and the 'restore' key refers to the name of the restore element the objectid is associated with. In many cases these will be the same.

Return values
stringthe name of the restore mapping the objectid links to

Reimplemented in assignsubmission_file\event\assessable_uploaded, assignsubmission_onlinetext\event\assessable_uploaded, booktool_exportimscp\event\book_exported, booktool_print\event\book_printed, booktool_print\event\chapter_printed, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_external_removed, core\event\blog_external_viewed, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\cohort_created, core\event\cohort_deleted, core\event\cohort_updated, core\event\competency_created, core\event\competency_deleted, core\event\competency_framework_created, core\event\competency_framework_deleted, core\event\competency_framework_updated, core\event\competency_framework_viewed, core\event\competency_plan_approved, core\event\competency_plan_completed, core\event\competency_plan_created, core\event\competency_plan_deleted, core\event\competency_plan_reopened, core\event\competency_plan_review_request_cancelled, core\event\competency_plan_review_requested, core\event\competency_plan_review_started, core\event\competency_plan_review_stopped, core\event\competency_plan_unapproved, core\event\competency_plan_unlinked, core\event\competency_plan_updated, core\event\competency_plan_viewed, core\event\competency_template_created, core\event\competency_template_deleted, core\event\competency_template_updated, core\event\competency_template_viewed, core\event\competency_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\competency_user_evidence_created, core\event\competency_user_evidence_deleted, core\event\competency_user_evidence_updated, core\event\competency_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\course_backup_created, core\event\course_category_created, core\event\course_category_updated, core\event\course_category_viewed, core\event\course_completed, core\event\course_module_deleted, core\event\course_updated, core\event\grade_letter_created, core\event\grade_letter_deleted, core\event\grade_letter_updated, core\event\group_created, core\event\group_deleted, core\event\group_message_sent, core\event\group_updated, core\event\grouping_created, core\event\grouping_deleted, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\grouping_updated, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\notification_sent, core\event\question_base, core\event\question_category_base, core\event\question_moved, core\event\questions_exported, core\event\questions_imported, core\event\role_capabilities_updated, core\event\scale_created, core\event\scale_deleted, core\event\scale_updated, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\webservice_service_created, core\event\webservice_service_deleted, core\event\webservice_service_updated, core\event\webservice_token_created, core\event\webservice_token_sent, mod_assign\event\all_submissions_downloaded, mod_assign\event\course_module_viewed, mod_assign\event\feedback_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\identities_revealed, mod_assign\event\marker_updated, mod_assign\event\statement_accepted, mod_assign\event\submission_duplicated, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_bigbluebuttonbn\event\activity_management_viewed, mod_bigbluebuttonbn\event\course_module_viewed, mod_bigbluebuttonbn\event\live_session_event, mod_bigbluebuttonbn\event\meeting_created, mod_bigbluebuttonbn\event\meeting_ended, mod_bigbluebuttonbn\event\meeting_joined, mod_bigbluebuttonbn\event\meeting_left, mod_bigbluebuttonbn\event\recording_deleted, mod_bigbluebuttonbn\event\recording_edited, mod_bigbluebuttonbn\event\recording_imported, mod_bigbluebuttonbn\event\recording_protected, mod_bigbluebuttonbn\event\recording_published, mod_bigbluebuttonbn\event\recording_unprotected, mod_bigbluebuttonbn\event\recording_unpublished, mod_bigbluebuttonbn\event\recording_viewed, mod_book\event\chapter_created, mod_book\event\chapter_deleted, mod_book\event\chapter_updated, mod_book\event\chapter_viewed, mod_book\event\course_module_viewed, mod_chat\event\course_module_viewed, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\course_module_viewed, mod_choice\event\report_viewed, mod_data\event\course_module_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_folder\event\course_module_viewed, mod_folder\event\folder_updated, mod_forum\event\assessable_uploaded, mod_forum\event\course_module_viewed, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\course_module_viewed, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_h5pactivity\event\course_module_viewed, mod_h5pactivity\event\statement_received, mod_imscp\event\course_module_viewed, mod_lesson\event\content_page_viewed, mod_lesson\event\course_module_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\lesson_ended, mod_lesson\event\lesson_restarted, mod_lesson\event\lesson_resumed, mod_lesson\event\lesson_started, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_lti\event\course_module_viewed, mod_page\event\course_module_viewed, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\course_module_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_resource\event\course_module_viewed, mod_scorm\event\course_module_viewed, mod_survey\event\course_module_viewed, mod_survey\event\report_viewed, mod_url\event\course_module_viewed, mod_wiki\event\comments_viewed, mod_wiki\event\course_module_viewed, mod_wiki\event\page_created, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_history_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessable_uploaded, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\course_module_viewed, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\access_prevented, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, tool_monitor\event\rule_created, tool_monitor\event\rule_deleted, tool_monitor\event\rule_updated, tool_monitor\event\subscription_created, and tool_monitor\event\subscription_deleted.

◆ get_other_mapping()

static core\event\base::get_other_mapping ( )
static

This is used when restoring course logs where it is required that we map the information in 'other' to it's new value in the new course.

Does nothing in the base class except display a debugging message warning the user that the event does not contain the required functionality to map this information. For events that do not store any other information this won't be called, so no debugging message will be displayed.

Example of usage:

$othermapped = array(); $othermapped['discussionid'] = array('db' => 'forum_discussions', 'restore' => 'forum_discussion'); $othermapped['forumid'] = array('db' => 'forum', 'restore' => 'forum'); return $othermapped;

If an id can not be mapped during restore we set it to core\event\base\NOT_MAPPED, example -

$othermapped = array(); $othermapped['someid'] = array('db' => 'some_table', 'restore' => core\event\base\NOT_MAPPED); return $othermapped;

Note - it isn't necessary to specify the 'db' and 'restore' values in this case, so you can also use -

$othermapped = array(); $othermapped['someid'] = core\event\base\NOT_MAPPED; return $othermapped;

The 'db' key refers to the database table and the 'restore' key refers to the name of the restore element the other value is associated with. In many cases these will be the same.

Return values
arrayan array of other values and their corresponding mapping

Reimplemented in core\event\assessable_uploaded, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_entries_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\course_backup_created, core\event\course_completed, core\event\course_module_deleted, core\event\course_updated, core\event\course_user_report_viewed, core\event\course_viewed, core\event\group_message_sent, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\notification_sent, core\event\question_base, core\event\question_moved, core\event\section_viewed, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\url_blocked, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\user_login_failed, core\event\user_password_updated, core\event\webservice_service_created, core\event\webservice_token_created, mod_assign\event\feedback_viewed, mod_assign\event\grading_form_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\marker_updated, mod_assign\event\remove_submission_form_viewed, mod_assign\event\submission_form_viewed, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\report_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_forum\event\assessable_uploaded, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\user_report_viewed, mod_glossary\event\course_module_viewed, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_updated, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_scorm\event\report_viewed, mod_scorm\event\tracks_viewed, mod_survey\event\course_module_viewed, mod_survey\event\report_viewed, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\access_prevented, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, report_log\event\report_viewed, report_log\event\user_report_viewed, report_outline\event\report_viewed, report_stats\event\report_viewed, and tool_langimport\event\langpack_updated.

◆ get_record_snapshot()

core\event\base::get_record_snapshot ( $tablename,
$id )
final

Returns cached record or fetches data from database if not cached.

Parameters
string$tablename
int$id
Return values
stdClass
Exceptions
coding_exceptionif used after restore()

◆ get_static_info()

static core\event\base::get_static_info ( )
staticfinal

Get static information about an event.

This is used in reports and is not for general use.

Return values
arrayStatic information about the event.

◆ get_url()

core\event\base::get_url ( )

Returns relevant URL, override in subclasses.

Return values
moodle_url

Reimplemented in assignsubmission_file\event\assessable_uploaded, assignsubmission_onlinetext\event\assessable_uploaded, booktool_exportimscp\event\book_exported, booktool_print\event\book_printed, booktool_print\event\chapter_printed, core\event\antivirus_scan_data_error, core\event\antivirus_scan_file_error, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_listing_viewed, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_entries_viewed, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\capability_assigned, core\event\capability_unassigned, core\event\cohort_created, core\event\cohort_deleted, core\event\cohort_updated, core\event\comments_viewed, core\event\competency_created, core\event\competency_framework_created, core\event\competency_framework_updated, core\event\competency_framework_viewed, core\event\competency_plan_approved, core\event\competency_plan_completed, core\event\competency_plan_created, core\event\competency_plan_reopened, core\event\competency_plan_review_request_cancelled, core\event\competency_plan_review_requested, core\event\competency_plan_review_started, core\event\competency_plan_review_stopped, core\event\competency_plan_unapproved, core\event\competency_plan_unlinked, core\event\competency_plan_updated, core\event\competency_plan_viewed, core\event\competency_template_created, core\event\competency_template_updated, core\event\competency_template_viewed, core\event\competency_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\competency_user_evidence_created, core\event\competency_user_evidence_updated, core\event\competency_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\context_locked, core\event\context_unlocked, core\event\course_backup_created, core\event\course_category_created, core\event\course_category_updated, core\event\course_category_viewed, core\event\course_completed, core\event\course_completion_updated, core\event\course_information_viewed, core\event\course_module_instance_list_viewed, core\event\course_module_viewed, core\event\course_resources_list_viewed, core\event\course_updated, core\event\course_user_report_viewed, core\event\course_viewed, core\event\dashboards_reset, core\event\grade_exported, core\event\grade_letter_created, core\event\grade_letter_updated, core\event\grade_report_viewed, core\event\group_created, core\event\group_deleted, core\event\group_message_sent, core\event\group_updated, core\event\grouping_created, core\event\grouping_deleted, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\grouping_updated, core\event\insights_viewed, core\event\message_sent, core\event\message_viewed, core\event\moodlenet_resource_exported, core\event\notes_viewed, core\event\notification_sent, core\event\question_base, core\event\question_category_base, core\event\question_created, core\event\question_deleted, core\event\question_moved, core\event\questions_exported, core\event\questions_imported, core\event\recent_activity_viewed, core\event\role_allow_assign_updated, core\event\role_allow_override_updated, core\event\role_allow_switch_updated, core\event\role_allow_view_updated, core\event\role_capabilities_updated, core\event\scale_created, core\event\scale_updated, core\event\search_indexed, core\event\search_results_viewed, core\event\section_viewed, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\user_login_failed, core\event\user_password_policy_failed, core\event\user_password_updated, core\event\virus_infected_data_detected, core\event\virus_infected_file_detected, core\event\webservice_service_created, core\event\webservice_service_deleted, core\event\webservice_service_updated, core\event\webservice_token_created, core_payment\event\account_created, core_payment\event\account_deleted, core_payment\event\account_updated, core_reportbuilder\event\audience_created, core_reportbuilder\event\audience_deleted, core_reportbuilder\event\audience_updated, core_reportbuilder\event\schedule_created, core_reportbuilder\event\schedule_deleted, core_reportbuilder\event\schedule_updated, mod_assign\event\base, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_bigbluebuttonbn\event\base, mod_book\event\chapter_created, mod_book\event\chapter_deleted, mod_book\event\chapter_updated, mod_book\event\chapter_viewed, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\report_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_submitted, mod_folder\event\all_files_downloaded, mod_folder\event\folder_updated, mod_forum\event\assessable_uploaded, mod_forum\event\course_module_viewed, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_forum\event\user_report_viewed, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\course_module_viewed, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_h5pactivity\event\statement_received, mod_lesson\event\content_page_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\lesson_ended, mod_lesson\event\lesson_restarted, mod_lesson\event\lesson_resumed, mod_lesson\event\lesson_started, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_scorm\event\cmielement_submitted, mod_scorm\event\report_viewed, mod_scorm\event\tracks_viewed, mod_survey\event\report_viewed, mod_wiki\event\comments_viewed, mod_wiki\event\page_created, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_history_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessable_uploaded, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, report_completion\event\report_viewed, report_log\event\report_viewed, report_log\event\user_report_viewed, report_loglive\event\report_viewed, report_outline\event\activity_report_viewed, report_outline\event\report_viewed, report_security\event\report_viewed, report_stats\event\report_viewed, tool_admin_presets\event\preset_downloaded, tool_admin_presets\event\preset_exported, tool_admin_presets\event\preset_imported, tool_admin_presets\event\preset_loaded, tool_admin_presets\event\preset_previewed, tool_admin_presets\event\presets_listed, tool_capability\event\report_viewed, tool_langimport\event\langpack_updated, tool_monitor\event\rule_created, tool_monitor\event\rule_deleted, and tool_monitor\event\rule_updated.

◆ getIterator()

core\event\base::getIterator ( )

Create an iterator because magic vars can't be seen by 'foreach'.

Return values
ArrayIterator

◆ init()

core\event\base::init ( )
abstractprotected

Override in subclass.

Set all required data properties: 1/ crud - letter [crud] 2/ edulevel - using a constant self\LEVEL_*. 3/ objecttable - name of database table if objectid specified

Optionally it can set: a/ fixed system context

Return values
void

Reimplemented in assignsubmission_file\event\assessable_uploaded, assignsubmission_onlinetext\event\assessable_uploaded, booktool_exportimscp\event\book_exported, booktool_print\event\book_printed, booktool_print\event\chapter_printed, core\event\antivirus_scan_data_error, core\event\antivirus_scan_file_error, core\event\assessable_submitted, core\event\assessable_uploaded, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_listing_viewed, core\event\badge_revoked, core\event\blog_association_deleted, core\event\blog_entries_viewed, core\event\blog_external_removed, core\event\blog_external_viewed, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\capability_assigned, core\event\capability_unassigned, core\event\cohort_created, core\event\cohort_deleted, core\event\cohort_updated, core\event\comments_viewed, core\event\competency_created, core\event\competency_deleted, core\event\competency_framework_created, core\event\competency_framework_deleted, core\event\competency_framework_updated, core\event\competency_framework_viewed, core\event\competency_plan_approved, core\event\competency_plan_completed, core\event\competency_plan_created, core\event\competency_plan_deleted, core\event\competency_plan_reopened, core\event\competency_plan_review_request_cancelled, core\event\competency_plan_review_requested, core\event\competency_plan_review_started, core\event\competency_plan_review_stopped, core\event\competency_plan_unapproved, core\event\competency_plan_unlinked, core\event\competency_plan_updated, core\event\competency_plan_viewed, core\event\competency_template_created, core\event\competency_template_deleted, core\event\competency_template_updated, core\event\competency_template_viewed, core\event\competency_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\competency_user_evidence_created, core\event\competency_user_evidence_deleted, core\event\competency_user_evidence_updated, core\event\competency_viewed, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\context_locked, core\event\context_unlocked, core\event\course_backup_created, core\event\course_category_created, core\event\course_category_updated, core\event\course_category_viewed, core\event\course_completed, core\event\course_completion_updated, core\event\course_information_viewed, core\event\course_module_deleted, core\event\course_module_instance_list_viewed, core\event\course_module_viewed, core\event\course_resources_list_viewed, core\event\course_section_deleted, core\event\course_updated, core\event\course_user_report_viewed, core\event\course_viewed, core\event\dashboard_reset, core\event\dashboard_viewed, core\event\dashboards_reset, core\event\database_text_field_content_replaced, core\event\grade_exported, core\event\grade_letter_created, core\event\grade_letter_deleted, core\event\grade_letter_updated, core\event\grade_report_viewed, core\event\group_created, core\event\group_deleted, core\event\group_message_sent, core\event\group_updated, core\event\grouping_created, core\event\grouping_deleted, core\event\grouping_group_assigned, core\event\grouping_group_unassigned, core\event\grouping_updated, core\event\insights_viewed, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\moodlenet_resource_exported, core\event\mycourses_viewed, core\event\notes_viewed, core\event\notification_sent, core\event\qbank_plugin_base, core\event\question_base, core\event\question_category_base, core\event\question_category_created, core\event\question_category_deleted, core\event\question_category_moved, core\event\question_category_updated, core\event\question_category_viewed, core\event\question_created, core\event\question_deleted, core\event\question_moved, core\event\question_updated, core\event\question_viewed, core\event\questions_exported, core\event\questions_imported, core\event\recent_activity_viewed, core\event\role_allow_assign_updated, core\event\role_allow_override_updated, core\event\role_allow_switch_updated, core\event\role_allow_view_updated, core\event\role_capabilities_updated, core\event\scale_created, core\event\scale_deleted, core\event\scale_updated, core\event\search_indexed, core\event\search_results_viewed, core\event\section_viewed, core\event\tag_collection_created, core\event\tag_collection_deleted, core\event\tag_collection_updated, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\unknown_logged, core\event\url_blocked, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_list_viewed, core\event\user_loggedout, core\event\user_login_failed, core\event\user_password_policy_failed, core\event\user_password_updated, core\event\userfeedback_give, core\event\userfeedback_remind, core\event\virus_infected_data_detected, core\event\virus_infected_file_detected, core\event\webservice_service_created, core\event\webservice_service_deleted, core\event\webservice_service_updated, core\event\webservice_token_created, core\event\webservice_token_sent, core_customfield\event\category_created, core_customfield\event\category_deleted, core_customfield\event\category_updated, core_customfield\event\field_created, core_customfield\event\field_deleted, core_customfield\event\field_updated, core_payment\event\account_created, core_payment\event\account_deleted, core_payment\event\account_updated, core_reportbuilder\event\audience_created, core_reportbuilder\event\audience_deleted, core_reportbuilder\event\audience_updated, core_reportbuilder\event\schedule_created, core_reportbuilder\event\schedule_deleted, core_reportbuilder\event\schedule_updated, factor_email\event\unauth_email, factor_sms\event\sms_sent, factor_token\event\token_created, mod_assign\event\all_submissions_downloaded, mod_assign\event\course_module_viewed, mod_assign\event\feedback_viewed, mod_assign\event\grading_form_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\identities_revealed, mod_assign\event\marker_updated, mod_assign\event\remove_submission_form_viewed, mod_assign\event\statement_accepted, mod_assign\event\submission_duplicated, mod_assign\event\submission_form_viewed, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_bigbluebuttonbn\event\course_module_viewed, mod_book\event\chapter_created, mod_book\event\chapter_deleted, mod_book\event\chapter_updated, mod_book\event\chapter_viewed, mod_book\event\course_module_viewed, mod_chat\event\course_module_viewed, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_choice\event\course_module_viewed, mod_choice\event\report_viewed, mod_data\event\course_module_viewed, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_folder\event\all_files_downloaded, mod_folder\event\course_module_viewed, mod_folder\event\folder_updated, mod_forum\event\assessable_uploaded, mod_forum\event\course_module_viewed, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_forum\event\user_report_viewed, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\course_module_viewed, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_h5pactivity\event\course_module_viewed, mod_h5pactivity\event\statement_received, mod_imscp\event\course_module_viewed, mod_lesson\event\content_page_viewed, mod_lesson\event\course_module_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\highscores_viewed, mod_lesson\event\lesson_ended, mod_lesson\event\lesson_restarted, mod_lesson\event\lesson_resumed, mod_lesson\event\lesson_started, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_lti\event\course_module_viewed, mod_lti\event\unknown_service_api_called, mod_page\event\course_module_viewed, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\course_module_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_resource\event\course_module_viewed, mod_scorm\event\cmielement_submitted, mod_scorm\event\course_module_viewed, mod_scorm\event\report_viewed, mod_scorm\event\tracks_viewed, mod_survey\event\course_module_viewed, mod_survey\event\report_viewed, mod_url\event\course_module_viewed, mod_wiki\event\comments_viewed, mod_wiki\event\course_module_viewed, mod_wiki\event\page_created, mod_wiki\event\page_deleted, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_history_viewed, mod_wiki\event\page_locks_deleted, mod_wiki\event\page_updated, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_wiki\event\page_viewed, mod_workshop\event\assessable_uploaded, mod_workshop\event\assessment_evaluated, mod_workshop\event\assessment_reevaluated, mod_workshop\event\course_module_viewed, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_created, mod_workshop\event\submission_deleted, mod_workshop\event\submission_reassessed, mod_workshop\event\submission_updated, quizaccess_seb\event\access_prevented, quizaccess_seb\event\template_created, quizaccess_seb\event\template_deleted, quizaccess_seb\event\template_disabled, quizaccess_seb\event\template_enabled, quizaccess_seb\event\template_updated, report_completion\event\report_viewed, report_log\event\report_viewed, report_log\event\user_report_viewed, report_loglive\event\report_viewed, report_outline\event\activity_report_viewed, report_outline\event\report_viewed, report_security\event\report_viewed, report_stats\event\report_viewed, tool_admin_presets\event\preset_deleted, tool_admin_presets\event\preset_downloaded, tool_admin_presets\event\preset_exported, tool_admin_presets\event\preset_imported, tool_admin_presets\event\preset_loaded, tool_admin_presets\event\preset_previewed, tool_admin_presets\event\preset_reverted, tool_admin_presets\event\presets_listed, tool_brickfield\event\analysis_requested, tool_brickfield\event\report_downloaded, tool_brickfield\event\report_viewed, tool_capability\event\report_viewed, tool_langimport\event\langpack_updated, tool_mfa\event\user_deleted_factor, tool_mfa\event\user_failed_mfa, tool_mfa\event\user_passed_mfa, tool_mfa\event\user_revoked_factor, tool_mfa\event\user_setup_factor, tool_monitor\event\rule_created, tool_monitor\event\rule_deleted, tool_monitor\event\rule_updated, tool_monitor\event\subscription_created, tool_monitor\event\subscription_deleted, tool_recyclebin\event\category_bin_item_created, tool_recyclebin\event\category_bin_item_deleted, tool_recyclebin\event\category_bin_item_restored, tool_recyclebin\event\course_bin_item_created, tool_recyclebin\event\course_bin_item_deleted, and tool_recyclebin\event\course_bin_item_restored.

◆ is_deprecated()

static core\event\base::is_deprecated ( )
static

Whether this event has been marked as deprecated.

Events cannot be deprecated in the normal fashion as they must remain to support historical data. Once they are deprecated, there is no way to trigger the event, so it does not make sense to list it in some parts of the UI (e.g. Event Monitor).

Return values
boolean

Reimplemented in core\event\course_module_instances_list_viewed, and core\event\role_capabilities_updated.

◆ is_dispatched()

core\event\base::is_dispatched ( )
final

Used from event manager to prevent direct access.

Return values
bool

◆ is_restored()

core\event\base::is_restored ( )
final

Was this event restored?

Return values
bool

◆ is_triggered()

core\event\base::is_triggered ( )
final

Was this event already triggered?

Return values
bool

◆ restore()

static core\event\base::restore ( array $data,
array $logextra )
staticfinal

Restore event from existing historic data.

Parameters
array$data
array$logextrathe format is standardised by logging API
Return values
bool|core\event\base

◆ restore_legacy()

static core\event\base::restore_legacy ( $legacy)
staticfinal

Create fake event from legacy log data.

Parameters
stdClass$legacy
Return values
base

◆ restore_unknown()

static core\event\base::restore_unknown ( array $data,
array $logextra )
staticfinalprotected

Restore unknown event.

Parameters
array$data
array$logextra
Return values
unknown_logged

◆ validate_before_trigger()

core\event\base::validate_before_trigger ( )
protected

Validate all properties right before triggering the event.

This throws coding exceptions for fatal problems and debugging for minor problems.

Exceptions
coding_exception

Reimplemented in core\event\url_blocked.

◆ validate_data()

core\event\base::validate_data ( )
protected

Let developers validate their custom data (such as $this->data['other'], contextlevel, etc.).

Throw coding_exception or debugging() notice in case of any problems.

Reimplemented in core\event\assessable_submitted, core\event\assessable_uploaded, core\event\badge_awarded, core\event\badge_criteria_created, core\event\badge_criteria_deleted, core\event\badge_criteria_updated, core\event\badge_deleted, core\event\badge_listing_viewed, core\event\badge_revoked, core\event\blog_association_deleted, core\event\calendar_subscription_created, core\event\calendar_subscription_deleted, core\event\calendar_subscription_updated, core\event\competency_user_competency_plan_viewed, core\event\competency_user_competency_rated, core\event\competency_user_competency_rated_in_course, core\event\competency_user_competency_rated_in_plan, core\event\competency_user_competency_viewed_in_course, core\event\competency_user_competency_viewed_in_plan, core\event\config_log_created, core\event\contentbank_content_created, core\event\contentbank_content_deleted, core\event\contentbank_content_updated, core\event\contentbank_content_uploaded, core\event\contentbank_content_viewed, core\event\course_backup_created, core\event\course_completed, core\event\course_information_viewed, core\event\course_module_deleted, core\event\course_module_instance_list_viewed, core\event\course_module_viewed, core\event\course_resources_list_viewed, core\event\course_section_deleted, core\event\course_user_report_viewed, core\event\course_viewed, core\event\database_text_field_content_replaced, core\event\grade_report_viewed, core\event\group_message_sent, core\event\message_deleted, core\event\message_sent, core\event\message_viewed, core\event\notification_sent, core\event\qbank_plugin_base, core\event\question_base, core\event\question_moved, core\event\questions_exported, core\event\questions_imported, core\event\recent_activity_viewed, core\event\search_results_viewed, core\event\section_viewed, core\event\tag_created, core\event\tag_deleted, core\event\tag_flagged, core\event\tag_unflagged, core\event\tag_updated, core\event\url_blocked, core\event\user_deleted, core\event\user_enrolment_created, core\event\user_enrolment_updated, core\event\user_graded, core\event\user_login_failed, core\event\user_password_updated, core\event\webservice_token_created, core_reportbuilder\event\audience_created, core_reportbuilder\event\audience_deleted, core_reportbuilder\event\audience_updated, core_reportbuilder\event\schedule_created, core_reportbuilder\event\schedule_deleted, core_reportbuilder\event\schedule_updated, mod_assign\event\all_submissions_downloaded, mod_assign\event\base, mod_assign\event\feedback_viewed, mod_assign\event\grading_form_viewed, mod_assign\event\group_override_created, mod_assign\event\group_override_deleted, mod_assign\event\group_override_updated, mod_assign\event\identities_revealed, mod_assign\event\marker_updated, mod_assign\event\remove_submission_form_viewed, mod_assign\event\statement_accepted, mod_assign\event\submission_duplicated, mod_assign\event\submission_form_viewed, mod_assign\event\submission_viewed, mod_assign\event\user_override_created, mod_assign\event\user_override_deleted, mod_assign\event\user_override_updated, mod_assign\event\workflow_state_updated, mod_bigbluebuttonbn\event\base, mod_chat\event\sessions_viewed, mod_choice\event\answer_created, mod_choice\event\answer_deleted, mod_data\event\field_created, mod_data\event\field_deleted, mod_data\event\field_updated, mod_feedback\event\response_deleted, mod_feedback\event\response_submitted, mod_folder\event\all_files_downloaded, mod_forum\event\assessable_uploaded, mod_forum\event\discussion_lock_updated, mod_forum\event\discussion_moved, mod_forum\event\discussion_pinned, mod_forum\event\discussion_unpinned, mod_forum\event\discussion_viewed, mod_forum\event\readtracking_disabled, mod_forum\event\readtracking_enabled, mod_forum\event\subscription_created, mod_forum\event\subscription_deleted, mod_forum\event\subscription_mode_updated, mod_forum\event\user_report_viewed, mod_glossary\event\category_created, mod_glossary\event\category_deleted, mod_glossary\event\category_updated, mod_glossary\event\entry_approved, mod_glossary\event\entry_created, mod_glossary\event\entry_deleted, mod_glossary\event\entry_disapproved, mod_glossary\event\entry_updated, mod_glossary\event\entry_viewed, mod_lesson\event\content_page_viewed, mod_lesson\event\group_override_created, mod_lesson\event\group_override_deleted, mod_lesson\event\group_override_updated, mod_lesson\event\highscore_added, mod_lesson\event\user_override_created, mod_lesson\event\user_override_deleted, mod_lesson\event\user_override_updated, mod_quiz\event\attempt_abandoned, mod_quiz\event\attempt_becameoverdue, mod_quiz\event\attempt_deleted, mod_quiz\event\attempt_manual_grading_completed, mod_quiz\event\attempt_preview_started, mod_quiz\event\attempt_reopened, mod_quiz\event\attempt_reviewed, mod_quiz\event\attempt_submitted, mod_quiz\event\attempt_summary_viewed, mod_quiz\event\group_override_created, mod_quiz\event\group_override_deleted, mod_quiz\event\group_override_updated, mod_quiz\event\page_break_created, mod_quiz\event\page_break_deleted, mod_quiz\event\quiz_grade_item_created, mod_quiz\event\quiz_grade_item_deleted, mod_quiz\event\quiz_grade_item_updated, mod_quiz\event\quiz_grade_updated, mod_quiz\event\report_viewed, mod_quiz\event\section_break_created, mod_quiz\event\section_title_updated, mod_quiz\event\slot_deleted, mod_quiz\event\slot_displaynumber_updated, mod_quiz\event\slot_moved, mod_quiz\event\slot_requireprevious_updated, mod_quiz\event\user_override_created, mod_quiz\event\user_override_deleted, mod_quiz\event\user_override_updated, mod_scorm\event\cmielement_submitted, mod_scorm\event\report_viewed, mod_scorm\event\scoreraw_submitted, mod_scorm\event\status_submitted, mod_scorm\event\tracks_viewed, mod_survey\event\course_module_viewed, mod_wiki\event\page_diff_viewed, mod_wiki\event\page_version_restored, mod_wiki\event\page_version_viewed, mod_workshop\event\phase_automatically_switched, mod_workshop\event\submission_assessed, mod_workshop\event\submission_reassessed, report_completion\event\report_viewed, report_log\event\report_viewed, report_log\event\user_report_viewed, report_outline\event\report_viewed, report_stats\event\report_viewed, and tool_langimport\event\langpack_updated.

Member Data Documentation

◆ LEVEL_PARTICIPATING

const core\event\base::LEVEL_PARTICIPATING = 2

Participating level.

Any event that is performed by a user, and is related (or could be related) to his learning experience.

◆ LEVEL_TEACHING

const core\event\base::LEVEL_TEACHING = 1

Teaching level.

Any event that is performed by someone (typically a teacher) and has a teaching value, anything that is affecting the learning experience/environment of the students.


The documentation for this class was generated from the following file: