How do I check for orphaned files?

Re: How do I check for orphaned files?

by Paul Ritchings -
Number of replies: 0
Sorry to come back to this after weeks.

I've used the information both you and Ken have provided amd found that there are mbz file which while not being orphaned from mdl_files (ie they are on disk and in the table) they do not show up in the course indicated by for instance:

SELECT cxt.*, mf.*
FROM mdl_files mf
join mdl_context cxt
on mf.contextid = cxt.id
where mf.contenthash in ('b335685ddedd72b69e2ba88eecf976b4f9cf4220')

This gives a contextlevel of 50 and when I use the instanceid to view the course and go to "restore" there are no backup files shown.

Are there other tables which might cause the backup files not to be shown in the frontend? Has something become corrupt?