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
1736 sites
146 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 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!
  • Picture of Valentin Olivier
    Wed, 1 Feb 2017, 3:42 PM
    Bonjour Frédéric,
    j'ai paramétré le plug-in pour s'appliquer au niveau du site au lieu du cours. Mais du coup, je cherche à établir des règles qui prennent tout de même en compte la localisation des activités ou ressources ! Il semble qu'il soit impossible de préciser que pour un événement donné, on souhaite l'appliquer en particulier à une activité précise d'un site précis. Est-ce bien le cas ? Ou j'ai raté un truc ??
    Merci de votre réponse, et félicitations pour cet outil particulièrement puissant !
  • Picture of Frédéric Massart
    Wed, 1 Feb 2017, 11:46 PM
    Salut Valentin,

    Oui, c'est bien le cas, vous n'avez rien raté. Ce n'est pas possible d'ajouter des règles sur bases d'activités qui sont dans un cours autre que le "Frontpage" lorsque le block est utilisé pour le site entier. Ce n'est pas impossible à faire, à coder, mais je ne pense pas pouvoir dédier du temps à cela dans un future proche.

    Please feel free to raise an issue at to see if others are also interested in this.

  • Picture of Valentin Olivier
    Thu, 2 Feb 2017, 5:36 PM
    Merci pour votre réponse Frédéric ! Bon, pas grave, on va essaye de contourner ça...
    Dernière question et promis je vous laisse tranquille... smile j'essaye de comprendre la manière dont est alimentée la table des logs du bloc. Dans quel(s) fichier(s) s'effectue cette "sélection" ? Je cherche à ajouter des points d'XP lorsque Moodle décerne un badge, mais cet event ne remonte pas dans les logs du bloc, et je cherche à l'ajouter !
    Un grand merci pour votre aide et votre contribution !
  • Picture of Frédéric Massart
    Thu, 2 Feb 2017, 5:45 PM
    Ceci est dû à la nature de l'event "badge_awarded". Il est de niveau "Teaching" car l'action est prise par quelqu'un qui n'est pas l'étudiant. C'est un event qu'on peut qualifier de passif comparer à tous les autres qui sont déclenchés par l'étudiant même. A ce jour je n'ai pas de solution pour vous car le but du block était de récompenser l'étudiant de manière instantanée et non différée. Sorry!

    Though note that I'm available for hire if you need the functionalities to be extended. smile
  • Picture of Valentin Olivier
    Fri, 3 Feb 2017, 10:41 PM
    Merci pour toutes vos réponses. J'ai regardé tout cela, et en effet, les bidouilles que j'ai du effectuer pour arriver au bon résultat sont vraiment trop craignos... on va donc en rester là ! Un grand merci pour votre aide. smile
  • Picture of Dan Studebaker
    Tue, 7 Feb 2017, 11:14 PM
    Has anyone found a way to stop the students ability to log in and out to and gain XP on events that they have already visited in the same 24 hour time period. This is a great mod, but I have student that have cracked the code so to speak on getting points on the same activity over and over regardless of the time cheat blocking that I set. Also a complete list of event names in long form would be a great addition of information for people wishing to narrow the focus on awarding points, say on competition of lessons and not just for answering a question in a lesson.
  • Picture of Hermógenes Figueroa
    Wed, 15 Feb 2017, 10:38 PM
    Hello, I'm using the plugin "Level up". I want to give points to my students only when they score more than 80% in a quiz, Is it possible?
  • Picture of Frédéric Massart
    Mon, 20 Feb 2017, 10:32 AM

    Not at this stage, but some other people are interested in this feature. Please comment with your thoughts and support on

  • Picture of Frédéric Massart
    Mon, 20 Feb 2017, 10:33 AM
    Dan, there is an issue to make the cheat guard more resilient to students' trickeries: Feel free to comment with your thoughts and support.
1 2 3 4 5 6 7 8 9 10 11 12 13
Please login to post comments