Wednesday, July 11, 2012

Steps to be followed to upgrade moodle 1.9 to 2.2



There are few prerequisites before we can upgrade to the latest version. We need to ensure that the database, moodle data and moodle core code are backed up. Dump the backed up data into a test server or a local system which is a mirror of the production server. Ensure that the moodle version is same. Now that we have a fully functioning moodle instance let’s start the upgrade.

Let’s say you have an instance of moodle version 1.9.11 which needs to be upgraded to the version 2.2.3. We have to now upgrade the moodle 1.9.11 to latest 1.9.18 if you have a latest version of moodle 1.9 instance there is no need to do that.

You cannot update 1.9.11 to 2.2.3 because you will face errors that will be hard to understand let alone fix them.

Step 1
Before we replace the core code with latest moodle code, login as admin into the moodle instance & select a default theme. If you are using a default theme but made custom changes to it, its better you select another default theme.

Step 2
Replace the core code with the latest version of moodle 1.9 & refresh the moodle page in the browser. Moodle will automatically upgrade itself to the newer version.

If you are worried about the all the custom code that has been written in the moodle instance, well you should be as you have to write the custom code again as the core functionality has been upgraded. Though the writing of the new custom code will much easier & simpler coz the moodle developers have really worked hard to make it less .

Do check for any errors or bugs in your instance, if any resolve them & then go ahead for further upgradation. By replacing the core code with latest moodle 2.0 version.

This part will be a bit frustrating as you have to lots of modifications to do in the database as well as in the code.
On replacing the code & refreshing the browser page you will get come to plugins upgrade page. Remember to remove all the blocks/plugins which are shown as non-standard. They are the ones that are not compatible with 2.0. Though you may think these are important for your students & teachers they have to be simply deleted from the core code. There should be moodle 2.0 version blocks/plugins if they are very popular.

Step 3
The next page that you will see is an error “Moodle Upgrade Error - : Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT)” on clicking upgrade button. Don’t get panic as this can solved very easily. You need open the database of the current moodle & open the structure of the tables mentioned in the error, there can be more than two in some cases. Just compare the table columns with each other & check whether the collation are same in every table, If not make them similar my making taking the necessary steps.
You have to repeat the same till you do not solve the errors.

After this is done all you need to do is sit back relax & have a cup of coffee as moodle upgrades itself from 1.9 to 2.0.

On the other hand you can download the latest versions of moodle 2.1 & 2.2. At the end of the upgrade you will see new settings page where you can change the configurations as per your need or you can just click save at the end of the page.

Wow! Give yourself a pat on the back on completing the upgrade.

Step 4
The difficult part is now over all you have to now do is replace the moodle 2.0 core code with moodle 2.1, complete the upgradation which will need another round of coffee :)
Just fill the upgradation settings and save which will complete the process.

Now, replace the moodle core code with 2.2, refresh the moodle page click few buttons and the moodle code will be upgraded to 2.2.
Now carefully fill in the upgradation settings form and that’s it you are good to go. :)

You will be having all the courses, user details, files all of them organized as it was in your previous moodle version.

Install the blocks/plugins if any that you as per your need and teachers & students can start working on new moodle version without losing any data or files.

Although the teachers & students would require some basic training which can be found here.

No comments:

Post a Comment