Removing "orphaned" image files (and Ally)

Removing "orphaned" image files (and Ally)

by Howard Miller -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You might not be aware of this (I wasn't). If you add an image in Atto, then "delete" it again in the editor you only delete the link. The actual file remains. You can see the files by clicking the file manager button on the toolbar. 

Now these can mount up in a big course. We hit on it using Ally - it reports on a load of files that you thought you deleted. 

Has anybody seen a plugin, got a great idea and so on.... thoughts about handling these files?


Average of ratings: Useful (3)
In reply to Howard Miller

Removing "orphaned" image files (and Ally)

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Howard,

Sounds like an issue that would welcome an improvement, for sure. The ideal workflow for this, IMHO, would be to have a report of sorts available at site level (admins, managers) and course level (editing teachers) listing all orphaned files with a few options, such as:

select for bulk actions (download, delete)
preview
download
delete

You'd see the file name, the extension and the date it was uploaded to the course in a table view.

This may attract interested community members, if there was a tracker issue for such an improvement.
Average of ratings: Useful (2)
In reply to Joost Elshoff

Re: Removing "orphaned" image files (and Ally)

by Randy Thornton -
Picture of Documentation writers
I had this issue a few years ago with a site I inherited. It had over 25,000 such files on a relatively small site sucking up several Gigs of space. I ended up writing some SQL to show me such files, then assigned them to the users to manually clean from their courses. They of course did not realize that appearing to delete a file did not actually delete the file since that would too sensible sad

I think an admin level tool to manage for this would be very valuable.
Average of ratings: Useful (2)