Keen Learner

The tale of a thirsty mind

Riding the memory lane… — August 18, 2016

Riding the memory lane…

I knew that this day will come , when I will look back and reminisce about the great time I had with the WikiToLearn family ( ❤ ) during the course of my Google Summer of Code 2016 project : WikiRatings.



So on February 26,2016 I texted Davide about my interest in one of the WikiToLearn projects. I got an immense amount of support from the community as well due to which I was able to prepare a good proposal and finally got my project selected for GSoC-2016

Selection Chat


Now all I had was a terrific opportunity to completely transform my work ethics and take my technical temperament to a next level because the people I was (still am and will be ❤ ) working were the respective domain experts and always motivated me to come up with my own ideas .

Today, when I look back I realize how extraordinary my last 3 months were! It was like a proper exposure to the production level development. I interacted with my mentors on daily basis and they too were regular with their work. They constantly gave me useful reviews and helped me to think in the right direction. Over this period I have developed a great bonding with my community (We joked about stuff like how buying a MACBOOK will turn me into a bad boy. LOL! ) .

WikiToLearn community is one of the most supportive organisation I have ever worked with. The environment was(certainly is and will be ❤ ) so healthy and passionate that I never felt that I was working , it all felt like a leisure pursuit.Due to this fact, I was able to deliver the major components of my GSoC project(WikiRating Video Demo) , so my current TODO list looks like this:

  • Construction of a Rating Engine that can assess the quality of a Page on WikiToLearn platform.
  • A MediaWiki Extension that serves as the User Interface and collects votes as well as displays Page Ratings.
  • Code cleaning and documentation.

Right now I am back to my college, I am doing some mild code cleaning.A new chapter is about to begin. Gradually everything will come back to it’s previous state: Classes, Assignments,Friends and maybe I will get even busier eventually, but once in a  while whenever I will look back I am sure to find my WikiToLearn family holding my hand.




Tip of the iceberg ! — August 6, 2016

Tip of the iceberg !

So we have previously seen how Davide, Alessandro and I designed the Rating Engine for our  WikiRating:Google Summer of Code project. Now this is the time for our last step , that is to connect the engine to the Website for displaying the computed results and for providing voting functionality to WikiToLearn users.

In MediaWiki additional functionalities like this are added via extensions. You can think of extensions in the literal sense too as something that provides some extension points on the top of the current code base. This make the life of developers easier since by using extensions we can add new code in a modular fashion and thereby not much fiddling with the Wiki code base.

So now I needed to write an extension that can the following:

  • Fetch the information about the page being viewed by the user.
  • Allowing the user to vote for the page.
  • Displaying additional information about the page is user demands.

So with the following things in mind I began to analyse the basic components of a MediaWiki Extension.


So besides the boiler plate components that required minor tweaking extension.json , modules , specials are of our interest.



This JSON file stores the setup instructions for instance name of the extension, the author, what all classes to load etc.



The module folder of our WikiRating Extension contains these 2 components:

  • resources: where all the images and other resources are stored.
  • wikiRating.js: A java script file to fetch, send and display data between the engine and the Website instance.

It is the wikiRating.js script where we wrote most of our code.



This folder contains a php script whose function is display additional information about the page when asked for. The information will be passed to the script via the URL parameter by our master script (wikiRating.js).

So the final step(or first step !) is to enable our extension by adding this to LocalSettings.php file in the WikiToLearn local instance.

wfLoadExtension( 'WikiRating' );

So now it is the time to see the fruits of our labour:

Basic information about the page
Additional information about the page 

So this is how the output of our engine looks , subtle like a tip of an iceberg 😛