Delete files from a course

Delete files from a course

by George Panagiotakopoulos -
Number of replies: 2

Hi to everyone

I have many courses on Moodle 2.4 which include several audio files and photos. These files are in "page" activities (in every course there are plenty page activities with at least one audio file and some photos). Now the semester is finished, so I need to erase all these files from the server because they aren't re-usable so I'll never need them again, but, I want to re-use some other activities which are included in every course like links, books and lessons.

I wonder which is the most efficient way to do this task.

One idea is to make a new blank course and then import in it all the activities I want to keep from the old course. My question is, If I delete the old course after importing the activities to the new course, will the unnecessary files be deleted from the server or not?

Average of ratings: -
In reply to George Panagiotakopoulos

Re: Delete files from a course

by Ken Task -
Picture of Particularly helpful Moodlers

There are probably multiple approaches using nothing more than the Moodle UI ... others might have/suggest a different way ... so the following is off the top of my head ...

Backup the course once as a full backup ... all activites, etc.  and archive that onto your local HD.  That's your fall back position in moving forward with new organization.

There is no 'global way' to remove all the page activities you've created that are no longer usable, but one way to do that, is run the backup again, and this time de-select all those page activities (as well as making it no user, etc.).  Re-name that backup file name to conclude in the name no-pages or something like that.

When you restore that course, none of the pages (where the audio files and photos were linked) will be included in that course.

As far as the actual files themselves ... Moodle 2.4 will not remove those files immediately, but, rather, if those files are not linked anywhere else, will, in 4 days time, move them to the trash and auto-delete them (at least, that's how it's supposed to work).

If you are about to setup the new courses the same way, consider another approach as you'll have to do this work every time that course ends.  Consider a 'resources' course that has all those page activities that change and simply link from the new courses to the specific page resource in the 'resources' course.

Think just about any way you go, some work will be required at the close of that course, every year/semester/whatever.  With the 'resources' course, that could be archived every time and used as a template for the next 'new' resources course.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Απάντηση: Re: Delete files from a course

by George Panagiotakopoulos -

Thank you Ken smile

I will follow your suggestions to make a back up file without page activities and then to restore it. Are you sure that Moodle 2.4 auto-deletes non-linked files after 4 days?
I also like your approach with the "resources" course. Thank you again

George