I have been developing custom code for one of my moodle customers for awhile. The shortened long story is this. When we stared the project to migrate our customer from her old system, we decided to migrate to a moodle 2.0.2 server. That was the most recent version of moodle at the time. I did my programming on that version. I created blocks to house the custom functionality.
Now, I need to migrate from the 2.0 instance to our 2.2 instance.
This migration comes in at least two steps that I see right now.
1 - Migrate the DB updates
2 - Migrate the script files (.php)
Migrating the DB updates
My first thoughts were what is the simplest way to migrate the DB updates that I need for my custom code? I had made create table scripts when I initially created the tables, but additional updates to the tables had occurred, I was not confident that I had updated my scripts.
Use phpMyAdmin to Export from one instance, Import to the other.
I decided to use phpMyAdmin and to Export the tables from the moodle 2.0 instance and then Import them in my moodle 2.2 instance. I ended up Exporting some of the tables as structure only, as the data contained in them was only test. Some of the tables I exported structure and data, since they had permanent data.
The export and import process was rather non-dramatic. I used the defaults when exporting and importing from / to each version. No real surprises. I did when exporting have to choose the collation type of utf8, which moodle prefers.
Migrating the blocks (code)
I started with the simplest of the 3 blocks that I am migrating. I have a block called instructors
on my moodle 2.0 instance. I copied the blocks\instructor folder from the source server and pasted directly into the blocks folder on my moodle 2.2 instance.
I logged into my moodle 2.2 instance as admin and was presented with this Plugins Check display.

No comments:
Post a Comment