Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37673

Re: Moodle Events API

$
0
0
by Mark Williamson.  

Hi Guys, thanks for the help. Hopefully we can sort it. In my db folder, and in the events.php I have declared:

//messaging
'message_send' => array(
'handlerfile' => '/blocks/block_name/observer.php',
'handlerfunction' => 'block_name_message_send_event',
'schedule' => 'instant',
'internal' => 1,
),

Then in my observer.php file I have:

function block_name_message_send_event($message) {
$log = new Logger();
$log->log($log->info(), "message_send here" . $message);
}

Looks OK to me anyway, perhaps someone else could test the event and see if it works. I have done much the same with the quiz events. 

Best,

Mark

 


Viewing all articles
Browse latest Browse all 37673

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>