Before I started down a rabbit hole thought I'd ask if anyone has solved this - legacy files in backup ... means legacy forever. (I know there is an addon called 'Poof' (?) that will change each item when editing but that would mean editing many many links/resources. Am looking for a 'faster' way.
Attempting to resolve the issue of legacy files ....
Am looking at file.xml of two extracted backups of Moodle courses not from the same server and not of the same version of Moodle but in the 2 series - 2.9.x
In the files.xml file of the extracted backup of a *no legacy* course there are these tags:
In the files.xml file of the extracted backup of a *legacy course*, there are these tags:
Context ID is different
In no legacy each file resource has a unique context ID
In a legacy each file resource has the same context ID
If, I were to edit the files.xml file of a legacy course and change
the component from 'course' to 'mod_resource'
the filearea from 'legacy' to 'content'
the 'contextid' increment each by one ... starting at 52823 as an example
and making the next reference 52824
Then re-tar-gz the extracted backup making sure moodle_backup.xml file is at the
root of the un-tarred/gzipped archive, would the course restore
**without legacy files**?
OR, better yet ... does anyone have a script one could run locally, to fix the legacy issue?
'spirit of sharing', Ken