MDL-52805 core: Add debugging for old event functions

This commit is contained in:
Mathew May 2020-08-24 17:42:19 +08:00
parent 556208417d
commit fce2e17633
2 changed files with 13 additions and 0 deletions

View File

@ -266,6 +266,15 @@ abstract class base implements \IteratorAggregate {
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.).

View File

@ -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)