Skip to content
Advertisement

Moodle Events API

I’m trying to develop a plugin for Moodle, using Events API that will send out emails when new blog post is created. I created my plugin with the following structure:

JavaScript

db/events.php:

JavaScript

I got the event name from here /blog/locallib.php.

classes/observer.php:

JavaScript

However I don’t see that log, as if it doesn’t even get to that class, why ?

Advertisement

Answer

I figured it out, it was the namespaces…

So the updated files are (I also renamed my plugin to newsletter):

JavaScript

db/events.php:

JavaScript

classes/observer.php:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement