Guess the next step is to see if this submitted file is in mdl_files table
show all submitted ...
select id,contenthash,filearea,filename,userid from mdl_files where filearea = 'submission_files';
you could add to query where clause the userid ...
select id,contenthash,filearea,filename,userid from mdl_files where (filearea = 'submission_files' and userid = 217);
Also ... the assignment itself ... does it have a setting for file type restrictions ... like .docx only?
Am about of sluething ideas ...
'SoS', Ken