Pages

Monday, July 9, 2012

Moving the Choose link to the left column of the file picker in Moodle 1.9


A milestone in Moodurian.blogspot.com! This is my 100th blog post and what a joy it is to contribute yet another hack for Moodle 1.9 community.

I want to thank firstly my dearest wife and companion, Ju Lee, for looking after the den and our two cubs, Leanne and Laura. Thanks for taking care of the kids while their father hunches over the computer fighting with php code and Moodle hacks. I'll wash the dishes and will put the clothes in the dryer once I take a break from the laptop, honey. And yes, I did water the plants today.

I want to also thank my boss, the Educator and Principal of Stamford College Malacca, Mr K. Naranasamy, for helping to finance the college's first Moodle server back in September 2010. Also not forgetting Mr U.K. Menon whose two words, "Try Moodle" back in 2008, started me on this journey.

A big shout out to my good friend Nicholas Walker of Montreal, Canada, for his strong interest in my work, for getting me to push the envelope, and for his moral support and good advice. Also for the use of his server, http://www.labodanglais.com to host my production Moodle 1.9.15 site. Thanks mate, you have been a catalyst for many a post on this site. I am inspired by your innovative, inquisitive and entrepreneurial spirit, and your ability to combine the three worlds of education, technology and business. I've had, am still having, a blast with your other websites virtualwritingtutor.com and chatbotmaker.com.

Another person I want to thank is the prolific Joseph Thibault of Moodlenews.com who churns out moodle newsbites at a dizzying rate of N posts per week. Small but meaty chunks of Moodle knowledge to keep us all up to date. Thanks for the believing in me enough to offer me the honour of being a guest author on the most visited Moodle news site on the planet.

Others on Moodle.org whom I would to thank are my colleague of Stamford College Malacca, Garry McIntosh (for being an active user of Moodle.com), Davo Smith (for many great plugins like the Realtime quiz, PDFupload, drag and drop, etc.), Itamar Tzadok (for ingenious CSS coding and advice on PHP), Mark Ward (Moodle 2.x Autohide plugin), Mary Cooch (for her Moodle books and so many crystal clear video tutorials which have set a bench mark for quality learning resources), Mary Evans (for so many great Moodle 1.9 and 2.x themes like Isometric and others), David Mudrak (for writing one of my favourite plugins - the Stamp Collection module), Matteo Scaramuccia (I was stuck, and he wrote a brilliant piece of code that made E-mail notification possible in the Stamp Collection module; and for writing the main working code that makes online users 'invisible'!), Paul Rayner for his excited and unrelenting requests for the enhancements on  Stamp Collection for Moodle 2.2 which led to my modified Stamp Collection code for Moodle 2.2(!), Gareth J Barnard (the course format expert, for reminding me of the perils of not attributing original authorship of a moodle plugin, LOL!), Michael Choong (for reminding me of how global Malaysians have become), Don Hinkelman (for his pearls of wisdom and enthusiam in all things Japanese and Moodle), Matt Bury for his wonderful Media Player plugin, which I use often, and many, many others. Other names I'd like to mention are Lewis Carr of Leeds for his work on Moodle 2.x. Others? Sorry if I didn't mention your name. If your name comes to my mind, I'll just re-edit this post.

Finally thank you Martin Dougiamas, for creating Moodle, the Learning Management System used by millions all over the world. And for heading the team that churns out major updates to Moodle every six months. Moodle 2.3 (at the time of writing), whatta great piece of software!

Okay, now onto the rest of this post!

Moodle's marching on strong with the release of Moodle 2.3. For those of you who have yet to migrate over to Moodle 2.x, here's another hack for the venerable Moodle 1.9. I've used this on my production site, mainly out of necessity. One of the issues I face with the file picker in Moodle 1.9 is that the Choose link is on the far right of the file name.


That's not really a problem when your file names are short. However, if a particular file name is unusually long, then the Choose link can be difficult to access. To be honest, in my classes, I often switch to 800x600 pixel resolution when projecting a Moodle course page on the whitescreen. So having the Choose link brought forward is really necessary for me.

The change seems trivial but wading through the code is not that easy. Anyway, here's how to do it. The code to modify is /files/index.php. Well, I managed to do it.

Check out the screenshots below which begin with the "Add a new resource or link to a website" resource.



Clicking on the "Choose or upload a file" reveals a file picker screen with a facelift! Viva la difference! You screen should now show the Choose link on the left. Mission accomplished.


To find out how I did it, go to this Moodlenews.com post. Enjoy!

Frankie Kam
Malaysia

Ratings and Recommendations by outbrain