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
1718 sites
136 fans

We created another gamification plugin! Check it out here: Stash.

Please 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 sets Experience Points (XP), MoodleCloud.


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 Athina Vasilaki
    Wed, 24 Aug 2016, 7:54 PM
    Hi Frédéric! Thank you for your prompt reply. It worked and now I can see all the XP of the users. I now have another question. Is there a way when we create our own rules to put a condition on the grade achieved? I have allowed multiple tries in the quiz so if you don't get 100% the first time it allows you to retry. However, this is unfair for the student who will manage to get 100% the first time as XP points are calculated on the event of quiz started and quiz ended. Thank you.
  • Picture of JOSE LUIS ANSÓ
    Thu, 25 Aug 2016, 1:13 AM
    Hello Frédéric! Congratulations for this plugin. Excellent work! The following maybe it is a stupid question, but I'm no able to configure properly the rules. Here it goes: I'm playing around with rules and would like to know whether there is a method to get points only the first time the user view/update/complete one activity. Example: after viewing a scorm module, the student gets some points, but second time should not get any additional point. The reason is that, otherwise, the user can access different levels just accessing a single scorm several times. Hope this question is not bothering you and people. Sorry for my ignorance.
  • Picture of Frédéric Massart
    Thu, 25 Aug 2016, 11:05 AM
    @Athina, and @Jose,

    Both your questions are related. First, it is not possible to attribute XP based on the result a student may have, this is not directly related to what you were asking but it is important to note. The plugin was designed to reward students based on their actions, not on their achievements.

    That being said, it is not either possible to check how many times they have accessed something and change the rules accordingly. You are not the first to request such behaviour so I may try to implement it. Meantime I don't really have a solution. I wanted to look at developing a "Quest" plugin which would allow teachers to set complex rules for 1 time rewards (as XP, and other things) but I haven't had time for it yet.

    Current, I am working with Adrian Greeve on "Stash" (, another plugin you can use to gamify your courses.

    I hope this answers your questions.

  • Picture of Eddie Whittingham
    Wed, 7 Sep 2016, 5:52 PM
    LOVE this plug-in. One quick query,is there a way to change the 'cool, thanks' message to something else?
  • Picture of Frédéric Massart
    Thu, 8 Sep 2016, 10:51 AM
    Hi Eddie. No, not at this stage, but you can customise your language back to rephrase the string _coolthanks_ to whatever you like.
  • Picture of Juanma Campos
    Sat, 24 Sep 2016, 11:20 PM
    Hello everyone. Could anyone tell me how to disable \core\event\course_viewed so that it doesn't add points when the event occurs. I can't find how to do it. Thanks in advance and congratulations for the plugin.
  • Picture of Frédéric Massart
    Tue, 27 Sep 2016, 3:43 PM
    Hi Juanma, simply add a rule, on top of all the other ones, which attributes 0 for that specific event.
  • Picture of vag kats
    Fri, 30 Sep 2016, 5:04 PM
    The Rules tab opens a blank page for me..
    Is there something i can do to fix this?
    I am using moodle version 3.1

  • Picture of vag kats
    Fri, 30 Sep 2016, 5:25 PM
    Hello again..
    The above issue was due to the fact that Level up! was set to the "whole site".. When i set it back to "a course" rules tab was properly workin.
    So.. i can't create custom rules regarding the whole site?

  • Picture of Frédéric Massart
    Fri, 30 Sep 2016, 5:32 PM
    That looks like a bug, could you please raise a ticket at: Thanks!
  • Picture of vag kats
    Fri, 30 Sep 2016, 6:42 PM

    Just like Juanma Campos, i would like to to disable or change the \core\event\course_viewed event.
    I tried out 2 things.

    1. I created a new rule: (event CRUD is equal to 'r' assign 1 point) --> this doesn't seem to "override" the default rule about event CRUD is equal to 'r'.

    2. I created a new rule: (Event action is equal to course_viewed assign 1 point) --> it neither worked.

    Any ideas?
  • Picture of hai quang van
    Mon, 24 Oct 2016, 9:27 PM
  • Picture of Kazuya Toyoshima
    Wed, 14 Dec 2016, 4:02 PM
    is it work on PHP7.1?
  • Picture of Frédéric Massart
    Wed, 14 Dec 2016, 5:01 PM
    I have not tried myself. If you happen to try, could you let us know of your findings? Thanks!
  • Picture of Sergio Cardillo
    Wed, 18 Jan 2017, 10:47 PM
    Hi Frédéric, thank you for your work!
    I've a silly problem: I add the block to my course, so I see it in my course home when I have the administrator role. If I change my role to the student's one the block disappear. How can i fix it? Can you help me please? Thanks!
1 2 3 4 5 6 7 8 9 10 11 12
Please login to post comments