Log events in Moodle plugin

Re: Log events in Moodle plugin

by Darko Miletić -
Number of replies: 1
It is always better to provide complete code in some git repository so that whoever may be interested to help can take a look and have complete picture.

In this case based on the limited information you provided it seems that the code is incorrect. For example:

$event = \mod_paella\event\course_module_viewed::create($params);
Where is \mod_paella\event\course_module_viewed defined? Is it defined?

Than in the events.php you have:

'callback' => 'course_module_observer::get_url'
Where is course_module_observer defined?



Average of ratings: Useful (1)
In reply to Darko Miletić

Re: Log events in Moodle plugin

by Paul K -
Dear Darko,

thank you for your prompt reply. You are right I messed up the class definition. After changing the class name and adding the following line:

namespace mod_paella\event; in the event file it works as expected.

Thank you for your hint.