Uploaded/Server files repository

Uploaded/Server files repository

by Davide Cardani -
Number of replies: 3

Hello,

is there a setting to enable a display window/block/view for ALL the files uploaded to the server, used as resources in the courses?

At the moment I have not found a similar functionality, nor external plugins.

The only way to view a file system of files uploaded in all courses is when adding or editing a resource within an activity.

Even here, however, I can't fully manage the files, I can only see its name and some metadata, I can't do relevant operations.

This is very inconvenient.

I am surprised that for an administrator user there is no such functionality, it is something fundamental.

Can you help me please?

(btw I'm using Moodle 3.9)

Thank you very much,

Davide

Average of ratings: -
In reply to Davide Cardani

Re: Uploaded/Server files repository

by Bret Miller -
Picture of Particularly helpful Moodlers
No... I've asked a few times too. Files are supposed to be automatically cleaned up when they are no longer linked to a resources, but I suspect that doesn't work completely correctly. I have no proof, of course, or I would report the issue. So the "File System" files area just keeps growing. The File Manager plugin is less than useful for sure. I suspect it needs a new developer--someone who really wants a working file manager in Moodle. Until then, deleting a file from the file system could result in a broken resource in a course somewhere. And there really isn't any way to check for orphaned files. Even if you could see the files and where Moodle thinks they are linked, you'd probably have to visit the course they were in and verify the files are still used. I suspect it's possible for a resource to get deleted and fail to remove the file link (that would be a bug) so Moodle would still think the file was in use. At least that's my thinking. Maybe I'm just a little paranoid about things that are so automatic, being an old school techie.
In reply to Bret Miller

Re: Uploaded/Server files repository

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon intrusion, but ...

" ... there really isn't any way to check for orphaned files ..."

There is ... if server can run 'moosh' (a command line only utility) for moodle.   It does have a moosh command to compare what's in mdl_files table with what actually exist in moodledata/filedir/

https://moodle.org/plugins/view.php?id=522

https://moosh-online.com/commands/

On servers where it can be installed and can be run, it does find 'orphaned' files.  Can even remove them ... but one does have to be careful as you say removing the file + metadata in mdl_files table could mean a file resource in a course goes missing. :|

On servers that have large filedir, command can take some time to run.

Plus, works best on Linux (not shared hosted).

My 2 cents!

'SoS', Ken

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

Re: Uploaded/Server files repository

by Bret Miller -
Picture of Particularly helpful Moodlers
Thanks, Ken. Hadn't looked at Moosh for a while. I have it installed...

So, now I'm off to checking for orphaned files. smile