Your Moodle version

Blocks: Level up!

Maintained by Picture of Frédéric Massart Frédéric Massart
Engage your students! Gamify your students' learning experience by allowing them to level up in their courses. #gamification #game

You can easily support this plugin: add it to your favourites and star it on GitHub!

Feature request and bug reports

Please report the issues you find, problems you experience or any feature request on the issue tracker. Thanks!


  • Automatically captures and attributes experience points to students' actions
  • Block that displays current level and progress towards next level
  • Report for teachers to get an overview of their students' levels
  • Notifications to congratulate students as they level up
  • A ladder to display the ranking of the students
  • Ability to set the number of levels and the experience required to get to them
  • Images can be uploaded to customise for the appearance of the levels
  • The amount of experience points earned per event is customizable
  • Page to display the list of levels and a description
  • Experience points are earned per course
  • An event is fired when a student levels up (for developers)

How are experience points calculated?

This block listens to events triggered in Moodle and captures some according to pre-defined rules. It then attributes experience points based on the information contained in the event. For more information about the events, refer to the documentation.

Only the users with the capability block/xp:earnxp can earn experience points. This capability is given by default to students. Also actions triggered by guests, non-logged in users or administrators are ignored.

The following events are always ignored:

  • Events from another context than course or module
  • Events having another educational level than participating
  • Events flagged as anonymous, e.g. in an anonymous Feedback

The rest is up to you. By default the plugin comes with a minimal set of rules to attribute experience points to actions, and to ignore some redundant ones. Visit the Rules page in the plugin itself to view or override them.

Note: Repeated actions within a short time interval are ignored to prevent cheating.

How to use one block for all courses

In order to gather experience points from all the courses a student is participating in, you have to set the admin setting Where are experience points used? to 'For the whole site'. This setting is located under "Site administration > Plugins > Blocks > Level up!". Once set, any block newly or previously added will display the total experience points of your student.


This plugin is part of set Experience Points (XP).


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7


Picture of Frédéric Massart
Frédéric Massart (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Frédéric Massart
    Tue, Sep 29, 2015, 11:34 AM
    Hi Paulo,

    A dialogue/modal is displayed when the user levelled up, similar to what you can see in the first screenshot. You can disable this using one of the settings.

  • Picture of Brian Rigwald
    Wed, Oct 14, 2015, 9:10 PM
    Is there a way to cancel out the 9 points for actually going to the course page (\core\event\course_viewed)? Some students are getting an advantage by revisiting the course page several times, because they are slower at getting work done in class, so they have to go back at home to finish it. Others constantly have missing work, so are having to go back to the course repeatedly, meaning that they are racking up points with every visit to the course page. I tried to cancel out all the default 9's by setting a rule for most of the "course module viewed" events (for example: "File: Course module viewed") as "0". I don't see an event for the plain general course module. I set the other CRUD events (C, U, D) to 0, but setting the "R" made it so none of my other point rules would register (Like game viewed, url viewed, lesson question answered, etc...).

    Any suggestions would be helpful. smile
  • Picture of Frédéric Massart
    Thu, Oct 15, 2015, 11:03 AM
    Hi Brian,

    Adding a rule on "eventname" is equal to "\core\event\course_viewed" attributing 0 experience points should give 0 to viewing the course. If you also want to remove the XP they earn when viewing modules, then adding a condition "eventname" contains "course_module_viewed" should work as well.

    Let me know how this goes.
  • Picture of clement p
    Mon, Oct 19, 2015, 4:48 AM
    Hi Fred,

    Thank you for your plugin and your work. I have a question about Level Up. I try to edit levels and rules but I'm not sure to understand if we can make what I want.
    I want students win experience linked with posts in a forum and quiz/test result. So can we do something like :

    1. Forum
    - If student post or create 3 messages in the forum, attribute him 5 points.
    - If student post or create 3 more messages (after the first 3 messages) in the forum, attribute him 15 points more.

    2. Quiz/test
    When student submit test use his result
    - If student have a result above 14, attribute him 10 points
    - If student have a result below 14, attribute him 5 points.

    Best regards.
  • Picture of Frédéric Massart
    Mon, Oct 19, 2015, 10:25 AM
    Hi Clement,

    Currently the plugin does not support this, the plugin listens to an action and remains unaware of the state in which the action happened. To re-use your example, the plugin can capture when a student posts to a forum, but it doesn't know if that is the first, or thousandth post the user submitted.

    For the quiz result, it's not currently possible either, but it should be easier for me to add support for it. I have been thinking about filtering the events based on a grade received, I will have to look a bit more into that.

    I hope you can find a way around these.

  • Picture of clement p
    Wed, Oct 21, 2015, 3:30 AM
    Hi Fred,

    Thank you for your answer. In fact I mix two things in my brain : activities completion and triggers. Now, I understand well Level Up counts triggers to measure experience. And not activies completion.
    So in my case, I think i'm gooing to use Level up + badges (for quiz or forum completion). Do you think in the futur it will be possible your plugin counts triggers AND activities completion ? I know these are two different things in Moodle but why not combine these two goods concepts.

    One more thing : do you have a link where we can find clarification about "Event property" fields (event name, target name, etc.)



  • Picture of Frédéric Massart
    Wed, Oct 21, 2015, 10:41 AM
    Hi Clément,

    It's not impossible that I add support for a combination of conditions rather than a combination of "triggers", I'm not sure when though.

    I answered a few things here: maybe that helps.

  • Picture of Robert Klein
    Thu, Nov 12, 2015, 6:06 AM
    This is great for my middle school kids. The 10 levels default was reached in a week or 2. So I went and added more levels (up to 100) and increased the algorithtm multiplier.
  • Picture of Rich Stevenson
    Fri, Nov 20, 2015, 12:15 AM
    Hi Frédéric. I appear to have a problem with this plugin, although I may know the answer. I have installed Level Up onto our version of Moodle and all seems fine, and I have set up some basic rules. The first rule I have set up is simply 10 points for opening up and reading the course handbook. I noticed that Level Up is not updating my score and it remains at 0. For some time we have had problems with the Cron job, which will not update the database from the the log files and I am guessing you are using this data to determine the tasks which have been completed?
  • Picture of phuong hoang
    Fri, Nov 20, 2015, 9:50 AM
    Hi Frédéric,
    This is a great plugin. Thanks for contribution. It's better if your plugin relates to the grades of a student gained in each assignment, and if it displays the "Ladder" in block like the screenshot instead of Level. Are you planning to connect XP to the actual students' performance further? I look forward to enjoying the next version.
    Best wishes,
  • Picture of Frédéric Massart
    Fri, Nov 20, 2015, 10:17 AM
    Hi Rich,

    It's hard to debug a problem with so little information. But no, the plugin does not use cron to compute the experience points, they are computed live. Did you log in as a student before testing? As the plugin essentially relies on events, is your "handbook" module triggering them with the right information? The plugin ignores everything but participating events.

    Hi Phuong,

    To the risk of disappointing you, I am more and more thinking that block_xp is not the right place for rewarding students for their performance. The idea is really to reward students for their progress and investment rather than comparing themselves to others. See, in the first versions there was not even a ladder.

    On a positive note, I have been thinking about creating another plugin which would suit better what you are trying to achieve. Hopefully I'll get time to work on it a bit at some point.
  • Picture of Garth Brady
    Sat, Nov 21, 2015, 11:20 AM
    Brilliant plugin! Two questions: (1) As a Teacher/Course Creator, can I make myself 'Level 10' automatically? (2) I find the 100px x 100px quite small for custom badges -is it possible to adjust these dimensions?
  • Picture of Frédéric Massart
    Mon, Nov 23, 2015, 10:47 AM
    Hi Garth,

    Teachers should not receive any experience points and are not displayed in the list ever. Should you wish to change that behaviour you can abuse the capability block/xp:earn, and manually set each teacher to level 10. From memory you can change the alter the CSS to use larger images, but you'd have to test the results.

  • Picture of Gareth Bentley
    Wed, Nov 25, 2015, 1:48 AM

    Currently I have a bit of a problem understanding how this works. I have a course with 16 activities and I'd like to award 6xp for each activity. However, I'm not getting a consistent score awarded on each activity.

    I've tried playing around with the conditions but it doesn't appear to be making an impact. If I wanted to set a score of six for completing a lesson, how would I set it up?


  • Picture of Frédéric Massart
    Wed, Nov 25, 2015, 10:45 AM
    Hi Gareth,

    You don't really assign "XP" to activities. The XP attributes comes from actions that the student has performed in the course. What the rules allow you is to change the amount of XP they get for each of those actions. So if you were to set a rule "Activity is blah blah give 6xp" that would mean that if the user performs an action in that activity, they will get 6xp. However, some activities "trigger" a lot more actions than others. For instance, a forum can report actions when you view the forum, view a discussion, create a discussion, reply to a discussion, and probably more. Each of these actions will give 6xp to the student.

    Maybe what you're trying to do is reward the user for "completing" an activity, that's a bit different and I have to admit that I did not investigate how that could be done. If you're feeling that block_xp could be improved by supporting something that you need, could you please raise an issue on the Github project?

1 2 3 4 5 6
Please login to post comments