Your Moodle version

Blocks: Ranking block

Maintained by Picture of Willian Mano Willian Mano
A ranking block to improve the gamification into the course.

Moodle Ranking block repository


This block improves gamefication into the moodle plataform.

This new version is more simpler and easy to use, but, with more visual.

The plugin works listening moodle events, so now, the points are added in real time.

The ranking works with the activity completion tracking, so you need to enable that and configure the criterias for all activities you want to monitor. The plugin only add points to activities with completion criterias. The method to add points remains the same.

There are different ways to gain points.

For example:

  • If a student completes a html page the ranking adds 2 points.
  • If a student completes an assignment and it is ended only when the student receive a grade. The ranking add 2 points plus the grade points to the student. You can configure the default points in the block configuraion.

NOTE: All the activities that needs grade to be finished will add the activity points (default 2) more the activity grade. For example: If the course has one assignment and it's configured to be completed only after the grade is received by the student and let's say a random student received by the end of the assignment 10(ten) as his grade. In this case that student will obtain 12(twelve) points, the 2(two pre-configured) from finishing the activity plus 10(ten) from his grade.

This only occurs with activities that have grades. ex: foruns, assignments, lessons, etc...

Update Notes

  • Added event listeners to add point
  • Removed cron dependency
  • Added a weekly ranking
  • Added a monthly ranking
  • Added a tiny report with top 100 students in general ranking
  • Added filter the tiny report by groups (the course group mode needs to be "separeted groups" or "visible groups")
  • Now you don't need configure the course completion tracking, only the activities completion criterias. Again, the plugin only monitors the activities with completion criteria
  • The table ranking_cmc_mirror was removed.


First way

  • Clone this repository into the folder blocks.
  • Access the notification area in moodle and install

Second way

  • Download this repository
  • Extract the content
  • Put the folder into the folder blocks of your moodle
  • Access the notification area in moodle and install

Post instalation

After you have installed the block you just add it into the moodle course.

The ranking block works together with the activity completion, so you need to enable that and configure the criterias for all activities you want to monitor. The ranking block monitors these activities and add points to the students based on accomplishing the activities.

Enabling completion tracking

  • Go to: Site administration / Advanced features
  • Turn on the item "Enable completion tracking"
  • Inside the course go to: Course administration / Edit settings
  • In the section Completion tracking set "Completion tracking" to yes
  • Save


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4


Picture of Willian Mano
Willian Mano (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Brian Rigwald
    Sun, May 17, 2015, 6:26 AM
    Hi Willian! Is that what I was suggesting? (I am not sure, since the student names are the same and it is a top 2 ranking.) I am guessing it is, since you added a ";)" to your message, hehehe.

    My questions must have inspired you to find time to play with it, eh?
  • Picture of Willian Mano
    Sun, May 17, 2015, 11:24 PM
    I've added the possibility to the student see her own points. That course have only two students, it's a test. I've changed the behavior, now the plugin works with moodle events, not with cron, now the points are automatically computed.
  • Ricardo Caiado
    Wed, May 20, 2015, 3:23 AM
    Hi William,

    I'm using Postgres 9

  • Picture of Willian Mano
    Wed, May 20, 2015, 4:26 AM
    Fala Ricardo Caiado, agora que vi que você é brazuca. smile

    Cara, acabei de subir uma versão nova do plugin, ta fresquinha. instala ela e vê se da tudo certo.
  • Picture of Brian Rigwald
    Fri, Jun 5, 2015, 2:35 AM
    Willian, I am playing with your block right now. smile I think it is something that I can use. Would there be a way to allow teachers, and not site admins, to edit the point values for items?
  • Picture of Maxim Khasiev
    Wed, Jun 10, 2015, 11:42 PM
    Hello Willian, thank you for this amazing block! I wanted to ask you one thing: when number of attempts is set for unlimited users keep gaining points for every attempt they're taking. Is there any way to add the highest grade only to the ranking?

    Thank you,

  • Picture of Willian Mano
    Thu, Jun 11, 2015, 7:49 PM
    Hey Brian Rigwald, i can't do it, cause this is a global configuration.
  • Picture of Willian Mano
    Thu, Jun 11, 2015, 7:55 PM
    Maxim Khasiev, i did it intentionality for one purpose. Maxim Khasiev, i did it for one purpose. When a student finish all activities he do not will gain more points, and then he no will more interact with the course. So, i use the quiz, with multiple attempts, to create an activity like a practice. He can repeat the quiz any time, and still gain more points. This is very good, cause he fixed the content and practice more, and studies more... Do you understood?
  • Picture of Maxim Khasiev
    Thu, Jun 11, 2015, 8:33 PM
    Thank you for your reply Willian. Yes, it makes perfect sense in terms of engagement after course is completed. However, one of the situations might be is that student who understood all the material well and have passed a quiz, for example, 100/100 from the first attempt might be not interested in passing the same quiz again, as they already great in this material.

    However, those who failed to gain 100 in the quiz for the first time would attempt it again, and, as a result, gain more points than those, who have done great from the first attempt. And as a result those, who failed first attempt and took another one would be higher in a ranking than those who performed better.

    Hope I made myself clear :D

    But thanks again for the great plugin!


  • Picture of Willian Mano
    Thu, Jun 11, 2015, 9:10 PM
    Yeah, i understood you. This is a good debate. In the first release of the version 2, the block added points only one time for each quizz, i changed to add multiple times.

    I can implement a global configuration to enable/disable add points for multiple attempts.
  • Picture of Maxim Khasiev
    Thu, Jun 11, 2015, 9:40 PM
    Oh that would be just perfect! Thank you so much! You're the best smile
  • Picture of Brian Rigwald
    Wed, Jun 17, 2015, 10:00 PM
    Does the multiple attempts also apply to SCORM packages and Games? When I tested it about a month ago, it only gave points the first time a student attempted a SCORM or game. I would want it to grant points every time they attempt it. Since SCORMS and games don't really grant points, the only points students can accumulate from them are through the "attempts" (Playing them). Having students playing the games (either Moodle games or SCORM packages), they reinforce their formal learning and should be able to earn points. If they want more points, they can play the games over and over again. Currently, you can set a minimal score in the SCORM / Game before it is marked as complete, to prevent kids from just guessing through them to get the points.
  • Picture of phuong hoang
    Tue, Jul 14, 2015, 3:33 PM
    Hi Willian,
    What a pity! I'd like to install this plugin in my site, but it seems not to work in my site. Students in my site mainly take quizzes and sometimes post in forums, no lesson, no assignment... Can you add more criteria such as quizzes to this plugin?
    I wonder why we only add ranking block to courses and why don't we add sitewide ranking block to the fontpage. Is it unnecessary or are we unable to make it?
  • Picture of Willian Mano
    Fri, Aug 14, 2015, 5:11 AM
    Hey maxim, i implemented a global configuration to allow or disallow add points to multiple attempts in quizzes.
  • Picture of Willian Mano
    Fri, Aug 14, 2015, 5:12 AM
    I've solved a very important BUG in how to save grades. Download the newest version to fix it.
1 2 3 4
Please login to post comments