Hi,
I'm in the process of adding an event handler to my plugin, but it seems that the event does not reach the handler...
The code part:
<?php // in db/events.php $observers = array( array( 'eventname' => '\core\event\user_graded', 'callback' => 'ws_rashim_event_handlers::grades_export_handler', ) ); ?>
<?php // in classes/observer.php class ws_rashim_event_handlers { public static function grades_export_handler($eventdata) { global $CFG; global $DB; file_put_contents('grade_event.txt', print_r($eventdata, true)); // more code } } ?>
Now, when I'm updating any grade of any course I would excpect a 'grade_event.txt' file appears, but nothing happening...
Any hint what wrong with this?
Thank you,
Peter