counting number of files uploaded in Moodle

Re: counting number of files uploaded in Moodle

autor Tim Hunt -
Počet odpovědí: 1
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers
V odpovědi na Tim Hunt

Re: counting number of files uploaded in Moodle

autor Dario Roig Garcia -

Hello, you can try this SQL. You can obtain the sum of files in all folders that belong to one courseid. In the example 47255.

select sum(filesize) from mdl_files f, (select ctx.id from mdl_course_modules AS cm INNER JOIN mdl_context AS ctx ON ctx.contextlevel = 70 AND ctx.instanceid = cm.id INNER JOIN mdl_modules AS mdl ON cm.module = mdl.id LEFT JOIN mdl_folder AS  d ON cm.instance = d.id  where d.course = 47255 and cm.course = 47255) folder where f.contextid = folder.id;

Regards