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:
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?