Assignment submission docx unable to view

Assignment submission docx unable to view

Bởi T K -
Số lượng các câu trả lời: 17

We are using Moodle 4.0.4 and we have setup our assignment submission to allow PDF, doc, Docx



We have students submitting in docx format, however when the marker logs in to grade the work, they see a blank page, and this error:
'some of the files in this submission can only be accessed by direct download'




Is this a bug? I see that in some other Moodle versions the similar situation happened as well:
https://tracker.moodle.org/browse/MDL-65925

Is there a solution for this?
This is urgent, I really hope someone can help.

Trung bình điểm đánh giá: -
Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Ken Task -
Hình của Particularly helpful Moodlers

Your screen shot cuts off the right column of that screen where one would normally see 'Feedback' and a link to the file(s) submitted.  

In setup of the assignment, what are the Feedback types?

Error suggest more than one document was submitted?

Does the path to Ghostscript check out? and has that been tested?

Cron job/task for conversions running OK?

There is also an addition ... path to pathtioppm - Poppler.   Comment under that path setting says:
"Poppler is a PDF rendering library which includes the tool pdftoppm for converting PDF files to PNG. Performance is generally better than when using Ghostscript, particularly for large files. If available, pdftoppm will be used in preference to Ghostscript. On most Linux installs, the path can be left as /usr/bin/pdftoppm. Otherwise, you need to install the poppler-utils or poppler package, depending on your Linux distribution. On Windows it is provided by Cygwin installs."

The bug report you linked to was fixed and had a process to replicate the issue. And, your version of Moodle is behind ... highest is now Moodle 4.0.6+ (Build: 20230210)

In addition, have you checked server's error logs?   Is site using a web application firewall (like mod_security/other), which might prevent conversions?

'SoS', Ken

Để phản hồi tới Ken Task

Re: Assignment submission docx unable to view

Bởi T K -
Feedback comments;

Feedback settings:


for Docx file types, what are the settings that I have missed? I know nothing about ghostscripts.

Appreciate if you can guide me on this. Thanks.

Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Emma Richardson -
Hình của Documentation writers Hình của Particularly helpful Moodlers Hình của Plugin developers

Do you have the pdf converter set up?  You need to look at the pdf annotation settings and also under your server settings, see if you have ghostscript referenced correctly?

Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Ken Task -
Hình của Particularly helpful Moodlers

Was trying not to overwhelm ya!   But ... here we go ...

A Moodle 4.0.6+ with an assignment for submission that requires a .docx screen looks like the following screen shots.







One thing you have not checked: Manage Document Converters Site administration -> Plugins -> Document converters -> Manage document converters

You have 2: Google Drive and Unoconv

Which is your site set to use?

And of those 2, if Unoconv, do you have all the backend requirements meet: Python, Unoconvrt (a python script), LibreOffice (in headless mode), and the configuration of a listener?


'SoS', Ken
Để phản hồi tới Ken Task

Re: Assignment submission docx unable to view

Bởi T K -
OK now i know document converter is whats missing.

So I enabled here. Do I need to setup google drive?



Should i set this? We dont have OAuth service settings:


I purged cache & restarted my NGINX services.

Then I updated the cron to run every minute (for test sake):


I try to annotate the same docx, but its giving the same error:


Does the Google drive settings require something else?

Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Ken Task -
Hình của Particularly helpful Moodlers

Ah, hah!   A clue ... look at your Submission column under the TM7-blah.docx.
What do you see: TurnItIn ID number
I don't run TurnItIn so is there an area for config of that in your system?
That might be your document conversion and you wouldn't need Google nor Unoconvert.

Also, in Task list there should be a task for prepping the docs for grading ...
If you set php-cli path in paths, there will be a 'run now' link under that.

Site administration -> Security -> Site security settings
Allow 'Run now' for scheduled tasks is checked

Site administration -> Server -> System paths
Path to PHP CLI pathtophp - which is the same path you have for the setup of your cron job.

Site administration -> Server -> Tasks -> Scheduled tasks -> Scheduled tasks
Prepare submissions for annotation \assignfeedback_editpdf\task\convert_submissions
Run Now

I don't run TurnItIn so there might be a task for it was well .... if so, run now.

'SoS', Ken

Để phản hồi tới Ken Task

Re: Assignment submission docx unable to view

Bởi T K -
We have the turnitin but we only use it to generate the similiarity index. We dont want to grade via turnitin because we want the grades to be stored in the Moodle grades table itself.

I guess we still need the doc conversion to work.

I have done the php-cli and the run now. However i still see the same problem.

The convert_submissions task is running successfully though:


No error from Google drive indicated. Is that normal?
Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Ken Task -
Hình của Particularly helpful Moodlers

I mean the following in the kindest way .... what part of "I don't run TurnitIn' don't you understand? cười  

How about this then ... I know nothing about TurnItIn ... but it's additional on that assignment.

I do use Google - it works.  I can use Unoconvert as well ... that works, but, again, I don't use TurnItIn with either nor in any assignment.

Is it normal for Google to work ... well, I can only say that it's more reliable than unoconvert on servers that I admin.   But that's my servers ... not yours! cười

I see TurnITIn is part of a set:

https://moodle.org/plugins/browse.php?list=set&id=52

Are all TurnItIn plugins up to date on your server?   There's a block for it that doesn't show to be compatible with version 4 of moodle.

Is there a way you could turn TurnitIn off for that assignment to see if converstion/annotation then works?

Have taken this as far as I can, me thinks!

'SoS', Ken


Để phản hồi tới Ken Task

Re: Assignment submission docx unable to view

Bởi T K -

Hi Ken, Thanks for the kindness 😅 and really guiding me through this, i really appreciate you taking your time.

Thanks for the suggestion, ok so I did turn off the turnitin, and then try the annotation for the same submission, i get the same error:



Looks like I either have to get that Google setup done or just stick to PDF submission to just avoid any kind of conversion altogether.


Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Ken Task -
Hình của Particularly helpful Moodlers

Submission column.
Draft not submitted - as that student account ... submit!

Yet ... "Marking completed"?
Student can edit this submission
And there is a grade?   remove grade!

Marking Workflow shows 'marking completed'

Nginx ... hmmmmm

Updated cron to run every minute is what it's supposed to be!
What was cron set to?

Are there any adhoc task in que?

Moodle version 4.0.4 - highest/most fixed Moodle version is 4.0.6+

Ok, maybe we need to dig deeper ....

How are you hosted?  (shared/dedicated VPS)

With what provider?

Do you have a web appication firewall (WAF) ... like mod_security?

If you do have a WAF, have you checked it's logs? 

'SoS', Ken


Để phản hồi tới T K

Re: Assignment submission docx unable to view

Bởi Susan Mangan -
Hi T K! Just wondering if you ever figured this one out? I'm encountering this myself - just upgraded to version 4.1.8 in December and we use unoconv.

Cron logs indicate that the submission has been successfully converted. But it has not been - the same error message is displayed in the Teacher Assignment view.

If I take the student assignment and save-as and re-upload it ends up getting converted but not the original and so far I have not been able to identify what property in the docx file exists that is tripping up the converter.

Still testing/googling but stumbled upon this post and thought I'd reach out cười
Để phản hồi tới Susan Mangan

Re: Assignment submission docx unable to view

Bởi Michael Hughes -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers
We had issues with something similar, where the unoconv converter didn't physically exist at the expected point, but we weren't getting any error messages in the cron at all about this.
Để phản hồi tới Michael Hughes

Re: Assignment submission docx unable to view

Bởi Helen Foster -
Hình của Core developers Hình của Documentation writers Hình của Moodle HQ Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của Translators

Hi Susan,

I searched for the error message 'Some of the files in this submission can only be accessed by direct download.' and came across an improvement issue, MDL-62626, which you may like to vote for or watch to receive notifications of updates.

Trung bình điểm đánh giá:Useful (1)
Để phản hồi tới Helen Foster

Re: Assignment submission docx unable to view

Bởi Susan Mangan -
Oh thanks Helen! I did find that tracker item yesterday as well and started watching it (and voted). I should have added that comment!