Note: You are currently viewing documentation for Moodle 3.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Event monitoring.

Event monitoring

From MoodleDocs

New feature
in Moodle 3.9!

What is Event monitoring?

  • Event monitoring allows admins and teachers to receive notification when certain events happen in Moodle. See Events list for examples of events and their levels.
  • To do this, a 'rule' needs to be created for the event to be monitored and then a user, such as the admin or teacher will need to subscribe to it to be notified.
  • The rule will specify what the event is and how often it must happen before notification is sent to the subscriber. The notification may be pop-up, email or other chosen methods.
  • A teacher can create a rule from Course administration>Reports>Event monitoring rules and an administrator can, additionally, create a rule from Site administration>Reports>Event monitoring rules.
  • You can subscribe to available rules from My profile settings>Event monitoring.

How to create or manage a rule

  • As a course teacher, go to Course administration>Reports>Event monitoring rules, or as an admin go to Site administration>Reports>Event monitoring rules

How to subscribe to a rule

Message template

When creating or editing a rule, you can embed placeholders to add details to notification messages. The use of placeholders is optional; you can use any personalised message, but if you wish to use placeholders, there are examples of use below:

The placeholders that can be used in a message template are as follows:

Placeholder What it does? Example
{link} Direct link to the actual event, eg a forum discussion. http://YourMoodle.com/mod/forum/discuss.php?d=2
{modulelink} Link to the module where the event has happened, eg a forum http://YourMoodle.com/mod/forum/view.php?id=8
{rulename} A name for the rule. Student discussions
{description} A description of the rule. I want to receive notifications when there is a large volume of student posts in a discussion.
{eventname} The name of the event being monitored. Forum post created.

The examples above show the placeholders for a rule to monitor the Forum post created event. Here is an example of a message template using these placeholders.

The rule {rulename}, monitoring the event {eventname}, has just been fulfilled. 
Click the following link to go to the forum discussion: {link}
Rule description: {description}

The result of this message template would be as follows.

The rule Student discussions, monitoring the event Forum post created, has just been fulfilled. 
Click on the following link to go to the forum discussion: http://YourMoodle.com/mod/forum/discuss.php?d=2 .
Rule description: I want to receive notifications when there are a large volume of student posts in a discussion.

Now, let's create a rule called Glossary entries to monitor when a new glossary entry is created:

The rule {rulename}, monitoring the event {eventname}, has just been fulfilled. 
Click the following link to go to see the new entry created: {link}
Rule description: {description}

The result of this message template would be as follows.

The rule Glossary entries, monitoring the event Entry has been created, has just been fulfilled. 
Click on the following link to go to see the new entry created: http://YourMoodle.com/mod/glossary/view.php?id=5&mode=entry&hook=1.
Rule description: I want to receive notifications when a new glossary entry is created.

Note that some events do not have a link. Course deleted and Course module deleted for example, would not display any link if {link} is used.

See also