Importing data into Moodle using VB9

Wednesday, 9 January 2008

We've been developing a new Quiz engine on and off over the last few years. The original quiz was written by me in ASP, and does the job, though the interface for authors to enter new questions proved a bit too clunky, and is probably why it was never used very much.

Enter ASP.NET and a chance to start from scratch and have another go. Except that it turns out writing a quiz engine (complete with some kind of question bank) is not that trivial.

It looks like we may never get to finish the ASP.NET version, as we are now starting a trial of the quiz that comes with Moodle. It appears to have pretty much all the features we require, and someone else has done the hard work already!

Last year we were running some trials of the ASP.NET application, and we wanted to migrate the questions that had already been entered over to Moodle so that they could be re-used.

As of version 1.8, Moodle supports the following formats for importing questions:

A surprising omission from that list is the IMS QTI format (thought Moodle does support this for exporting). If you've ever done quiz development, you should be aware of IMS and their Question and Test Interoperability specifications.

Seeing as the migration tool will only have a limited lifetime I chose Moodle XML. The format is very simple and is mostly documented. The best way to find out the syntax though is to manually enter in some questions into Moodle, then do an Export.

So now to build the tool. I planned to use .NET, and then I realised this was a good opportunity to try out some of the XML support built into VB9.

In the end it I wrote the tool in a day, and the XML support made it very easy.

Dim Doc As XDocument = _
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<quiz>
    <question type="category">
        <category><%= t.TEST.TEST_TITLE %></category>
    </question>

</quiz>

This example shows how you can insert values into the XML really easily. I do like the fact that the XML looks like XML, not wrapped up inside strings.

I did play around with enforcing an XML schema. There isn't an official one defined by Moodle, so I tried rolling my own. This then lead to problems with the XML getting lots of xmlns attributes which I didn't want, so in the end I just did without it.

Importing Excel 2007 into Windows SharePoint Services 2

Tuesday, 8 January 2008

In WSS 2.0, there's an option to create a new list by importing an Excel Spreadsheet.

I've got Excel 2007 installed, and so after selecting the cell range of an .xls file I got this error message:

Method 'Post' of object 'IOWSPostData' failed

Searching for this gave me a possible solution

Because this particular SharePoint is still version 2.0, I figured that lVer = 2 was appropriate, and the good news is it worked.

Your Account is deleted (part 2)

Tuesday, 8 January 2008

Looks like it wasn't just us affected by having our website deleted. This is the response I got to my email:

Dear Mr. David,

We really apologize for this issue. Our developer has been accidentally released the wrong version of the billing system that deleted your account.

Our support team is now working to restore your website and emails.   
They have setup your account as active so you can login to your control panel to raise support ticket while we are restoring your application.
Due to high traffic of restoring task, please give us another 24-48 hours to bring your website up again.
If you have your own backup at your side, you are pleased to restore it on your own to speed up the time.

Also, you are pleased to create support ticket to ask for your website restoring status.

Please let me know if you still face any issue.
Best Regards
James Sullivan
SeekDotNet Sales Team

Well James, I'm not pleased to create a support ticket, but since my site is still not restored, I think I will anyway.

Someone really needs to proofread their emails :-(

Your Account is deleted

Sunday, 6 January 2008

Amongst other things, I'm the webmaster for the Australian Carnivorous Plant Society.

I just received this email from seekdotnet, the company we have been using to host our website for the last few years:

Dear Mr/Mrs    [NewLine] Your Account is deleted due to non-activating more than 1 month. [NewLine] Thank You.

(Yes, that is an exact copy of the text, including the questionable grammar and the [NewLine] string).

And they aren't kidding - browsing to the website www.acps.org.au results in a 404 File not found error. Eeeek!

No warnings, no nothing. Just deleted like that after being in continuous good financial standing. If you want to keep your customers, you don't just delete all their info if there's suddenly a problem with payments. You might at least attempt to let them know there's a problem so they can fix it before it goes too far.

I've contacted the company, and I'm hoping commonsense will prevail. We'll see.

How to rip audio from a DVD to Audio CD

Sunday, 30 December 2007

Paul videoed Sevenfold's recent performance and created a really nice DVD for all the band members.

Jane doesn't have a DVD player however, so I used these instructions to burn her an audio CD.

Additional comments 2nd Jan 2008

Things didn't go as smoothly as I'd hoped. My DVD burner came bundled with ULEAD Burn.Now. I wanted to add CD-TEXT track info which Burn.Now supports. However after I burned the CD and tested it, I discovered that some of the tracks had been messed up. The track times were correct, but the content had been messed up. Jumping to track 4 played the content that was actually half-way through track 2. Very weird.

I read that WinAmp supports CD-TEXT, but after trying it out, discovered that it only supports reading CD-TEXT, not writing it.

As a last resort, I grabbed iTunes, and it did the job, though it could only add CD-TEXT for each individual track - I didn't see a way to add info about the album as a whole.