3.5.10 unoconv

3.5.10 unoconv

by Steve Howard -
Number of replies: 9

I just updated my test server to 3.5.10 and now unoconv version (0.6) included with Redhat 7 is no longer supported. What to do? Annotated PDF assignment grading no longer works.

Average of ratings: -
In reply to Steve Howard

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers
unoconv is really a python script and there should be a unoconv.noarch available via yum.

What do you get issuing:
yum search unoconv

Also what do you get when issuing:
unoconv -V

Think many have had troubles with unoconv method of document conversions due to all the pieces needed to make it work:
a Listener which calls LibreOffice in a headless mode to LO's converter, converts file, then back to Moodle for ghostscript display.

I have a CentOS 7 server ... RH7 without the 'eye candy' ... and on it:
unoconv -V shows

unoconv 0.8.2
Written by Dag Wieers Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/linux2
python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
LibreOffice 5.3.6.1

Unoconv and LibreOffice acquired by yum - package manager.

yum search unoconv

should show a unoconv.noarch

Might be time to switch to Google docs conversion. ;)

'SoS', Ken
In reply to Ken Task

Re: 3.5.10 unoconv

by Steve Howard -
From RHEL 7.6
yum search unoconv
unoconv.noarch : Tool to convert between any document format supported by LibreOffice

[root@testmoodle ~]# unoconv -V
unoconv 0.6
Written by Dag Wieers Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/linux2
python 2.7.5 (default, Jun 11 2019, 12:19:05)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
LibreOffice 5.3

I don't think I want all my students' assignment submissions going to Google. Would rather fix what we have been using.

On my test system, the pdf is created, it is just blank. You can annotate the blank pdf.

In the Server >> Environment shows unoconv is not the supported version.

Thanks,
Steve


Steve Howard
Linux Systems Engineer
Average of ratings: Useful (1)
In reply to Steve Howard

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers

"I don't think I want all my students' assignment submissions going to Google. Would rather fix what we have been using."

Well then file a tracker report.  But since 3.5.x is no longer supported for bug fixes ... only security ...

https://docs.moodle.org/dev/Releases#Moodle_3.5_.28LTS.29

Think that will go no where - but if you are willing to try:

https://tracker.moodle.org/secure/Dashboard.jspa

Guess you could look into 'other' ... like NextCloud/OwnCloud.

'SoS', Ken


In reply to Steve Howard

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ...

Just upgraded a 3.5.x sandbox to highest 3.5.10+.

Yes, unoconv document conversion is broken!

Here's what happens when using the test link.
Grinds away a bit, says converted, but when the converted 'document.pdf' file is downloaded (should launch in Firefox on a Mac with Preview) it says can't open and suggest the file is corrupted.  

Well, not really ...
in viewing document.pdf discovered it's really the front page of the moodle rendered like css wasn't working ... ie, a web page ... and one was not logged on.   Strange!

How about you ... if you change document.pdf to document.html what does your's look like?

Why I ask ... this Mac am on had issues with upgrade to Catalina ... so am wondering 'bout that.   Don't have any other machine available to test.

'SoS', Ken


In reply to Ken Task

Re: 3.5.10 unoconv

by Steve Howard -
Evidently, Moodle thinks the version of unoconv has a security problem. I have yet found a unoconv .7+ package created for RHEL 7. Maybe I will have to create one myself.
In reply to Steve Howard

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers

"Moodle thinks the version of unoconv has a security problem."

How so?  Are you running mod_security or other WAF?  Are you seeing references in any of your OS logs?

'SoS', Ken


In reply to Ken Task

Re: 3.5.10 unoconv

by Steve Howard -
The long term support version 3.5.10 only gets security updates, right? No features fixed or bug fixes.

If I go to Admin >> Server >> Environment, moodle reports "The version of unoconv you have installed is not supported."

This was not the case for 3.5.9, it was working just fine. So one can only assume that moodle has stopped supporting unoconv .6 becuse of a security reason. Correct?
In reply to Steve Howard

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers

In a server I have on Rackspace (3.10.0-1062.9.1.el7.x86_64)

3.5.10+ (Build: 20200124) of Moodle code

unoconv -V

unoconv 0.8.2
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/linux2
python 2.7.5 (default, Aug  7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
LibreOffice 5.3.6.1

GS path: /usr/local/bin/gs

version: GPL Ghostscript 9.26 (2018-11-20)

Python path: /usr/bin/python

version: Python 2.7.5

Doc conversions via unoconv are broken.

Google conversions are not.

When I view Server Environment with updated component, I get no check of version of  unoconv and no report of it being in-compatible.

"So one can only assume that moodle has stopped supporting unoconv .6 becuse of a security reason. Correct?"

Can't speak for Moodle HQ nor developers ...

?????

https://docs.moodle.org/38/en/Universal_Office_Converter_(unoconv)

https://moodle.org/mod/forum/discuss.php?d=335310

'SoS', Ken

In reply to Ken Task

Re: 3.5.10 unoconv

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ...

When downloading the 'test' file ... saves as 'document.pdf'.   But Mac I have says can't open in previewer (an AdobeAcrobat like reader for PDF's).  Says cannot read possible corruption.

*** BUT *** if I change the filename extension from .pdf to .html via command line and view the head of the file, here's what I see:

Kens-MacBook-Pro-2:test2 kentask$ head -n 3 document.html
<!DOCTYPE html>

<html  dir="ltr" lang="en" xml:lang="en">

If I leave document.pdf alone, here's what I see:

Kens-MacBook-Pro-2:test2 kentask$ head -n 3 document.pdf

<!DOCTYPE html>

<html  dir="ltr" lang="en" xml:lang="en">

** conclusion ** the test is broken!!!!  Rather than sending a .pdf, it's sending an .html page which is the front page of the moodle with no css and showing the login button - top right of the HTML page am viewing locally.

IF, in the site, I upload a .docx as a student - BTW, in 3.5.10 there is an option for what types of documents to accept now ... limited by extension.  In my test 'upload a file' module, I set this to * ... all file types.

Submitted a .docx file as student for that assignment.

Log off as student.

Login as admin.

Go to assignment.

Select the student account ... hit grade button and the .docx is rendered as a PDF where I can annotate ... annotate buttons across the top of the annotation screen.

** conclusion ** the test is broken!!!! - at least with mine!

'SoS', Ken

Average of ratings: Useful (1)