Assignment file will not convert to PDF during grading

Assignment file will not convert to PDF during grading

by Dennis Fulton -
Number of replies: 8

Moodle 3.11.4 on Ubuntu 20.04 
unconv 0.7
LibreOffice 7.3

A student submission file will not convert to PDF.  Get an error message: "Some files in the submission can only be accessed by download."  The file is a .docx file.  It downloads and opens in Word on the local computer as it should.  I have been able to recreate the issue by copying the file to my test course submitting with different users.  The same problem, won't convert.  I opened and re-saved the file as a .docx, and .doc with different file names.  Same problem.  I save the file as an .odt file and it works.  I run unoconv  from the command line and it works on all three of the file formats. 

 I have switched the document convert plugin from unoconv to Google and Microsoft.  All three converters give the same error.  In any one course there will be one or two students whose files will not convert.

Is anyone else having issues with some files not converting to PDF in the assignment grading?  The conversion works on most file submissions, but there are those certain files that won't convert to PDF.

Average of ratings: Useful (1)
In reply to Dennis Fulton

Re: Assignment file will not convert to PDF during grading

by Dennis Fulton -
The more I look at this the more confused I get. I have disabled the Document Conversion plugin (all three of them), and Moodle will still convert the Word files into PDFs except for those few Word docs. How is it that Moodle is converting files to PDF during the grading of uploaded assignments with the plugins disabled?
In reply to Dennis Fulton

Re: Assignment file will not convert to PDF during grading

by Ken Task -
Picture of Particularly helpful Moodlers

"I have disabled the Document Conversion plugin (all three of them)"

So you have unoconv, Google, and another ... is that One Drive?

Would think that you need to have at least one active, even if having issues with only certain docs submitted ... other wise, your ad-hoc task list of to-do's will build up quite a list and could make things worse! :\

'SoS', Ken

In reply to Dennis Fulton

Re: Assignment file will not convert to PDF during grading

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I've seen this problem occasionally. I believe there are some constructs in Word that may break in other editors, such as anchored images or text boxes. If you save the .odt file back to .docx format, does it work then?
I don't think there is much you can do about it, other than encourage students to submit PDF rather than Word files. If it becomes a major issue you could enforce PDF upload rather than Word.
In reply to Eoin Campbell

Re: Assignment file will not convert to PDF during grading

by Dennis Fulton -

Great idea!  I tried changing the converted .odt file back to a .docx file.  It works.  All three document converters worked Unoconv, Google, and OneDrive displayed the file as a PDF.  So that confirms there is something in the initial .docx file that is breaking the conversion for the onscreen PDF.  This happens the most when the facilitator provides a template for students to download edit and then submit.  

Any idea on how Moodle continues the conversion to PDF when the Document Conversion plugin is disabled? 

Thanks for the idea to narrow down the issue!

In reply to Dennis Fulton

Re: Assignment file will not convert to PDF during grading

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
My understanding is that Moodle cannot convert a Word or any other file to PDF if there is no Document Conversion plugin enabled. If the student submits a PDF file directly, then I believe Moodle can internally process the PDF file into a sequence of images (one per page). It is these images that are actually displayed in the online grading interface, allowing you to annotate them, not the PDF file itself.
In reply to Eoin Campbell

Re: Assignment file will not convert to PDF during grading

by Dennis Fulton -

That was my understanding as well, that there needed to be a document conversion plugin for Moodle to convert a Word doc to PDF.   The strange thing is that when I disable the document conversion plugin, Moodle still converts most Word docs to PDF.

In reply to Dennis Fulton

Re: Assignment file will not convert to PDF during grading

by Eric Bryant -
We've seen this problem with certain MAC computers either using the MAC version of Word or using Pages and trying to convert to Word. Ask your students if they are on an Apple computer. Just another thought on trying to narrow this down for you. Good luck!