Tuesday, March 4, 2008

Making Moodle Think It's Blackboard CE

The Problem

We're experimenting with the Moodle learning management system at the moment. It may let us do some nice things including
  1. Letting potential students register themselves in a moodle course and perform some pre-tests before they enrol.
  2. Let us better handle small courses with 10's of thousands of students (Such as an online oh&s induction) since per student licencing is no longer an issue and client PC's won't whine about popup blockers and lack of java like they do with Backboard CE. (this is fine for a year long course but regular users don't want to download and install java, then disable all their popup blockers just to do a 45 minute course)
We've put a lot of effort into writing the middleware between our Student management system (QLS) and Blackboard CE (formerly WebCT) and we'll need to get it talking to moodle if we ever want to role it out in production.

The Solution

Our middleware exports IMS enterprise files. These are XML files containing lists of courses with the students and teachers to go in them. It's an industry standard so if an IMS enterprise file works with one system it should naturally work with any system.

There's always problems!

Blackboard CE doesn't quite handle IMS Enterprise files the way moodle does. The big differences are
  1. CE can include passwords which we will need for some of our users. They use a custom element in the person record to do this. Moodles IMS enterprise import doesn't support this. The custom element looks something like mypassword
  2. CE uses the element of an imported person to define how they authenticate. E.g. LDAP, Internal etc.
So I made some small tweaks to moodles IMS enterprise import module to make it behave like Blackboards.

The important lines are

// Added By SB. Look for a password Blackboard CE style

if(preg_match('{.*?(.+?).*?}is', $tagcontents, $matches)){
$this->log_line("password would be '$matches[1]' i hope.");
$person->password=trim($matches[1]);
}

and

$this->log_line("The source is '$person->source' is that good?");

if ($person->source=='WebCT') {
$person->auth = 'manual';
} else {
$person->auth = 'ldap';
}

$this->log_line("added with auth of '$person->auth' so does it work");

You'll want to change the if test to suit your own organisations business rules. E.g. mapping source ID's to the authentication sources you want. If your really keen make it a config option and send me your improved version.

You can download the full code from here and paste it over the top of moodle/enrol/imsenterprise/enrol.php

Regards

Stephen

Stephen

Screenrights Content and Learning Edge Equella

The Problem

The library where I work has new DVD recorder with a built in hard-drive so they can
  1. Record TV
  2. Chop out the advertising
  3. Burn it to a DVD
This is legal in Australia if your organisation pays screenrights an annual licence.

They asked me if I can find an easy way to get these recordings online. So I thought it's got to be
  • as automated as possible
  • student friendly with low(ish) bandwidth and using a popular plugin
  • protected by password and a copyright statement
  • Integrated nicely with our Blackboard CE (formerly WebCT) LMS and the library's experimental Drupal content management system.

The Solution (Mencoder and Learning Edge Equella, Cameo by Python)

If you're old enough to remember DOS or use the linux shell you'll love mencoder to convert or edit video. I'll discuss more of this in another post but in a nutshell the solution is that once the recorded television has been burned to a DVD but before it goes on the library shelves the librarian
  1. Puts the disk in her computer and clicks a shortcut to a little app I've written
  2. The application counts the number of titles on the DVD. It does this by dumping the output of mplayer to a text file and parsing it.
  3. Uses mencoder to convert each title on the DVD to flash video (as used on youtube)
  4. Prompts the librarian for appropriate metadata (Title, description etc)
  5. Uploads the flash video to our equella learning content management system with appropriate digital rights (a copyright statement which users have to agree to).

There's always problems!

There were a couple of hickups with my plan

The Set-Top DVD recorder the library uses makes dodgy DVD's. It included blank titles and repeated titles. I had to adjust the app so that if a title was blank it would be quietly ignored. If a title was repeated (I use an MD5 hash of the flash video to detect this) it's also ignored. It still gets converted which is a big waste of time but at least it's wasting computer time rather than person time. I doubt you'll have this problem.

Equella 3.0 couldn't cope with our unique copyright and security requirements. The library wanted to get RSS feeds of videos from Equella but the videos still needed to be password protected. I also needed to force users to agree to the copyright statement before they see the video. This meant tweaking the security to make the videos searchable by anonymous users but only viewable by people who log in. When I tested it Equella 3.0 would
  • Show anonymous users the metadata for the video with a link to look at it (good)
  • Clicking the link to see the video would bring up the copyright statement which you could then agree to (good)
  • Bring up a login prompt (good)
  • Cause an exception error on the server. (bad)
I logged a call with the learning egde support team and they believe the issue is now fixed in version 3.1. I'll cover our Equella 3.0 to 3.1 upgrade in another post. Fortunately this issue doesn't affect Blackboard CE since teachers and students single sign-on to equella so we'll live with it for the time being.

Downloads

You can download the code but you'll also need python 2.4 or higher, mplayer and the equella python client (I haven't included it for copyright reasons). It included the wonderful JW flash video player

You'll need to

  1. Unzip it to wherever you've installed mplayer
  2. Edit lines 10 and 11 of ripdvd.py to point to your equella server and the appropriate collection within your server.
You could change it to upload the videos to another content management system or your LMS fairly easily.

To-do (If I ever get around to it)

  • Pull the metadata out of our library system via z39.50 (there must be a z39.50 python module)
  • Make the video pages more attractive.
If you have any problems feel free to post a comment

Stephen