Resource types

Moodle and document viewers

 
Picture of riddhi shah
Moodle and document viewers
 

I want to integrate different files (ppt, doc, xls and more) but i am not able to find viewers for them. When I am including those files on course creation then while viewing those files, it's simply getting downloaded. Please suggest if there is already any plugin available for the same or I need to develop something from scratch.

 
Average of ratings: -
Frankie's the name, Moodle's my game!
Re: Moodle and document viewers
 

Hi Riddhi

I am working on something along the same line. See my blog post at Moodurian.blogspot/com. I use the view.officapps.live.com free Ms Office document viewer. But it only works by modifying core code, and if the files are accessible by the public. ;-(

For a demo, login to the Le Boffin's Lab course page at http://www.cambridgekids.org/m29 as Guest. Play around with the coursepage's contents and see what you like or don't like in it!


 When I am including those files on course creation then while viewing those files, it's simply getting downloaded
>
See Tim Hunt's comments here. In order for the JQuery viewer to work on my site, I had to tamper with core code (on my prototype sandbox Moodle site, that is!) by adding the code in boldface:

function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownload=false, array $options=array()) {
    global $CFG, $COURSE;
   //Added by Frankie Kam on 20th May 2015
   $forcedownload = false; 
   ...
}
Scary stuff! Yikes!!!


In addition, I can open an Ms Excel file that is stored in a folder with linux permissions set to 755 on my web server via:
https://view.officeapps.live.com/op/view.aspx?src=http://www.cambridgekids.org/moodle/test/test.xlsx
but when I try to access the same file that has been uploaded to a Moodle folder resource, this fails:
https://view.officeapps.live.com/op/view.aspx?src=http://www.cambridgekids.org/moodle/test/test.xlsx

I don't think I can solve it as it involves security issues. Officeapps.live.com can't get past the login details needed to access the file located at the URLhttps://view.officeapps.live.com/op/view.aspx?src=http://www.cambridgekids.org/m29/pluginfile.php/38/mod_folder/content/0/test.xlsx
which is the crux of the problem.

Any ideas, anyone?
Cheers, Frankie Kam


 
Average of ratings: -