Skip to content

Commit

Permalink
MDL-52805 core: Add debugging for old event functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Mar 7, 2023
1 parent 5562084 commit fce2e17
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/classes/event/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,15 @@ public static final function create(array $data = null) {
if ($expectedcourseid != $event->data['courseid']) {
debugging("Inconsistent courseid - context combination detected.", DEBUG_DEVELOPER);
}

if (method_exists($event, 'get_legacy_logdata') ||
method_exists($event, 'set_legacy_logdata') ||
method_exists($event, 'get_legacy_eventname') ||
method_exists($event, 'get_legacy_eventdata')
) {
debugging("Invalid event functions defined in " . $event->data['eventname'], DEBUG_DEVELOPER);
}

}

// Let developers validate their custom data (such as $this->data['other'], contextlevel, etc.).
Expand Down
4 changes: 4 additions & 0 deletions lib/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ defined or can't be applied.
- message_unblock_contact
- message_block_contact
- message_get_contact
- get_legacy_logdata
- set_legacy_logdata
- get_legacy_eventname
- get_legacy_eventdata
* The following renamed classes have been completely removed:
- course_in_list (now: core_course_list_element)
- coursecat (now: core_course_category)
Expand Down

0 comments on commit fce2e17

Please sign in to comment.