Admin tools: Event Trigger

Maintained by Picture of Catalyst ITCatalyst IT, Catalyst logoAaron Wells, Picture of Matt PorrittMatt Porritt, Picture of Dan MarsdenDan Marsden
This plugin plugin allows site administrators to trigger external actions such as an http request or email when certain events happen in Moodle. Filters can be added to check if the event meets certain conditions and actions(email/http post) can include information contained within the Moodle event. Lookups can also be added to the workflow to allow information not contained within the Moodle event to be exposed to the external action.
135 sites
24 fans

Event Trigger

The Event Trigger allows Moodle Events to be monitored and a workflow to be triggered when that event occurs.
One of the main use cases of this plugin is to allow Moodle events to trigger actions in external systems.

Each workflow is made up of a series of steps. Steps can be things like:

  • Using event data to lookup user and course information
  • Filtering data based on a set of conditions
  • Performing an action like sending an email or Posting data to a HTTP endpoint or external API.

More configuration documentation can be found at the following link:

More Information on Moodle events can be found in the Moodle documentation at the following link:

Supported Moodle Versions

This plugin currently supports Moodle:

  • 3.3 (PHP 7 is required)
  • 3.4
  • 3.5

Moodle Plugin Installation

The following sections outline how to install the Moodle plugin.

Command Line Installation

To install the plugin in Moodle via the command line: (assumes a Linux based system)

  1. Get the code from GitHub or the Moodle Plugin Directory.
  2. Copy or clone code into: <moodledir>/admin/tool/trigger
  3. Run the upgrade: sudo -u www-data php admin/cli/upgrade Note: the user may be different to www-data on your system.

User Interface Installation

To install the plugin in Moodle via the Moodle User Interface:

  1. Log into your Moodle as an Administrator.
  2. Navigate to: Site administration > Plugins > Install Plugins
  3. Install plugin from Moodle Plugin directory or via zip upload.

Plugin Setup

Plugin setup and configuration documentation can be found at the following link:

Crafted by Catalyst IT

This plugin was developed by Catalyst IT:

Catalyst IT

Contributing and Support

Issues, and pull requests using github are welcome and encouraged!

If you would like commercial support or would like to sponsor additional improvements to this plugin please contact us:


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3


Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • nbirt
    Wed, Aug 8, 2018, 10:05 AM
    Hello, this looks like it could be much more useful than event monitoring. Does it require PHP 7? We are currently running PHP 5.6.36 and are not able to get it to function as of yet. We get Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in /var/www/ on line 133.
  • nbirt
    Wed, Aug 8, 2018, 10:07 AM
    It's Moodle 3.3.6 btw...
  • Picture of Dan Marsden
    Wed, Aug 8, 2018, 10:49 AM
    yeah - we've only been testing this with PHP 7 sorry - Moodle 3.3 support might be limited.
  • Picture of Brandon Jimenez
    Thu, Aug 9, 2018, 11:53 PM
    hello Dan: Finally i manage to make the core event to work and send me a simple email when a user changes their password. Then i went back for yours... and it's a shame i can't add some screenshots here. So now i know that the emails server is working and that the event itself is being observed by someone (maybe the NSA as well). However, i still can't make your plugin to work, and i'm running out of ideas. Will keep checking your wiki to see if i missed something.

    Best regards
  • Picture of Brandon Jimenez
    Fri, Aug 10, 2018, 12:40 AM
    Update: i recreated my original workflow and added another one to trigger when a user logs in and both are showing a date under "Last triggered" which is good news. In both i created a Lookup and then an Action but it keeps not sending the email. BTW, the Datafield image that i can see on your wiki i can't see it anywhere, as well as i can't activate the learning mode. is that from a newer version? Mine is 2018051002
  • Picture of Dan Marsden
    Fri, Aug 10, 2018, 5:04 AM
    yeah - that's the version in the plugins db here, but the code has moved on a lot since then - latest code is all in github - probably worth giving the code from github a go to see if that works better for you.
  • Picture of Brandon Jimenez
    Fri, Aug 10, 2018, 11:25 PM
    Hello Dan: I updated to the latest version you have on github and habe news: now the workflow i created to track the user logging in is working, but the one for the password change isn't. I know it's being triggered (the event) as both the Last triggered column in your plugin and the core event changes (i'm receiving an email from the core in that event). I also have basically the same actions in both, using mostly the same info. Is there something else i could look up for? Also, it's a little bit bizarre that when we update the workflow, the last triggered column goes blank (i understand the logic, but it would be worth mentioning it in the wiki). As usual, best regards.
  • Picture of Dan Marsden
    Mon, Aug 13, 2018, 5:40 AM
    Sounds weird - thanks for the update, let us know if you figure it out! - thanks.
  • Picture of Ketan Chandaria
    Fri, Aug 24, 2018, 4:10 PM
    Hello Dan: I'm intending to trigger emails to go out to various user groups upon certain activity occurring. In assignment activity, I have set up assignment to use multiple markers (non-editing teacher role) and marking flow (in marking, marking completed, in review, released, etc..). Each marker can see / action only their allocated students. The emails should trigger in these scenario (A) to student and their respective marker only on assignment submission (B) to student, resp. marker and resp. teacher on assignment status 'marking completed' (C) to student, resp. marker and resp. teacher on assignment status 'grade released'
    Can you / someone please help me with how to config this plugin and maybe assignment setting. I'm using moodle 3.4 & php 7. Thank you so much.
  • Picture of Dan Marsden
    Fri, Aug 24, 2018, 5:05 PM
    Hi Ketan, unfortunately we are not in a position to provide free support for everyone that wants help configuring this plugin with a specific workflow - and the comments here in the plugin database don't make this easy either (no threads etc.) - You could try asking for help in the community forums and one of our team might notice the post and have time to reply, otherwise you're on your own at this stage sorry! - good luck!
  • Picture of Brandon Jimenez
    Fri, Aug 31, 2018, 2:15 AM
    Hi Dan, we finally fixed it! There was a missed setting in the mail server. Thanks for all the help.
  • Ben Haensel
    Tue, Oct 9, 2018, 3:33 AM
    Could anyone offer advice as to what I'm missing when setting up this event trigger for a specific student when submitting a quiz? Please see linked image:

    Thanks for any info! -Ben,
  • Picture of King Hernandez
    Wed, Nov 21, 2018, 12:20 PM
    Hi Catalyst team!

    Is it possible to send multiple recipients with the email action trigger?
  • Picture of Roberto Hebert de Souza Vinha
    Tue, Feb 19, 2019, 5:01 AM
    For Action Step Type not appear any Step.
  • Picture of Dan Logan
    Fri, Mar 15, 2019, 12:07 PM
    This is an excellent plugin. Not much documentation so I'd love to add to it with my samples but not sure how to
1 2
Please login to post comments