Event and logging

Re: Event and logging

by Dominique Palumbo -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

I think it miss this command before triggering.

$event->add_record_snapshot($tablename, $record);

can be

$event->add_record_snapshot('course', $course);

If you look in Moodle code for  add_record_snapshot you'll find another usefull sample
$event->add_record_snapshot('user', $user);
$event->add_record_snapshot('course_modules', $cm);
...

Hope it's help.

Dominique.

In reply to Dominique Palumbo

Re: Event and logging

by freddie valdez -
it shouldn't need snapshot since that has to do more with auxiliary information.

Nevertheless what i found out was the directory of the plugin i was using was the wrong one for the plugin and once i fixed that and added observers i managed to fix it and record the event in the logs.
Average of ratings: Useful (1)