You might find your self in the situation where you have a bit of time to spare, but sadly with an unreliable, absent or just very expensive internet connection. This might happen if you are travelling, maybe on a long distance flight, or staying somewhere without internet facilities. Well now you could be using that time to pick up some new knowledge, maybe taking a course on a subject that has always interested you, or learning new skills to enhance your career. I'm not talking about one of those cheap CD-ROMs you see in computer shops promising to teach you vast amounts of knowledge, but are often disappointing, instead I'm talking about genuine Open University materials that can be loaded onto your computer absolutely free and used interactively when your are offline.
The Open University makes a wide selection of materials available through its OpenLearn site. Backed by the William and Flora Hewlitt Foundation, OpenLearn makes materials available through its online portal but you are not restricted to consuming these materials through that channel, instead you can go to OpenLearn's sister site, OpenLearn LabSpace, and download the materials in a variety of formats. You can even add content to them and upload the materials to present your own version of a course.
OpenLearn is powered Moodle, a popular open source course management system and one of the formts that LabSpace makes OpenLearn content available in is a Moodle backup file. For those of us who use Ubuntu or one of its derivatives (Kubuntu, Xubuntu and Edubuntu) we have the good fortune to have Moodle available in the official package repositories. With only a couple of modifications is it possible to get this version of Moodle to handle content from OpenLearn and turn your laptop into a portable fountain of knowledge!
Moodle should be treated as server software so it might take a few more steps to install that a piece of desktop software, so feel free to make yourself a cup of tea and take your time over the intructions here. The Moodle site also offers instructions on how to install the software on Ubuntu 6.06 LTS, whereas the instructions below are for Ubuntu 7.10 and its derivatives.
Installing the required software
The first step is to install a database server that Moodle can use. In this example we'll use MySQL (you could also use PostgreSQL if you prefer, but I'm not experienced enough with PostgreSQL so if you know how feel free to add the equivalent steps to the comments):
sudo apt-get install mysql-server
You should now set a root password for your new MySQL server, log in to MySQL as root by typing:
mysql --user=root
You will now be at the MySQL command shell and should see a mysql> prompt. Only type in the part of the line in bold below.
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password_here');
Now leave the MySQL command line:
mysql> \q
Now for the main event, let's install Moodle an the connector for PHP to MySQL:
sudo apt-get install libapache2-mod-php5 php5-mysql moodle
The installer will ask you several questions during set up, give the following answers:
Web Server Software: | apache2 |
Database server software for Moodle: | mysql-server |
Database server hostname | localhost |
Database administrator username: | root |
Database administrator password: | [the one you set above] |
DBA password confirmation: | [same as above] |
Database owner username: | moodle |
Database owner password: | [make one up] |
Database owner password confirmation: | [as above] |
You will now see a message telling you that you need to go http://localhost/moodle/admin to complete the installation. Press Return on the OK tab and then wait for the installation process to finish before going to that page.
Setting up Moodle
Once you go to that URL tick "Yes" and continue to say you have understood the terms and conditions, then DO NOT tick "Unattended operation" but instead just click the button.
Moodle will now set up its database, click "Continue" on the various pages to complete these steps until you get to the page to set up an Administrator accout. This is self explanatory, so go ahead and fill in the fields.
You will now get to a page entitled "Front page settings", you can enter here a name for your site and a description. Go ahead - be creative!
After this you will be logged into your own personal Moodle site - congratulations!
Get course material for your new Moodle site
Now time to get some course materials for our new learning environment. Head over to http://labspace.open.ac.uk/ and navigate to a course that interests you. It would be great if you register as you can then take part in the OpenLearning community. When you click on the title of a course, you will be given a message inviting you to join this course, you don't need to do this for this exercise. Once in the course, hunt out the link that says "Moodle backup" on the right hand side, click on it and download the resulting ZIP file, don't extract this though, there is no need.
Now it is time to load this content into our local Moodle installation. Unfortunately, by default our set up won't let up upload the labspace file to our Moodle installation because it sets a file upload size limit of 2MB which is too small. However we can change this by opening up
/etc/moodle/apache.conf and looking for the lines that say:
php_value upload_max_filesize = 2M
php_value post_max_size = 2M
...and changing it to:
php_value upload_max_filesize = 64M
php_value post_max_size = 64M
You will need to get Apache to reload its configuration to use this change:
sudo /etc/init.d/apache2 reload
(Hopefully one day somebody will automate this step for us!)
Slightly strangely, to load in a course from a backup we must first add a dummy course to create the menu entries for restore actions and the backup directories. To do this, click on the button on your Moodle homepage that says "Add a new Course" and accept the default entries.
On the next screen just click on the button at the bottom with your new "course code". On the left hand side you now have a block that says "Administration", click on the "Restore" link.
Now click on the "Upload file" button and upload the zip file you got from LabSpace.
The restore file is available for your installation of Moodle to use. Click on the "Restore" link next to the entry for it, accept the default s for the next couple of screens and then click "Restore this course now!".
Moodle will now import all of the data from the ZIP file and after a short delay you will be able to use this course in your own installation of Moodle!
You can now add further courses. There is no need to create dummy course to add extra courses as the menu links should already be there.
Happy learning!
new course for labspace?
How about posting these instructions up as a new course in LabSpace? ;-)