I’d like to introduce you to a bug. It’s called MDL-16660. Not going to win any prizes for imagination there, I know, but for a long time it’s been the highest voted bug on the Moodle tracker. The bug was initially filed when Moodle 1.9 was the current version, and a user wanted to import a calendar to Moodle using the standard iCalendar format used by most calendar management software.
There were some pretty serious barriers at the time the bug was filed which meant it wasn’t going to get fixed in a hurry; Moodle 2.0 was being worked on, which represented a complete re-write of large parts of Moodle and completely new components of the system being developed. Moodle had support for exporting to iCalendar files thanks to a library called Bennu which had been written by a developer called Jon Papaioannou for adding this feature to Moodle, meaning it could serialise data into files, but not do the reverse, and was missing support for some of the format’s features. Jon had since left the Moodle project.
When a member of staff in my institution first asked me if we’d be able to import calendars from our Groupwise system into Moodle, I found this bug and set about writing a proof of concept to parse the files manually and insert records into Moodle’s database. This worked for us, but wasn’t going to work for everyone. At this point Martin Dougiamas, Moodle’s founder, made me aware of Jon and the Bennu library, so I set about investigating. Jon’s implementation of the iCalendar specification was incomplete, but the information I indeed to finish it was available, so I spent a couple of days finishing it off. Someone had also posted some example code on the Bennu project’s forums for unserialising iCalendar files, so using that as a starting point I added a method for that. Finally, I managed to get in touch with Jon through the Moodle community, and he agreed to commit my changes to the library’s version control. I raised MDL-22308 and managed to get the new library included in Moodle.
Unfortunately, this came just before the Moodle 2.0 release. I wrote a patch to provide an interface to upload iCalendar files, but I had to write it for Moodle 1.9 as this is the version my institution was using. This code would need to be updated before it could be included in the Moodle core, and general resistance to the major version upgrade meant getting people to test this code wouldn’t be easy. On top of that, the core developers at Moodle HQ were quiet on the issue while dealing with the fallout from Moodle 2.0, which meant I missed out on much-needed feedback. In the end, my institution found another solution for publishing out calendar, and I couldn’t justify spending any more time on the issue.
All was not lost, however. After a period of inactivity on the issue, a client of Moodle Partner company Catalyst IT contracted them to implement the feature. Johnathon Harker of Catalyst began posting patches to the bug, and published an implementation which can be added to the 2.2 and 2.3 series releases of Moodle. Once testing has been completed, the code should land in Moodle 2.4 in time for its release due in December.
The key aspects of this scenario for me are how easy it was for me to build on Jon’s work with the Bennu library, and how Johnathon could take my updated library to build his import and syncing features. What made this possible was that the development was done in the open, documented well and communicated effectively through the tracker. With minimal intervention from the Moodle HQ team, the community were able to develop and test a highly demanded feature which will soon be released for the benefit of everyone.
Stories like this happen all the time in Open Source Software, and it’s great to hear about them. If you’ve got an example, leave us a comment below and let us know about it!