Alexey Novak (and the home cooked food that I am getting). His involvement has been great so far. Considering that he has a full time job- he manages to give me detailed code reviews after every single push. You can check our discussion here.
For the glossary, it was a bit of a longer task than I expected as the code was generated by the template unlike file storage and forums that I had worked on before. Naturally, I changed the default theme and made my AJAX functions in such a way that converting other themes would be easy. This was also the first change in ATutor, which would affect instructors exclusively.
When I started the GSoC, I was told by Alex to remember a few guidelines while writing the code and one of them was writing as little code as possible. There are two functions that I created in the process, which would have to be used extensively in the AJAXification of other features by others.
One of them, check_ajax_request(), is a PHP function to check the presence of an AJAX request. It has been placed under vital_funcs.inc.php under the include/lib directory. It takes no arguments and returns true or false depending on whether an AJAX request is present.
Here are a few things that I learnt.
Although new guidelines in ATutor state that we must use soft tabs of 4 spaces in place of hard tabs. Although you can change your .vimrc file to automatically do it for you, but if you make a single line change to an old file (which followed old guidelines), you would find that it changed your whole file. So, I needed to be careful while committing changes. That being said, any file that I created which involved copying logic from existing files (for adding AJAX behavior) had to be changed. Here is the command which does it. Don't run it on old files. As Alex said- You don't want to touch anything you don't want to touch!
for (i = 0; i < elements.length; i++)There are a lot of improvements in this simple statement and it would finally come out to look like this:
for (var i = elements.length - 1 ; i >=0 ; i-=1)For a detailed explanation of this, check this post.
Things to do next week:
Since we have completed a lot of work that I couldn't even imagine back when I was making the proposal, we have decided to give some other areas a brush up, since this project is for a UI Redesign rather than just AJAXification. Here are a few changes that I plan in the next week.
- Drop Down Menus: Another of my all time greatest tasks- drop downs. This time, I need to make them accessible though.
- FlipSwitches: There are a lot of enable-disable buttons in the system preferences. The end result that we are aiming- convert them to flipswitches. Needless to say, they need to be accessible.