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 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.
  • Sudeep
    Tue, Sep 22, 2015, 5:41 PM
    I've solved a very important BUG, how to take the actual rank set from admin/settings.php .

    Issue was: No matter what you set for each activity, it takes the default point hard coded in the source ie 2.
    File: classes/manager.php
    Method: add_default_points
    Change: trim($points) != ' ' ... to ... trim($points) == ' '
  • Picture of Tanya Duffy
    Thu, Sep 24, 2015, 11:14 AM
    Help please.
    The Ranking Block isn't working on my site 2.6. Installed fine without errors but doesn't update when assessments are graded.
    Have I missed a step?
  • Picture of Tanya Duffy
    Fri, Sep 25, 2015, 8:12 AM
    I've checked the cron job and it doesn't appear to be running the Ranking Block. This must be the problem, but I can't see how to fix this. I've enabled completion tracking, set up assessments as per video on youtube and no success. I install, uninstalled, going around in circles...
  • Picture of Willian Mano
    Wed, Sep 30, 2015, 1:27 AM
    Hey tanya, sorry for not answer before.

    The new version of the plugin uses the events of moodle. The cron is not necessary anymore. I will remove the video from youtube.

    Are you using moodle 2.6, can send me more information about your server enviroment, like database, php version...
  • avatar
    Wed, Sep 30, 2015, 8:06 PM
    Hi William,

    I have the same problem as Tanya. My moodle version is 2.6.11+, my server works with database Mysql version 5.1.56 and PHP version 5.6.5. I installed the last version of your plugin and I followed all the instructions you indicate above.

    Best regards
  • Picture of William Michael
    Sat, Oct 3, 2015, 1:47 AM
    Great work, Willian! One question:

    I installed the Ranking Block this week (works perfectly).

    However, it seems to only recognize tasks completed SINCE it was installed. Is there a way to update the rankings with ALL of the course data, or to refresh the course data to register on the ranking block?

    Thank you,
    William Michael
    Classical Liberal Arts Academy
1 2 3 4 5
Please login to post comments