Skip to main content

My rule is not working

Let's walk through the different reasons why a rule may not be working as expected.

What is always ignored

Before checking whether your rule specifically isn't working, let's recap' what events and actions are ignored:

  • The actions performed by guests and administrators
  • The events flagged as anonymous (e.g. in an anonymous Feedback activity)
  • The events occurring outside of courses (e.g. sending a message, logging in)
  • The events with an educational level not equal to Participating
  • The actions performed by users that do not have the permission block/xp:earnxp (given to students by default)

R report lists all the events, it is accessible from your Moodle site at Site administration > Reports > Events list. You can use it to check the educational level of an event amongst other things.

info

Since XP 3.15, administrators can be allowed to earn points by enabling the adminscanearnxp admin setting.

Disable the cheat guard

Please keep in mind that the cheat guard may be affecting your results. If you are currently testing your set-up, you may want to disable the cheat guard. The cheat guard could be the cause of events being ignored if too many occur within a short time, or if the same event is repeated, or when a certain amount of points already where awarded.

The cheat guard can be disabled in the "Settings" tab. Also note that events ignored due to the cheat guard will not be displayed in Level Up XP logs.

The cheat guard considers two events identical when they are. For example posting in two different forum discussions is not considered identical, but posting twice in the same discussion is.

Check if the event is in the logs

A good way to identify whether the event has been ignored by Level Up XP is to check the Moodle logs. Those contain a detailed list of all events occurring and can be used to confirmed that an event was really triggered when you expected it. To view the Moodle logs, head to Site administration > Reports > Logs, or in Reports > Logs in a course.

You may also find useful to check Level Up XP logs, when a rule is matched and not prevented by the cheat guard, a log of the event, the user and how many points they earned will be saved in the logs. The logs are accessible in their dedicated tab.

The rule cannot be matched

Rules are very flexible and allow you to combine many different conditions together, however sometimes this can lead to impossible conditions. For example, a rule cannot happen in two activities at the same time, so combining two conditions Activity or resource is ... with the condition that "ALL of the conditions are true" will never match. It should read "ANY of the conditions are true". The same applies when combining The event is ..., and others.

If you are unsure whether your rule is impossible, considering splitting it in smaller distinct rules.