I have upgraded my production Moodle website to 2.1 (well a local copy of course ! I will do the real upgrade later this summer). Of course I had a big pile of unused files in my moodledata course's folders and I could not delete the unused ones before upgrading because I didn't know wich ones were used and wich ones were not.
Now what is the best way of completely get rid of the legacy course files ?
Of course I can disable the legacy course files repository plugin in Administration > Plugins > Repositories > Manage repositories.
But what about files not used anywhere in my Moodle (I mean not used anywhere outside the legacy course files area) ? They have a record in mdl_files database table with filearea=legacy I think and I absolutely don't want them to stay here forever.
I no more need them on the server as I have local copies on my computer (and backups !) just in case I need to use them in the future.
Do I need to go into each course before disabling legacy course files repository and "delete" (I know it don't really delete the file but move the file to trash if it's no more used) each file in the file picker so that gabage collection in cron can do it's job or is there a quicker way ?
I know some of you will ask why I want to get rid of the legacy course files areas.
- because I want my upgraded Moodle to look as much as possible like a brand new Moodle 2.1 website (If I don't succed I will simply have an closed to visitors Moodle 1.9 website for archive purpose and a brand new Moodle 2.1 install for the next year in september)
- I find that the legacy course files don't fit well in the way I plan to work in the future as I am quite sure given my poor memory that I will be completely lost between external repositories and this legacy course area.
We would like to be able to disable this too. We don't want the the link to legacy course files and have turned all the options off about legacy files yet it still shows in the settings block for restored or upgraded courses
There are lots of discussions on the new file system, repositories etc. you might want to read, before deciding on your way to go.
In my case with a medium sized site (14'000 users and 4'300 courses) upgrading is IMPOSSIBLE until all the problems are solved.
If you have rather a small sized 1.9 server I would suggest to set up a CLEAN FRESH 2.1 Server from Scratch, disable all the file options you do not want. And then import either the 1.9 Backup-Zip-Files as soon as a converter-script becomes available or you import from your upgraded copy all the 2.x Backup-Zip-Files you need. (there is a third-party converter-script I saw here if you can not wait until the official one is released here.)
We have a fresh install of Moodle 2.1 and will be restoring 1.9 and 2.1 back-ups into it. Unfortunately, the legacy fiels still stay - even though all options we can see are turned off.
This has to be because in 1.9 files were relative to their courses and in 2.x all files are relative to the activity/resource/forum/etc. they are linked in.
So I guess that the backup-zip-convertors or even the built in upgrade from 1.9 to 2.x will treat those backup-files in a legacy way because it would be much more complicated to convert everything to activity/resource/forum/etc. way of referencing the files.
Just a wild guess, Rosario