Assignment Files do not get deleted via course reset after cron execution

Assignment Files do not get deleted via course reset after cron execution

by Direnc Timur -
Number of replies: 0

As the title describes, when I try to reset the assignments of a course, front-end wise all data gets deleted. I tested this with a single file upload by myself in a test assignment. But when checking disk usage with 

du moodledata/filedir

the same usage remains. I ensured execution of the cron task which printed

"...
Cron script completed correctly
Cron completed at 17:40:03. Memory used 32.8MB.
Execution took 0.810698 seconds"

The files also are not in moodledata/trashdir probably reason why the cron task does not cleans it. Removing file with

moosh file-hash-delete <hash>

seemed to work. I identified the hash with pre/after executing disk usage and checking hash in the folder that used up the size of the file I uploaded.

The hash was not in the mdl_files table in mysql, but the draft of it was. This one I found out via

moosh file-check

which outputted the file(draft) alongside other files.

This is rather urgent because I'm running this moodle instance on a hoster with extremely low disk storage (hence backup/deletion requirement).

Some background infos:
Moodle - version 3.8.2+ stable
Machine: CentOS Linux 7

Average of ratings: -