-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.10, 3.10.7, 3.11.3, 4.0, 4.1
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
Unused files are created when in the editor a file is added and later the file is replaced. Such unused files are not orphaned. That means the existing tasks will never deleted such files because they are registered as connected to the object.
In Atto editor there is a button to check files and to delete them. We could identify that teachers never delete the files because they don't identify this as a problem.
Problems with this situation:
- each copy of the element copies the unused files also
- each backup copies the files
- the unused files may contain copyright protected content that should not be shared
- the unused files may contain privacy related content (ie pictures from students) that may not be shared with others.
Our suggestion is to create a scheduled task that searches daily for unused files and deletes the database entry. This should work only for the context where the file is identified as unused. It may be possible that the file is in use in other contexts. Afterwards the file can be deleted by existing tasks.
Alternatives: It may be possible to create a teacher plugin to search in the course for unused files, list them and mark the database connection for deletion. This is not a preferred solution because must have a problem awareness and start it manually.
- has a non-specific relationship to
-
MDL-50355 Editor 'Manage files' could auto remove uploaded unused files.
-
- Open
-