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
3247 sites
277 fans

Version  Moodle  Favourites  Say Thanks!

Our website dedicated to Level up! is here.

Please support this plugin: add it to your favourites, star it on GitHub, or purchase the add-on!

What's new?

  • Group leaderboards with Level up! Plus.
  • Support for GIFs and SVGs level badges

Feature request and bug reports

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


  • Automatically attributes points to students for their 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 leaderboard to display the ranking of the students
  • Ability to customise the number of levels, the points they require and their appearance
  • Total control over the points earned per action
  • Unlock content when a certain level is reached
  • Experience points earned per course, or for the entire site
  • Support for shortcodes to include in content
  • GDPR compliant

Level up ! Plus add-on features

Purchasing the Level up! Plus add-on unlocks these features:

  • Group leaderboards
  • Mobile app support
  • Activity completion support
  • Course completion support
  • Resilient cheat guard
  • Limit learners rewards in time frame
  • Additional default level badges
  • Substitute experience points for other symbols
  • Viewing the block on someone's profile displays their level
  • Download the report
  • Email support

Visit our website for more information on Level up! Plus.

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! > General settings". Once set, any block newly or previously added will display the total experience points of your students.

How to unlock content at a certain level?

Please refer the Level up! documentation.

How to unlock a course at a certain level?

Please refer the Level up! documentation.

Shortcodes supported

What are those? Shortcodes can be used in text editors throughout Moodle to include or modify the content. The plugin Shortcodes must be installed to enable them.

Level up! comes with shortcodes display the learner's level badge, their progress bar, or even the leaderboard anywhere you like. Shortcodes can also be used to conditionally display content according to a learner's current level. For a list of available shortcodes and their documentation, please refer to Level up! documentation.

Provided by
Branch Up


This plugin is part of sets Experience Points (XP), MoodleCloud, Gamification.


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


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
    Thu, 17 May 2018, 10:23 AM
    Hi Onno. No, at this stage this isn't possible. Cheers! Fred
  • Picture of Mohamed Atia
    Mon, 21 May 2018, 4:01 PM
    Hi All,
    I am trying this plugin on Moodle 3.4.2 installed on windows and the database is MSSQL.
    I added the block to a course and when pressing any link including ladder and settings I got the below error

    Coding error detected, it must be fixed by a programmer: Controller for route not found.

    More information about this error

    ×Debug info:
    Error code: codingerror
    ×Stack trace:
    line 95 of \blocks\xp\classes\local\routing\router.php: coding_exception thrown
    line 79 of \blocks\xp\classes\local\routing\router.php: call to block_xp\local\routing\router->get_controller_from_request()
    line 38 of \blocks\xp\index.php: call to block_xp\local\routing\router->dispatch()
  • Picture of Frédéric Massart
    Mon, 21 May 2018, 4:05 PM
    Hi Mohamed,

    This must be caused by a misconfiguration of nginx, please refer to the following thread:

  • Picture of Mohamed Atia
    Tue, 22 May 2018, 3:29 PM
    Hi Fredweic,
    Thank you for your response, I will follow up the link and will update you,
  • Picture of Mohamed Atia
    Thu, 24 May 2018, 5:52 PM
    Hi Frédéric,
    I followed the URL but I can't see any guides for windows and IIS, do you have a direct link on how to apply this in windows and IIS?
  • Picture of Frédéric Massart
    Thu, 24 May 2018, 6:01 PM
    Hi Mohamed. I'm not familiar with IIS, but according to this documentation (, the problem should solve itself by using a rewrite rule such as: {R:1}\?_r={R:2}
  • Picture of Mohamed Atia
    Thu, 24 May 2018, 6:57 PM
    Hi Frédéric,
    I had applied the URL rewrite rule and restarted the IIS, but still having the same error.
    a screenshot of what I did here

    any Idea how to troubleshoot this?
  • Picture of Frédéric Massart
    Thu, 24 May 2018, 11:01 PM
    This does not include the rule I suggested to use. The alternative is to disable slasharguments altogether.
  • Picture of Mohamed Atia
    Sun, 27 May 2018, 1:42 AM
    Hi Frederic,
    I created a new rewrite rule you can check it here!Amdk-vbboLpgh0qcGTN2p81i8R60 and I also made a test pattern shown in the screenshot is that the expected values for the rewrite?
  • Picture of Mohamed Atia
    Sun, 27 May 2018, 2:11 AM
    Hi Frederic,
    It is now working fine for me
    the pattern should be ^(blocks\/xp\/[^\?]+?\.php)(\/.+)$
    and the rewrite URL should be {R:1}?_r={R:2}
    screenshot below show the correct rule for the workaround!Amdk-vbboLpgh0taTJqtwiOcaXFE

    Thank you for your help smile

    this rewrite {R:1}\?_r={R:2} is not correct
  • Picture of Phuong Hoang
    Thu, 19 Jul 2018, 6:16 PM
    Hi Frédéric,
    Thanks a lot for combining Level up with Shortcodes. Brilliant! Finally I can display Ladder directly in html block. However, it would be great if ladder could be displayed more neatly or directly in Level up blocks instead of redirecting to a page.
    - my screenshot:

  • Picture of Frédéric Massart
    Thu, 19 Jul 2018, 6:18 PM
    Hi Phuong, thank you for your feedback, we will consider it for future upgrades. Feel free to raise issues on Github if you have other concerns. Thanks!
  • Picture of Frédéric Massart
    Thu, 19 Jul 2018, 6:21 PM
    Also, note that the shortcode xpladder is _not_ the just the top 5, it is actually displayed according to the current user. As you probably are an admin/teacher and are not ranked, you see the top students. If you login as the 20th student, the ladder will show students ranked from 18th to the 24th.
  • Picture of Raymond Frangie
    Mon, 30 Jul 2018, 11:55 AM
    Hi Frederic,

    Love the plugin! Thanks for the great work!

    Question - is it possible to grade a certain number of XP based on a grade received in a quiz?

    For example, a quiz will have 5 Grade Boundaries, being High Distinction, Distinction, Credit, Pass, Fail. Is it possible award say 10XP for HD, 8 for D, 6 for C, 3 for P and 0 for F?

    Appreciate the assistance!

  • Picture of Frédéric Massart
    Mon, 30 Jul 2018, 12:04 PM
    Hi Ray. Thanks for your kind words. Not grade-based rewards are not supported at the moment, but it's high on our priority list!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Please login to post comments