Quantcast
Channel: Assignment
Viewing all articles
Browse latest Browse all 9625

Re: How to delete assignment files converted with unoconv?

$
0
0

by Nathan Rosenquist.  

Howard: After some more digging into the issue today I strongly agree, this is clearly a bug. I discovered that the converted PDFs are actually PNG images, and they get ingested into the File API after being created like any other uploaded files. If you open Firebug to the Network tab on an assignment grading page and filter for images you'll see, at least in the case of a 1-page upload, a PNG image called image_page0.png. The Request URL of this image is it's File API link, and the 'ETag' response header is it's filedir hash.

In an experiment to see if the original document would get re-converted by unoconv if the first attempt is removed, I wrote a script that had the File API delete the converted version. Unfortunately I don't know if this works, because there are 20+ students in the class who's uploads failed to convert and thus they all have identical blank image_page0.png images and thus the File API is referencing the same hashed file for all of them, and I would need to remove all 20+ references to it if the File API is to possibly remove it - And even if it did I doubt if the assignment page is savvy enough to then have unoconv give it another go.

Basically, there's not a 'quick fix' script method to remove failed conversions and get unoconv to re-convert. A check for failed conversion (Maybe checking for a too-small file) and re-convert will have to be added in a future version of Moodle.


Viewing all articles
Browse latest Browse all 9625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>