Filter embed word documents

Filter embed word documents

by Hittesh Ahuja -
Number of replies: 4

Hi All,

Thinking of writing a simple Filter plugin that allows users to display a word document embedded to Moodle. There are two issues I see here : 

1) Safe Harbour - Google does not disclose where it stores its file and data so technically the file and its contents can be stored anywhere around the world 

2) 'X-Frame-Options' to 'sameorigin' - since I'll be using the live service - docs.google.com to convert , say a docx to an google doc format, most sites would have the issue of displaying content from a different origin. 


Do you guys think this could be an issue in the uptake of the plugin ? I dont want to start coding unless I know I am on the right path and don't want it to be shot down by @David Mudrak for any security reasons  ;) 


Thanks in advance. 


Hittesh

Average of ratings: -
In reply to Hittesh Ahuja

Re: Filter embed word documents

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

This is a nice idea, (I would say that, because I had thought of it myself a while back). Rather than use Google Docs to convert to HTML, what about using Unoconv to convert to PDF instead?

Alternatively, I have developed the Atto plugin Microsoft Word File Import which contains (mainly XSLT) code to convert .docx files into HTML. You could re-use this code to implement the feature you want, avoiding any external service. (We have found Unoconv quite finicky, and have had to implement a watcher to restart it periodically.)

I think it would also be nice to offer a facility for a Lecturer to opt to insert the content into the File resource Description field, or even permanently replace the File resource containing the Word file with a Page resource containing the converted content.

In reply to Hittesh Ahuja

Re: Filter embed word documents

by Becky Borello -

Hello,


I was just wondering if you proceeded with this filter plugin or if you found a viable workaround.  


Thanks,

Becky

In reply to Hittesh Ahuja

Re: Filter embed word documents

by Maxime Taisne -

Hi Hittesh,

When it comes to MS Office documents, it seems right to say that Microsoft's tools are better to handle them than the competition's.

For instance, MS provides an online doc viewer: https://products.office.com/en/office-online/view-office-documents-online. Perhaps this is a starting point to develop an inline converter within Moodle.

There is already a OneDrive converter for Moodle but it requires a OneDrive account and it creates a PDF version of the doc: https://moodle.org/plugins/fileconverter_onedrive

For institutions that have an Office365 plan, there are also plugins to embed Office docs hosted in the user's cloud storage.

Of course all of these solutions requires the agreement to MS terms of service. I recommend using open doc formats instead.

Average of ratings: Useful (1)