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




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 Iñigo Zendegi Urzelai
    Tue, Mar 17, 2015, 9:33 PM

    I've installed the ranking block (version 2014022400) in Moodle 2.8.5 over PostgreSQL, and added the block to a course with activity completion tracking enabled and some activities marked to be completed to complete the course, but when a student completes some of those the block still shows "No students to show" message.

    I've done a little research and I think that cron does not update the block status as long as:

    - I don't see any scheduled tasks about this ranking block
    - I don't see any trace on the cron log about this block

    I am really interested on trying this plugin, if there is more tests I can do to help, please tell me.

    [Off-topic]: Inside the plugin folder there is a copy of the plugin itself called 'moodle-block_ranking', I think it should be removed.
  • Picture of Willian Mano
    Tue, Mar 17, 2015, 10:01 PM
    Hey Iñigo Zendegi Urzelai, Thanks for your reply. I've uploaded a new version without the subfolder. About the postgres, it is an issue, the block it's not compatible with that SGBD. I'm developing right now a new version of the plugin with new features and totally compatilble. I wish...
  • Picture of Willian Mano
    Tue, Mar 17, 2015, 10:03 PM
    Hartmut Scherer, I did not know about FERPA, i will read about it..
  • Picture of Iñigo Zendegi Urzelai
    Tue, Mar 17, 2015, 10:16 PM
    Thanks for the quick reply, Willian, I'll be waiting for that new version!
  • Picture of Willian Mano
    Tue, Mar 17, 2015, 10:33 PM
    rsrsrs. i'm on line right now. ;)

    You can check the new version under the github:

    Now you only need mark the activities completion, don't need go to course completion and select the activities. Now the plugin get all activities with completion rules. I removed unecessary table and complexity and add the weekly, monthly and general ranking. xD

    I'm right now creating an area with more detailed infos about the students and points received

    I'm thinking in more ideas like levels and badges... ;)
  • Picture of Chris Petch
    Tue, Apr 21, 2015, 1:57 AM
    Hi William,

    I have two courses with activities marked as contributing to the ranking. Can I have separate ranking for each course or is the ranking only on a per student basis? I ask this because I have a ranking block in each course and all students have the same scores in both courses. Surely they have different completion criteria so should have different scores?

    Otherwise a great plugin! My students love it!
  • Ricardo Caiado
    Thu, May 14, 2015, 1:38 AM
    Prezado Willian,

    Estou usando a versão 2.8.5+ e o cron está retornando a seguinte mensagem:

    "Processing cron function for ranking....... used 12 dbqueries
    ... used 0.074506998062134 seconds
    Task failed: Erro ao ler a base de dados"

    Você teria ideia do que pode estar causando isto, uma vez que é só com ele que eu tenho este erro de leitura da base de dados?


  • Picture of Willian Mano
    Sat, May 16, 2015, 2:10 AM
    Hey Ricardo, what SGBD are you using?
  • Picture of Brian Rigwald
    Sat, May 16, 2015, 2:19 AM
    I am exploring plugins like this one to try an gamify my Global Studies 8 course. One feature that would be very motivating for my junior high students is an individual rank. We often play a game called Kahoot ( and after each question, the top 5 players are posted on main screen, but each student's screen shows their overall rank and who is 1 place above them (and possibly 1 place below them). It builds a competition amongst all the students, especially when the top is dominated by very strong students. Is this something that could be incorporated into this block? Show the top 5 and then "Your Rank:" and then show who is above them (and possibly below them). Students in a Kahoot game see how many points the student above them have to be able to say, "I need XXX points in order to pass Johnny."

    It would also be great to possibly turn off the global ranking portion. While we can use that when playing a game, I am not sure how student privacy rights would play in if we posted the top XXX students publicly. When we post our grades in class, we do it by student id numbers so students can't see each other's grades. Successful students might not want their name on the a global scoreboard.

    Thanks for listening! smile

    Brian Rigwald
    Global Studies 8
    Century Junior High
  • Picture of Willian Mano
    Sat, May 16, 2015, 3:30 AM
    That is a very good idea. Unfortunately, i'm very busy, but i will implement something like this to the new version. You can check the new version on github.
  • Picture of Willian Mano
    Sun, May 17, 2015, 2:45 AM
    Do you like this?

  • 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.
1 2 3 4
Please login to post comments