Change "Automatic" file type display behaviour

Change "Automatic" file type display behaviour

by Mark Ward -
Number of replies: 2

Hi Everyone,

I have been working with some new Moodle users over the last couple of weeks and one of the first topics I have covered with them is adding a file to a course (keeping it simple smile).

What I have noticed (and has been raised here before to some degree) is that some of the file types people upload are not displayed correctly by the "Automatic" display setting. Most of these issues are down to the configuration of the PC rather than Moodle bugs.

What I am looking for is a way to alter the "Automatic" display behaviour that Moodle uses so that I can, for instance, set PPTs to "Force Download" or PDFs to "Open in Popup". I am happy to make changes to core code and maintain those locally but so far I have had no luck finding the relevant PHP.

Has anyone had any run ins with this? Any help would be much appreciated.

Average of ratings: -
In reply to Mark Ward

Re: Change "Automatic" file type display behaviour

by Mark Ward -

Sorry, should have clarified that this is on Moodle 2.0.3.

In reply to Mark Ward

Re: Change "Automatic" file type display behaviour

by Mark Ward -

Seem's that nobody had the answer, in the end I found a definition for how to handle PDFs in mod/resource/locallib.php around line 365. I'm still not sure how PPTs and PPTX files are embedded but I would imagine its something similar.

mod/resource/locallib.php