Friday, May 3, 2013

The anatomy of a Moodle system


Moodle core provides all the infrastructure necessary to build a Learning Management System. It implements the key concepts that all the different plugins will need to work with. These include:

Courses and activities:
A Moodle course is a sequence of activities and resources grouped into sections. Courses themselves are organized into a hierarchical set of categories within a Moodle site.

Users:
In moodle, users are anyone who uses the moodle system. There are several categories or roles into which the moodle users can be categorized like:

  • Students
  • Teachers
  • Administrator (More types of users can be created in moodle but these are the default ones)
User functionality in moodle:
  • User roles in moodle: A role is an identifier of the user's status in some context. For example: Teacher, Student and Forum moderator are examples of roles.
  • User's capabilities in moodle: A capability is a description of some particular Moodle feature. Capabilities are associated with roles. For example, mod/forum:replypost is a capability.
  • Context: A context is a "space" in the Moodle, such as courses, activity modules, blocks etc.
  • Permissions: A permission is some value that is assigned for a capability for a particular role. For example, allow or prevent. 

Added facilities provided by moodle:  
  • Creation and editing of user profiles: In moodle, the moment an user creates his account, a profile is created for that user. The user needs to fill in his initial details for completing his profile. The user generally always have the permission to edit his own profile anytime on moodle.
  • Groups and cohorts: Cohorts, or site-wide groups, enable all members of a cohort to be enrolled in a course in one action, either manually or synchronised automatically.
  • Enrolments and access control: Users are generally enrolled into some courses and according to their permission settings and the groups to which they belong, they have limited access on moodle.
A bit more about moodle:
  • Activity and course completion:
    The activity completion system allows activities such as Quizzes, SCORM modules, etc. to be marked complete when specified conditions are met.
  • Navigation, settings and configuration:
    The Navigation block provide easy access to view various sections of the Moodle site and includes:
    •  My home - a personalised home page displaying links to the courses a user is associated with and activity information (such as unread forum posts and upcoming assignments)
    • Site pages - links to site pages and resources from the front page of Moodle
    • My profile - quick links allowing a user to view their profile, forums posts, blogs and messages as well as manage their private files
    • My courses - lists (by course shortname) and links to courses the user is associated with. Click the course's shortname to view the front page of the course or use the arrows to navigate quickly to a specific section, resource or activity.
  • JavaScript library:
    Moodle has adopted the Yahoo User Interface library. There is also a nice system for loading the additional JavaScript files required by each page.

Upgradation of moodle
Moodle can be upgraded in four simple steps:
  1. Make sure that your server can run the lates Moodle version
  2. You should always be prepared to "roll back" if there's an issue with your data or some custom code you've     added. So before comitting, create a test install and always make backups.
  3. At this stage you can replace the Moodle code on your server with the version you downloaded and check for     the plugins.
  4. Perform the upgrade by triggering the upgrade from the admin page.
    (More information abour upgradation can be found here : http://docs.moodle.org/23/en/Upgrade_overview)
Logs and statistics in moodle:
  • Statistics in moodle: The statistics graphs and tables show how many hits there have been on various parts of your site during various time frames. They do not show how many distinct users there have been. They are processed daily at a time you specify. You must enable statistics before you will see anything.
  • Log in moodle: Logs in Moodle are activity reports. Logs are available at site level and course level.

Monday, April 29, 2013

An awesome day...in the most imperfect way!!

You can never call a day to be a happy one when your closest friend is leaving the town and moving out. But my day, today, had more challenges for me, than dealing with this emotional stress.

The morning seemed to be going great initially. My best friend had his train at 3.15pm....he was leaving the town forever and I was all set to bid him a happy farewell with a sweet goodbye. I had booked him a cab at 2.15pm and had decided to help him out with his horribly large amount of luggage. Well, my first mistake- should have booked the cab at 2pm instead of 2.15pm and not waited till 2.30pm before realizing that the cab was never going to arrive!
When the cab didn't arrive till 2.30pm, restlessly I did rush out to get two autos (one auto couldn't have had accommodated the huge number of bags and their awesome sizes). Well, thanks to Pune auto drivers. They never seem to be ready to go where the passenger  wants to go, they have their own choice of travel destination! After a good struggle of 15 mins, I finally did manage to get two autos. 
2.50pm...luggage loaded and off we went for station. The journey from Model Colony to Pune Railway station is that of 30 mins (average)....and we had some 25 mins in hands before the scheduled time of the train's departure. I could feel every throb of my heart! Tension was building up. There was kind of a mixed feeling here. Will not disagree to the fact that one selfish part of me really wanted him to miss his train, so that I could get to spend some more time with him in Pune. But then again, the practical and good side of me didn't want him to suffer (well, mostly a waste of time and a huge loss of money would be the highest degree of suffer I am referring to here). My friend and I were in separate autos and I didn't have the guts to call him up and ask him his state of mind at that moment. Every time our auto would get stuck in a traffic jam, my heart would miss a few beats!
3.12pm....still stuck in at the entrance of the railway station. The train leaves in 3 mins. I had almost given up on all hopes of catching the train. 
3.13pm....just reached the station. The train was on platform 2 and we needed to travel till there (rather till the right coach), with all the bags. Hired two coolies and ran. I hardly remember the journey from the entrance of the Railway station till the train's entrance. We declined the staircase....coach number B5...needed to reach A3. B4, B3, B2, B1, H1, H2, Pantry Car, A1, A2 and then A3. It was 3.14pm.
This was one of those rare moments when you wished your train would get delayed by 5 mins. 
3.15pm....we had somehow managed to reach till A2, just a few more steps, when the train started to move. I suggested my friend to hop up. The experienced coolies managed to get the luggage up on a moving train. I almost threw all the luggage I had in my hands into the moving train. Well, the first breath of 'phew..its over' just made me realize that my friend's laptop sack (with his laptop still inside) was on my shoulder. I surely couldn't throw this one in. It was a struggle to hand the bag ALMOST safely to a passenger at the gate and request him to pass the bag over to my friend.
No goodbye, no time for sweet-talks. By the time the entire drama ended, the train had already started to speed up. All I could manage to scream was- 'Call me once you settle down in your seat!'

Part one ended. Part two begins:
The coolies had to be paid. Thanks to all the commotion in which I had already spent out all the possible liquid cash I had in my wallet, I didn't have a single penny left in my wallet. I asked the coolies to follow me till the ATM so that I could withdraw some cash and pay them. As goes the famous saying -"It never rains, it pours." The Axis bank atm machine was out of service and the SBI one would give out only 1000rs notes (nothing less than that). I didn't have an option but to accept a 1000rs note. Now needed change to pay the coolies. I handed the note over to one of the two coolies and asked him to get a change. Well, here I needed to use THE weapon, which I generally don't like using much. I had to make a puppy face with a sweet smile before I could convince him. Sometimes I need to accept, had I not being a girl, the coolie would have only abused me with some slang instead of helping me out. In this case, he asked me to wait in the shade and went someplace to get change. I paid them off. Phew over!

Part two ended. Part three begins:
I boarded the bus from Pune station to get back to Model colony. The Pune afternoon heat makes it impossible for people to come out of their houses which resulted in an almost empty bus heading to its destination. My coolie had given me changes which contained only 100rs notes (of-course no one will ever give me change in currency value of 10s against a 1000rs note). I handed one of the 100 rupee notes to the conductor for the ticket. He asked me for change, I didn't have any. The conductor said -"Madam, mai kahase du aapko change. Fir aapko last stop tak jana padega. Wahase hi change karwa sakta hoon mai (translation- Madam, where do I give you change from? You have to travel till the last stop. I can get you change only from there). Well, probably that was the only thing left to have happened. I again had to make an innocent face and plead to get me the change somehow as I couldn't travel till the last stop at any cost. Again the girl factor worked. Before my destination arrived, he did get me the exact change and handed it over to me with a smile. Not only that, when I finally did get off the bus, he even did wave a good bye to me!

I had a few more things which I thought I would get done before returning home, but the entire experience told me that nothing doing was safe at the moment. Whatever I would do, would only mean another experience added to my day's list! I quietly headed home.

Monday, April 1, 2013

Why Mozilla?

Why did you choose to contribute to Mozilla? Do you get paid from Mozilla for doing all these work?.....there are several similar questions which we volunteers often come across during several events.
Today, I am gonna share my story of 'Why Mozilla'!


I still call myself a newbie in the FOSS world. Its been just some odd 7 months since I got involved with Mozilla. The college I belong to is one of the rare Indian colleges where students are always encouraged to become FOSS enthusiasts and FOSS contributors. My first instincts to contribute to the Open Source world came from and because of my college. It was through my college seniors (who were Mozilla Representatives) that I got my first chance to peep into the Mozilla world. 
The very first MozCafe meeting that I got a chance of attending was sufficient for me to know that this was one group I would surely like to work with. The style of work, the thought process of the people there and most importantly the intention of work, everything impressed me to a great level. That was just the beginning. The next big event I got to be a part of was the MozCarnival which was hosted in our college. Well, this was the first event for me, where my role was not that of an audience but that of an organizer. I got to meet several other Mozilla Reps and mentors during this event. The best thing that happened (to me) during MozCarnival was my introduction to the WoMoz community. I was asked to speak about WoMoz during the MozCarnival and my research on the topic got me involved with the WoMoz community in a way that after that one track that I hosted during MozCarnival, my friends started calling me a feminist (that intense was the effect on me) :P

Once I got involved with the community, I just couldn't keep myself away from it. Became a Rep, started working with other Mozillians and before I even realized, I was totally in love with Mozilla. My involvement with Mozilla is just seven months old, but within this little time, the attachment is so much that not being a part of Mozilla is something I cannot think of now.

Saturday, March 30, 2013

Being a Wikimedia intern

Am almost at the end of my four months long journey with Wikimedia Foundation that began on the 2nd of January when I started my OPW internship under this organization. The summary of all my work, done in these 4 months can either be found on my earlier blogs. The links to all the documentation done during my work phase are here:

[1]Documentation against getting the 'Cite' option on your MediaWiki
[2]Documenting noteworthy local templates

I have had edited Wikipedia pages, translated content from English to Bengali Wikipedia, had contributed to Mozilla in several ways but never had done any prominent work in Open Source till before OPW. For me, OPW was the perfect platform where I got to upgrade myself from being a FOSS enthusiast to a FOSS contributor. 
We worked from different parts of the globe, but still worked together. I was here in India, my mentor in Israel and all the other Wikimedians who came to my help when I got stuck, I don't even know which place of the world were they helping me from. This awesome networking was something that impressed me most throughout these four months. The mailing list etiquette and IRC rules were known to me, but their implementation happened most in the last few months. 

My project was one that dealt with the fact that each Wikipedia has its own CSS styles, JS gadgets, and templates. It's most a good thing, because it gives each language community the freedom to customize and innovate. But there's also a problem: these things may be useful in other languages, too, and it's hard to port them. Most MediaWiki developers are aware of the customization in the language they speak - mostly English, and to a lesser extent German, Dutch, Russian and French. And they aren't even aware of the useful developments in other languages. And they may not be aware that a customization that works in their language is not available in other languages. I was to help Amir (my mentor) in achieving this goal of documenting some local templates so that irrespective of language, MediaWiki platform remained the same. I began my work with documentation, but soon when my mentor realized that my JavaScript knowledge was kind of stronger than he had expected, he wanted me to move from documentation to coding. Now, instead of simply stating which codes needed to be changed to change some feature, we moved to making the appropriate changes in the code. Though I started with coding, the documentation work was never forgotten. My mentor made sure that I documented each step during the process of making those changes. 

Its such an awesome feeling when we get to see our work taking live forms and our changes being used by innumerable users on any Wikipedia platform. Whenever I go to Bengali Wikipedia now and see that the Edit toolbar has the 'Cite' option working properly, I feel so good and so much encouraged to keep making such contributions to FOSS.

During the tenure of my internship, I also got an opportunity to work with Sumana and help her in the preparation of the Wikimedia engineering report for the month of February. That was another great learning. How these reports are generated, how the stats are obtained and all was fun to explore. I did struggle a bit at places and even the output was not a very impressive one, but the learning from it was really great.
The entire course of these four months were filled with learning, moments of success, moments of failure, getting to know people, getting a chance of working with people, getting to know the community structure of Wikimedia and how it works and so much more. Though the official tenure of my internship is at its end, I will never ever wanna miss a single opportunity of getting a chance to work with Wikimedia Foundation again :)


Wednesday, March 20, 2013

Finally getting the Citation feature up on Bengali Wikipedia

Well, I am happy to announce this good news for all my Bengali Wikipedians. 
After working on it for months, after several local implementations followed by User page implementation of the 'Cite' option, I have finally been successful in getting the option up on Bengali Wikipedia. 
Well, what this option is and how to get it up on any Wikipedia can be found here.
Here, I will talk about my experience of community interaction and getting the job done. Well, I began the community interaction (actually begging for help) through the community india mailing list. My idea initially was to get some response from someone who, even if unable to directly help, could guide me as to where to get help from. I actually needed either the admin rights to some Wikipedia to push this option up or needed help from some admin who could do this work on my behalf. Not waiting for the replies, I also started looking for the admins on different Wikipedia(s). Well the Special:ListAdmins option of Wikipedia did help me a lot here ;)

From the list of admins on Bengali Wikipedia I found Jayanta Nath, who came to my rescue! After a little bit of convincing, Jayanta da was all ready to help me get this job done. I sincerely thank him for all his help. Now, all Bengali Wikipedia users will get the 'Cite' option on the edit toolbar just like the English Wikipedia editors.



The job is yet not done, I need to get the same feature on a few other Indic Wikipedias. The convincing job is not always that easy. Some struggling is on to explain people that this actually works. Well, I hope I will soon be able to convince a few more admins and get this feature up on a few other Indic language Wikipedia(s).

Tuesday, March 12, 2013

Getting the Citation template in your own language's Wikipedia

There is a 'cite' option available in the English Wikipedia's Wiki-editor which is missing from most other language's Wikipedia. How to get this option on your own language's Wikipedia can be found here.
Once, you have the 'Cite' option placed, you will see that the options you are getting under the Cite-template are all in English. Now, its an obvious thing that in your language's Wikipedia, you will not want to have a Citation template which shows options in English, you will want the options to come in your own language. 
Now, I have done it for Bengali Wikipedia, and here is how I got the citation template and its options in Bengali for the Bengali Wikipedia.
There is one page which we will need to create under our userpage named: 
User:UserName/RefToolbarMessages-en.js. 

Well, instead of Messages-en.js, we are free to use anything else like Messages-bn.js etc but we just need to make sure that wherever this page is being called from, the name is rightly placed there.
In this file, there are the set of strings which needs to translated. Once all the strings of this page are translated into the local language, the Citation template in ready to go, in the local language. The work is this simple. No more modification is required anywhere else.


Successfully getting the 'citation' option on Bengali Wikipedia

Well, the struggle has been really long going but finally got it to work! Finally I did manage to pull the 'Cite' option (the one which exists in English Wikipedia and was missing from Bengali Wikipedia) into Bengali Wikipedia. Unfortunately, I do not have admin rights to bn.wikipedia.org, so I couldn't get it get in on the Edit toolbar for all users, but could obviously manage to get it for my own Edit toolbar and am surely in a state where I can help other users get it on their respective Edit toolbars by just adding one single line in their common.js files.

Well, what I did to get it up and running is as follows:

  • In my common.js file, I imported a few other js files like:
    • RefToolbar.js
    • RefToolbarMessages-en.js
    • RefToolbarBase.js
    • RefToolbarLegacy.js
  • I created all these js pages under my user-name like User:Priyanka Nag/Reftoolbar.js, User:Priyanka Nag/RefToolbarMessages-en.js, User:Priyanka Nag/RefToolbarBase.js and User:Priyanka Nag/RefToolbarLegacy.js.
    These pages are already present in most wikipedias and if that is so, we may not need to create them under our user-page separately. But, in either case, making sure that these files, which are dependent on each other, are being called properly i.e. if RefToolbar.js is calling RefToolbarBase.js, making sure that its calling User:Username/RefToolbarBase.js or MediaWiki:RefToolbar.js (as the case may be) is vital.
  •  Once all the pages are in place and called properly, we just need to do a hard refresh. If all works properly, we are expected to see the 'cite' option on our Edit toolbar.
  • Now, initially if all these JavaScript files are copied from English Wikipedia, the citation template is also expected to be in English. How to change these options to your own language can be found here.
If anyone wants to use the same option in Bengali Wikipedia, you need to simply do the following:
  • Under your common.js page (i.e. User:YourUserName/common.js), simply put the following line of code:
Once saved, this code will simply import my common.js file which in-turn will import all files necessary to get the citation template working. Now, since my common.js file already has all the other js files in place (in case of bn.wikipedia.org), one doesn't need to create them again separately. For all other Wikipedias but all the above steps will be required.