Contributing code to Moodle

The Moodle learning management system has one of the most vibrant and diversified communities in the Free Software world. There are lots of ways to get involved and most of them are not restricted to people with a programming background.

If you are a web developer however, sharing your custom code with the wider Moodle community is a great way to:

  • increase its quality,
  • generate more ideas,
  • get it translated into many languages,
  • improve its usability,
  • supplement its existing documentation,
  • and sometimes can even get funding for enhancements!

There are many ways to contribute code to Moodle, but if you decide that your customisations could be useful to others, then you should think about submitting your project to the "contrib" area.

The process is quite simple: simply announce your module or plug-in on the appropriate Moodle discussion forum and attach a zip file containing:

  1. source code
  2. installation instructions
  3. a copy of the licence
  4. your contact details (email or website)

Just like starting a Free Software project, contributing code to Moodle and seeing a community of users grow around your code can be a highly motivating experience. Happy Moodling!

mutt's OpenPGP support and FireGPG

mutt has excellent OpenPGP and GPG support. However different clients send GnuPG encrypted/signed data in different ways. Lots of people seem to be using FireGPG these days so that they can use GnuPG within the GMail/Hotmail/Yahoo! web clients.

Here's the procmail rule I used to convert almost all incoming emails to the OpenPGP/MIME format:

:0  
* !^Content-Type: multipart/  
* !^Content-Type: application/pgp  
{  
 :0 fBw  
 * ^-----BEGIN PGP MESSAGE-----  
 * ^-----END PGP MESSAGE-----  
 | formail \  
     -i "Content-Type: application/pgp; format=text; x-action=encrypt"  

 :0 fBw  
 * ^-----BEGIN PGP SIGNED MESSAGE-----  
 * ^-----BEGIN PGP SIGNATURE-----  
 * ^-----END PGP SIGNATURE-----  
 | formail \  
     -i "Content-Type: application/pgp; format=text; x-action=sign"  
}

However, this didn't actually work with FireGPG and the way that it puts encrypted messages inline. I eventually found out that putting this in my ~/.muttrc would fix it:

set pgp_auto_decode=yes
Privoxy rules to unblock TV3 on-demand videos

My default Privoxy (a great Privacy-enhancing/ad blocking proxy) setup was blocking the on-demand section of New Zealand's TV3 sites (both 3news.co.nz and tv3.co.nz).

Here are the minimum rules that let the videos through:

{ -block }  
.doubleclick.net/[0-9]+/DartShell.*\.swf  
.doubleclick.net/pfadx/DARTSHELLCONFIGXML  
.doubleclick.net/crossdomain.xml  
.doubleclick.net/pfadx/3news.co.nz  
.doubleclick.net/pfadx/www.tv3.co.nz  

If you are looking to unblock a different site, here's how you can do it:

  1. set debug 1 in /etc/privoxy/config
  2. restart privoxy (sudo /etc/init.d/privoxy restart on Debian)
  3. watch the logfile for any blocked contents:

    tail -f /var/log/privoxy/logfile | grep Blocked