This not really a request for assistance or help ... but the results of an experiment in eradicating legacy from a course. * do not do this on production server * ... tinker with it first.
Took a backup of a course (1.7gig) from a site that began as a 1.9.highest and
has been marched through series 2 to current version 3.0.hghest via git.
Made a no user no quiz backup and downloaded.
Un-archived the .mbz
Edited only the files.xml file in a text editor
Search for the tag for legacy replaced with draft.
Saved the files.xml file
Rebuilt the .mbz file.
SCP'd the course to a filesystem repo on another Linux server running Moodle 3.2.highest. File system repo already mapped and linked in the 3.2
Restored the course via moosh. Executing moosh in the moodle32 code directory:
moosh course-restore /var/www/unirepo/backup-nolegacy-20170405-1920-nu.mbz 1
[root@sos moodle32]# moosh course-restore /var/www/unirepo/backup-nolegacy-20170405-1920-nu.mbz 1
Creating new course to restore backup
Restoring (new course id,shortname,destination category): 9,RJMC,1
New course ID for 'RJMC': 9 in category 1
1 above was the category.
* Course restored * - no errors.
Logged onto the Moodle and inspected the course via GUI.
Legacy was on ... Turned off Legacy
Results:
img missing from Topic descriptions - they were small icon type images in front of Topic descriptions. (P:off might work on those - pics provided)
The real bottom line ....
ALL the other file resources which were link to files stayed/displayed
Could be opened/viewed/downloaded.
Course no longer in legacy!!!!
This was only one course ... think how the courses were built originally
would be a factor ... so can't say this is 100% ...
*BUT* 'lions' share of eradicating legacy from this course was accomplished and what this non-programmer did could be replicated by anyone not afraid of the command line.
Thanks to Justin Hunt and his 'poof' ... got the idea from inspecting the code of that addon.
Some images attached cause the descriptions above brief (only three ... that's max)
'spirit of sharing', Ken