My Moodle 2.0 Upgrade Journey Part 2

For this next part of the process I copied my Moodle 1.9 installation to a local development server. But to save time I didn’t copy the entire MoodleData folder as it’s over 160GB. I only copied the first 20 folders.
As I wouldn’t be using LDAP on this test server (yet!) I changed my admin account to a manual account so I didn’t lock myself out.

I then flushed out the htdocs folder and copied the Moodle 2.0 installation files across so that I had a clean install with no modifications and ran the install script.

Things looked good and the new progress bar moved along nicely. I hit several errors when trying to migrate the MoodleData folders I left behind as it simply could not find them, again this was intentional on my part and expected.

Then I hit my first serious error.

The installer stopped when migrating the meta courses and I was left with an ugly looking error message.

If I skipped the error and continued with the install then Moodle 2.0 would load but I was unable to use any meta course functionality.

After several days of trying various things to fix this, including submitting it to the Moodle tracker (http://tracker.moodle.org/browse/MDL-26352) I finally figured out what was happening.

It turns out that I had courses listed in my meta table that no longer existed in my course table.

(For the more techie amongst us, I had entries in mdl_course_meta but the corresponding IDs in mdl_course were no longer there). For some reason, Moodle had not removed the meta course entry when we had deleted courses in the past.

And this was the cause of the error.

I used the following MySQL query to see which entries were causing this error:

SELECT fullname, mdl_course.id, parent_course FROM mdl_course_meta
LEFT JOIN mdl_course ON mdl_course.id = mdl_course_meta.parent_course WHERE fullname IS NULL

The query returned 30 entries which were promptly deleted.

And now the upgrade worked without any further hitches!

So now I have a fully functional Moodle 2.0 with over 25,000 live student account and over 6000 courses and approximately 3000 meta courses.

After a few initial checks to check the integrity of the data it is safe to say that the upgrade has gone as expected. Everything appears to be in the correct place, enrolments appear to have been migrated successfully and the migrated data from the MoodleData folder has worked flawlessly.

So what’s next….

In Part 3 I will further test the system and check that live database enrolments are working and test the authentication plug-ins and single sign on.

I’ll then need to do larger upgrade test with all 160GB of MoodleData- this will take an awfully long time!

Despite the slight hiccup with meta courses this upgrade has massively boosted my confidence in Moodle 2.0 and I urge all those who maybe considering an upgrade to do a test simulation as I have done.

Stay posted for the next instalment.

Book Review Moodle 2.0 First Look by Mary Cooch

“Discover what’s new in Moodle 2.0, how the new features work, and how it will impact you”.

That’s the books subtitle and it really does deliver on its promise.

What’s great about this book is that it dives straight into what’s new in Moodle 2.0, the book assumes the reader is already familiar with Moodle and therefore doesn’t get bogged down with explaining the core concepts and functionality that is already native to Moodle. Instead the reader gets an early digest of what’s to come.

Of course a lot has changed with Moodle 2.0 and this book does a fantastic job of holding your hand as it guides you through the changes. The new file system is explained very delicately with supporting screenshots and the whole writing process appears very natural. Mary’s teaching background plays a very important role here and she manages to illustrate the technical changes without becoming too technical.

The book not only explains the changes in Moodle 2.0 but also provides short tutorials which show you how to manage the new features and how to implement them. This for me extends the value of the book as it has enough content to come back to and re-use once your Moodle 2.0 setup is underway.

Later chapters include conditional learning and managing learning paths and this chapter is invaluable for anyone who is new to this practice. Blackboard has had conditional learning for a long time and this approach is new to Moodle. Mary explains the whole process very well and the accompanying screenshots are brilliant. What is most interesting here is that the book stays very balanced on the use of learning paths, as anyone involved in e-Learning will know, is it always the best option to limit students learning and lock things down conditionally? The book manages to voice both sides of the debate.

The workshop has changed dramatically in Moodle 2.0 and this book dedicates a lengthy section to it. As the online documentation has always been sketchy when it comes to the workshop module this book breathes new life into it and does a fantastic job of selling the benefits of using the module.

The last chapter of the book is written for administrators and covers some of the fundamental changes. Although there are no tutorials here, this chapter is more of a run down of what things Moodle administrators can expect to see. And as Mary quite clearly points out, this isn’t an Administrators book and those seeking a more technical guide should refer to Alex Buchner’s book also from Pact Publishing.

So who is the book for? And why should you consider buying it?

It’s perhaps the most comprehensive guide as to what is new in Moodle 2.0. The subject has been researched thoroughly and the features have been quite clearly test driven by Mary herself. And this is what sets the book apart from a simple feature list you will read on the Internet. Mary has spent an awfully long time working with Moodle 2.0 and not only highlights the changes but explains how they work and how to work with them.

This book is a must for any person thinking about an upgrade to Moodle 2.0, and let’s face it, anyone running a functional Moodle installation will have to make this decision sooner or later.

If you are trying to convince your organisation to move towards Moodle 2.0 then this book would be more than enough to highlight the benefits and would serve as a basis for a fantastic presentation.

Currently, there is no better resource on Moodle 2.0, and it’s written by one of the most keen and experienced Moodlers in the community.

For further information on this book please click here

Interesting Moodle stats for Leeds City College

Now that the term is underway and we have 1 single merged VLE I thought it would be a good time to view some statistics as to how big the Leeds City College Moodle installation actually is. After visiting http://moodle.org/stats/ I realise we are a long way away from breaking into the top 10 but its still not bad for a UK Further Education College.

You can get a lot of this information by clicking on the notifications link in your site admin menu and clicking on “Moodle Registration“, the rest of the stats were obtained using SQL queries and Google Analytics.

At the time this blog post was written we had:

  • 18,425 active students (this will increase as more students logon during the year)
  • 1773 active Staff accounts (1224 with editing rights)
  • 205,971 Role Assignments
  • 4421 Moodle courses
  • 429 Course categories
  • 46,708 resources totaling 110 GB of data!
  • 2932 Forums with 44,330 Forum Posts
  • 1365 quizzes with 15,157 questions in the quiz bank
  • 1505 online assignments
  • 14,046 labels
  • In the last week we had 78 iPhone visits, 28 iPad Visits, 21 iPod Touch visits and 18 Android visits

This information may be of use to you if you are planning to scale your Moodle site and shows how quickly a site can grow once you get the tutors on board!

Now that I have this information I am in even more awe of how good Moodle actually is.

Moodle Stats

Considering the size of the data, the sheer number of role assignments and all the other things going on under the hood such as quizzes, forums and assignment submissions and then it has to authenticate against our enrollment database and sync with various LDAP servers I’m amazed it works as well as it does. And to think that Moodle.org has nearly 1 million users and the Open University has over half a million….amazing stuff!

Moodle Tip-Reset your course for the new term

The new term is nearly upon us and lots of tutors are running about doing last minute Moodle changes to their course areas. One question that keeps coming up is “How do I reset my course and clear last years students?

The answer is simple, use the course reset feature in the course admin block.

This little gem is often missed and tutors are rarely informed of its use during Moodle training.

Upon clicking the button the tutor can perform the following course options:

  • Delete course logs
  • Delete course events from the calendar
  • Delete user notes
  • Unenrol users (the important one!)
  • Clear the gradebook
  • Delete Groups/Groupings
  • Delete assignment submissions
  • Empty course forums
  • Clear roles

I would recommend performing a course backup first before you clear assignment submissions and grades!

Moodle ZIP error fix for Windows using UNC Paths

Apologies for the confusing blog title, I did this so that other users with the same problem could find it easily in Google.

The problem:
We recently moved our Moodle installation onto separate Windows servers.  The MoodleData folder now resides on a separate box to the webserver.  Everything was great until we tried to use any of the ZIP features in Moodle.  Course restore, course backups, SCORM Packages etc… simply would not work.  After spending long days and late evenings trawling through the Moodle libraries and searching the forums I managed to find a fix, courtesy of Kiran Dhaman.

The Fix:
Easy once you know how.

In congif.php, make sure you put 4 backslashes in the UNC path to the MoodleData folder,
For example:

$CFG->dataroot  = '\\\\pathtoserver\moodledata';

 

Now edit lib/moodle.lib

Find this code:

function cleardoubleslashes ($path) {
    return preg_replace('/(\/|\\\){1,}/','/',$path);
}

And replace with this code:

function cleardoubleslashes ($path) {

if (substr($path, 0, 2) == "\\\\" or substr($path, 0, 2) == "//")
return $path;
else
return preg_replace('/(\/|\\\){1,}/','/',$path);

 

And now the ZIP functions work again!  This is only an issue with Windows Server setups, and Petr ┼ákoda has stated that there can’t be an official fix as this is a PHP limitation but has hinted it may be resolved in Moodle 2.0.