Ideally, we should implement backend logic that would prevent the conversion failure of the assignment submission. A student can upload an assignment submission file and lateer rename the file in the Filepicker. In some cases the renamed file can be without an extension (removing the file extension) or a different extension than the original which might not be supported by the document converter. This would result in failure in the conversion of the assignment submission.
Steps to recreate the problem:
- Log in as a student
- Submit an assignment (myassignment.docx)
- Click the file in the 'File submissions' panel
- Remove the .docx file extension from the 'Name' box (image 1)
- Press 'Update'
- Log in as a teacher
- Visit the assignment and press 'Grade' for the student
- The review panel (left) is blank
Some of the potential proposed solutions include checking for the file signature ('magic' number), obtaining the original extension and appending to the filename before sending it to the document converter.