A little bit of background info: It's been my job to migrate my school's Moodle from 1.9.9 to 2.5.3 (via 1.9.19 then 2.2.10 then to 2.5.3). Part of the issue is that I have had to set up a duplicate server (with the content from our current 1.9.9 site) so that the faculty can see how their content looks in the upgraded version (while not messing with the current server, on which classes are still running). In setting up this new server and migrating over the old content, some URLs are pointing to the wrong place (e.g. they are pointing to the old moodle URL "moodle.myschooldomain.edu/" instead of the new URL "upgradedmoodle.myschooldomain.edu/").
They way I see it, I have several interconnected problems:
- The URLs are pointing to the wrong place. This seems like it would be easy to fix (possibly with the Search & Replace admin tool), but is complicated by...
- I don't know if the resources to which the URLs point were migrated as well and
- If the resources were migrated to the new file scheme, I don't know to which resource to point the appropriate link
For #1: I believe I can get a list of incorrect URLs (e.g. a grep across the mysqldump of my upgraded db for "moodle.myschooldomain.edu")
For #3: The incorrectly referenced files still exist in my (current version) moodledata, so I can get at them.
It's entirely possible that I missed something during my rush to migrate/upgrade; if I've missed something, I would be glad to hear about it (and how to correct it!)
What I would like is a way to fix the links to point the correct resource. I would obviously prefer a script to run, but if I can get pointed in the right direction on how to migrate these things manually, I feel confident I could write a script myself.
As mentioned previously, the site in question is running 2.5.3.