Moving to Moodle 2 Technical Upgrade Paths and Considerations01562 744348 http://www.vlemiddleware.com
Introduction• Moving to Moodle 2 can be rather daunting experience for any VLE Administrator• Planning and Testing are extremely paramount during this transition period to make sure everything goes as smoothly as possible.
Server Specification• PHP 5.3.2 or later required! - Enabled extensions: soap, intl, mysql, iconv, mbstring, curl, openssl, tokenizer, x mlrpc, ctype, zip, gd, simplexml, spl, pcre, dom, xml, json (red: Must be installed)• MySQL 5.0.25 or later - INNODB engine recommended• PostgreSQL 8.3 or later• MSSQL 2005 or later
Fresh Install vs Progressive Upgrade• Once you have deemed your server suitable for running Moodle 2.x.x you must decide which upgrade route you plan to follow. – A Fresh Install – Or a Progressive Upgrade of your existing site• There are pro’s and con’s to both routes which we will discuss further
Fresh Installation, Pros!• A good time to do housekeeping• Less Errors• Cleaner Build (Moodle 2.x.x code only)
Fresh Installation, Cons!• Time taken to migrate courses• Which courses are you going to backup?• Shared Hosting, can you adjust PHP settings?• Shared Hosting, do you have access to server to upload backup files?
Progressive Upgrade, Pros!• No need to manually recreate courses and categories.• Won’t lose any site news, site settings, users.• Faster turnaround than fresh install.• Moodle will be exactly the same
Progressive Upgrade, Cons!• Possibility of errors!• Keeps the ‘clutter’ of existing Moodle• Possible corruption of data• Skills need to perform the upgrade• Need server space to run and test ‘test upgrade’• Time spent testing ‘test’ upgrade
How to perform an upgrade?• Take a copy of moodledata folder (/var/moodledata)• Take a copy of moodle web folder (/var/www/html)• Take a copy of database using mysqldump & restore to a new database• Download Moodle 2.x.x files• Copy Moodle 2 files over the top of your copied moodle web folder.• Rename config.dist.php to config.php and populate fields with paths to your moodledata copy / copy database / location of moodle web files. Note, the $CFG->passwordsalt variable MUST be the same!• Change collation of your copy database to utf8_general_ci;• Visit URL of where your new moodle web files are located in web browser (ie http://localhost/moodle2)• Follow onscreen instructions• Correct any errors as they occur
Common Problems & Solutions• PHP Timeouts – The upgrade script can take a long time to run. Can you adjust your max_execution_time settings?• Number of Quiz attempts – Generally if you have less than 10,000 quiz attempts Moodle will upgrade fine, if not you will need to use the ‘Question Upgrade Helper Plugin’
Common Problems & Solutions• Moodle Log table to big – the mdl_log table may need truncating.• Database collation issues – Moodle 2 requires UTF8 collation on database tables and fields. In order to perform this change download the Phoca collation tool from http://www.phoca.cz/phoca-changing- collation
• Extract the tool and move to the root of your webserver. Access the tool through the browser. Fill in database credentials and run.
Common Problems & Solutions• Database Field Types – sometimes may need changing ie, INT(5) may need increase to INT(10)• Missing fields in database tables – these may need adding to database schema of tables to proceed with upgrade.• Missing database tables – The tables and their schema may need to be created.
InnoDB Conversion• Moodle provides built in scripts to convert your database to use the InnoDB engine over MyISAM.• Running the following command will do the legwork for you:- /usr/bin/php admin/cli/mysql_engine.php --engine=InnoDB c:phpphp.exe c:apache2htdocsadminclimysql_engine.php –engine=InnoDB
Problem Blocks & Mods• Various Moodle 1.9 blocks are incompatible with Moodle 2.x.x. A comprehensive list is as follows:- – Mod hotpot – Mod journal – Block loancalc – Block admin – Block admin bookmarks – Course report logs – Course report stats
Problem Blocks & Mods– Course report participation– Filter easyview– Other 3rd party mods / blocks / filters / question typesAnd most importantly Moodle 1.9.x Themes!These blocks/mods/filters can be removed from their respective folders to proceed with the upgrade. If Moodle 2 versions of these blocks exist you will generally find you can recover any data associated with them as it will still exist in the database, and will be populated once the block is re-added to Moodle.
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.