Moodle event observers “fire” asynchronously based on events that get triggered by user activity, and so… hard to catch and debug by simply passing the XDEBUG variable via the browser.
Enters… xdebug_break()
Moodle event observers “fire” asynchronously based on events that get triggered by user activity, and so… hard to catch and debug by simply passing the XDEBUG variable via the browser.
Enters… xdebug_break()
“It is essential to support such thing likes event observers in any framework. In this post, I will show how to defined your observers in Moodle.”
Source: Event Observers in Moodle