Hi,
I'm building a simple plugin to handle the event "user completes a course".
This is my structure:
/local/myplugin/db/events.php:
<?php
defined('MOODLE_INTERNAL') || die();
$handlers = array (
'course_completed' => array (
'handlerfile' => '/local/myplugin/lib.php',
'handlerfunction' => 'local_myplugin_course_completed',
'schedule' => 'instant',
'internal' => 1,
)
);
/local/myplugin/lib.php:
<?php
function local_myplugin_course_completed($eventdata)
{
ob_flush();
ob_start();
var_dump($eventdata);
file_put_contents("dump.txt", ob_get_flush());
}
Well, as in the subject, when a user completes a course, nothing happens...