-
Improvement
-
Resolution: Fixed
-
Minor
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
At the moment, when users are uploading files into Moodle, that is not logged separately. Intead, whatever thing the file is part of (for example, an attachment to a forum post, or an assignment submission) gets logged when that thing is submitted (E.g. forum_post_added - but only if they remember to save the forum post, and then there is no specific information about the file).
However, some of the files that users upload are very, very important. For example the answers to an exam. And, based on our experience of administering exams over the last few years, sometimes students ring up and say "I uploaded this file to Moodle, but there is no sign of it now". At this point, it would be very, very helpful to have as much information recorded as possible about file uploads. In the web server logs, you can see the POST to repository/repository_ajax.php?action=upload..., but that is very limited information.
Therefore, we would like to add logging in repository_upload::process_upload, to log whenever a file has been successfully uploaded to a draft file area. At least for us, this would be very helpful. The log will include the file's filename and its size. (At the moment, the only way that a file upload gets logged is if the file fails virus scanning. That is logged.)
Total volumn of Moodle logs is a problem, but given the total number of files that get uploaded to Moodle, We don't think adding this logging will be excessive.
Questions we are not sure about:
- Should we log at the end of process_upload, or at the start? (Or even, both)
- Should we also log in webservice/upload.php?
- Testing discovered
-
MDL-77949 Add missing logging to core_files_upload in files/externallib.php
- Closed