Project: moodle
Issue MDL-41447: Upgrading from 1.9 to 2.2 (en-route to 2.4.5) has errors with certain kinds of URL link
We had a customer site running 1.9.19. They had (in most of their courses) a file link resource to an uploaded html file at the top of the course, a big file of instructions in many sections, and then further down in each topic section they had a file/website link resource to the same uploaded file, but specifying an anchor in the file, so that the learner could click on this resource and be taken to the relevant part of the big html file. So those resources all ended with the same filename, like this: /path/to/file/instructions.html#3 The #3 (or whatever number) opened the html file and scrolled down to the relevant anchor. If you run a moodle upgrade on this site from 1.9 to 2.2 (which *has* to be done before going to 2.4) then the main uploaded file link resource converts correctly, but the resources containing links to specific anchors in that html file start to convert as file links (rather than website links) and then fail, because the file instructions.html#3 (or whatever) does not exist. This particular customer site ended up with about 1400 broken resources, all of them of the above type - a link to an uploaded html file with the anchor number specified on the file link. I know that 1.9 and 2.2 are no longer officially reported, but we, in common no doubt with a lot of partners, still have quite a number of 1.9 sites to upgrade, and if we come across this kind of resource link again, and the conversion process does not handle the resource correctly we end up with potentially hundreds or thousands of broken resources to fix. Anyone got any ideas on how to handle this kind of resource? Any chance of the upgrade code in 2.2 being altered to handle this?
Story points: 20