Dear Community,
we have some users who use "private files" in Moodle. Some of the files are placed in courses via alias/shortcut, some others as a copy. If users open their private files repository and click on a file they can see, in which courses the files are linked as alias/shortcut.
As Moodle Admin I wan't to know which user has private files and in which courses the linked files are placed:
- list of all users (ID, Firstname, Lastname) who uses private files
- list of private files (filename, filepath in private file folder, filesize)
- list of courses (ID, shortname, lastname) where these files are linked as alias/shortcut
PS: we have a database query which finds all private files of a user
Select u.firstname, u.lastname, u.username,
concat('<a target="_new" href="%%WWWROOT%%/user/view.php?id=',u.id,'">',u.id,'</a>') as 'ID and link to user profile',
DATE_FORMAT(FROM_UNIXTIME(u.lastlogin), '%e %b %Y') AS 'lastlogin', u.suspended AS 'active (0) or suspended (1) User', f.filename, f.filesize
from prefix_files AS f
JOIN prefix_user AS u ON u.id = f.userid
where filearea = "private"
Mayb it es easy to customise this query, but I don't know how to find out the courses and files which are placed via alias/shortcut. Any ideas?
thanks, br Anton