Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Event monitoring.

Event monitoring

From MoodleDocs


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. Note that students may also be allowed to subscribe to rules if they are given the capability tool/monitor:subscribe. It is not recommended that they be allowed to create or manage rules.
  • 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 via the user menu Preferences > Event monitoring.

Enabling event monitoring

Event monitoring is disabled by default because of performance issues. An administrator can enable it from Site administration > Reports > Event monitoring rules.

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.

Rule name

You can call the rule what you like but it should be something others will understand as they may wish to subscribe to the rule you created.

Area to monitor

When you select an area to monitor, for example, Forum, the 'Event' drop down menu below will then display the events you can select from.

Event

Once an area has been chosen, the events for that area will display here.

Description

You don't have to use a description but if you do, it should be something meaningful to others as they may wish to subscribe to the rule you created.

Notification threshold

  • This means: how many times should this event happen before I get notified?
  • For example the following setting would mean that if an event happens five times in 30 minutes then Moodle will send you an alert:
notificationthreshold.png

Notification message

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.

Example 1

The above example shows the placeholders for a rule to monitor the Forum post created event. The notification message using these placeholders would be as follows:

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 would display like this:

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.

Example 2

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 would display like this:

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: Some events do not have a link. Course deleted and Course module deleted for example, would not display any link if {link} or {modulelink} is used.

How to subscribe to a rule

  • When events are created from Site or Course administration > Reports > Event monitoring rules, users who have permission to subscribe to rules have an 'Event monitoring' link on their preferences page
  • From here, you can unsubscribe to any events you are subscribed to already and you can subscribe to new events created by you or others.
EMSubscriptions.png

See also