File missings when uploading to an activity

File missings when uploading to an activity

by Eduardo Merino -
Number of replies: 2

Hello everyone!

Currently I'm having an issue on production enviroment when students and teachers upload their files to an activity (assign for example) and save the submission. For some reason moodle let then save the submission but when the user tries to download the file it says that it doesnt exists.

Enviroment information:

  • Moodle 3.9.4 (This issue started after we upgraded our moodle from 3.5 to 3.9.4)
  • PHP 7.4.3
  • Ubuntu 20.04.2 LTS
  • 5.7.mysql_aurora.2.09.2
  • This moodle is deployed on a AWS cluster mode architecture using a shared EFS where is located the moodledata directory. Auto-scalling creates new instances on demand.

I've been debugging the code and also the steps that the user followed, this is what i found:


Have anyone experienced this kind of error before? Is this something that can be solved patching moodle's core code?

Thanks in advance.

Average of ratings: -
In reply to Eduardo Merino

Re: File missings when uploading to an activity

by Gregor McNish -
Picture of Particularly helpful Moodlers
This may be totally unrelated, but what are the filenames like? We sometimes have issues with specific characters in filenames-- especially the long dash that Word likes to use. Users can upload and save the files, but when trying to download them we get a not found error. In this case though, it's possible to go into where it was uploaded and change the filename, and then it all works-- so the file can be found in the filedir.
Average of ratings: Useful (2)
In reply to Gregor McNish

Re: File missings when uploading to an activity

by Eduardo Merino -
Hi Gregor, thanks for your response.

The filenames usually are something like the following: "EX1_P6.pdf", "B323_grupo11.pdf" or "20183237_P2.xlsx". We haven't found special characters or long names on filenames.
We have validated that those files that can't be downloaded are no longer present on moodledata's filedir/