Moodle

Option to force download of file resources

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.4, 1.8.4, 1.9
  • Fix Version/s: 1.9.1, 2.0
  • Component/s: Resource
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Currently, media resource files are automatically embedded whenever possible. This can cause issues, especially if the different software plugins are broken or buggy, as most are. The course creator may decide to bypass the embedding entirely, and present the files as download links,

This patch (see attached) adds this option to the file resource creation form.

  1. resource_file_with_force.patch
    13/Mar/08 2:00 AM
    5 kB
    Eloy Lafuente (stronk7)
  2. resource_file.patch
    12/Mar/08 10:41 PM
    5 kB
    Nicolas Connault

Issue Links

Activity

Hide
Sam Marshall added a comment -

I know it wasn't me you were asking but I happened to look at it anyway (procrastinating). It looks good to me...

Show
Sam Marshall added a comment - I know it wasn't me you were asking but I happened to look at it anyway (procrastinating). It looks good to me...
Hide
Eloy Lafuente (stronk7) added a comment -

Attached it's one v2 pach. It implements all the changes from previous patch + adding the required "forcedownload=1" when resources are displayed with file.php.

I haven't checked all the "slasharguments" possibilities, plz, review.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Attached it's one v2 pach. It implements all the changes from previous patch + adding the required "forcedownload=1" when resources are displayed with file.php. I haven't checked all the "slasharguments" possibilities, plz, review. Ciao
Hide
Nicolas Connault added a comment -

Works very well with my test resources, Eloy, thanks!

Show
Nicolas Connault added a comment - Works very well with my test resources, Eloy, thanks!
Hide
Eloy Lafuente (stronk7) added a comment -

Well, now it's time to decide the "Fix Versions" if we want this to be included at some point. Adding Martin here...

Show
Eloy Lafuente (stronk7) added a comment - Well, now it's time to decide the "Fix Versions" if we want this to be included at some point. Adding Martin here...
Hide
Petr Škoda (skodak) added a comment -

my +1 for 2.0

in 1.9.1 we could document somehow the ?forcedownload=1 workaround

Show
Petr Škoda (skodak) added a comment - my +1 for 2.0 in 1.9.1 we could document somehow the ?forcedownload=1 workaround
Hide
Eloy Lafuente (stronk7) added a comment -

Petr, really? Are you serious with that? Telling how to invoke urls manually? I don't think it's a nice (usable) solution, sincerely.

No problem delaying this to 2.0, but, IMO, if nothing prevents it to fit in 1.9.x... and it's working... why not put it there?

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Petr, really? Are you serious with that? Telling how to invoke urls manually? I don't think it's a nice (usable) solution, sincerely. No problem delaying this to 2.0, but, IMO, if nothing prevents it to fit in 1.9.x... and it's working... why not put it there? Ciao
Hide
Petr Škoda (skodak) added a comment -

oki, put it there :-D

Show
Petr Škoda (skodak) added a comment - oki, put it there :-D
Hide
Nicolas Connault added a comment -

Applied to HEAD and 1.9.1

Show
Nicolas Connault added a comment - Applied to HEAD and 1.9.1
Hide
Richard Burton added a comment -

Hi Nicolas

I have tried to patch and just FYI the lang there are no lang entries for the text [[forcedownload]]

Also I have run more tests and this is not just an IE7 issue, I can replicate it on IE6 if you make sure the keep navigation bar visible is set.

The problem with the patch is that you loose the navigation bar, this I feel is an issue which was not present when using the admittedly less clean frames implementation in 1.6. Whether changing to using embedded objects is a cleaner implementation is irrelevant to users, they just want to see the file and as such will view the current patch as a backward step. We can all blame Microsoft and their browsers however the fact remains that the majority of users use IE and if Moodle wants to maximise its appeal as a learning platform then accommodating IE I'm afraid is a reality.

In my view a patch that gives users the option of using frames instead of confusing them with a view without navigation would be more useful?

Show
Richard Burton added a comment - Hi Nicolas I have tried to patch and just FYI the lang there are no lang entries for the text [[forcedownload]] Also I have run more tests and this is not just an IE7 issue, I can replicate it on IE6 if you make sure the keep navigation bar visible is set. The problem with the patch is that you loose the navigation bar, this I feel is an issue which was not present when using the admittedly less clean frames implementation in 1.6. Whether changing to using embedded objects is a cleaner implementation is irrelevant to users, they just want to see the file and as such will view the current patch as a backward step. We can all blame Microsoft and their browsers however the fact remains that the majority of users use IE and if Moodle wants to maximise its appeal as a learning platform then accommodating IE I'm afraid is a reality. In my view a patch that gives users the option of using frames instead of confusing them with a view without navigation would be more useful?
Hide
Nicolas Connault added a comment -

You make an excellent point, Richard, and I agree with you. However, since 1.8 Moodle has an obligation (legal in some countries where it is used) to implement only XHTML strict code. Frames are not valid at any level of the XHTML spec, so we can't provide an option to use them in the core Moodle code.

Until MS and Adobe get their act together, the only acceptable compromise I can see is to offer a download link.

I will fix the issues you reported above.

Show
Nicolas Connault added a comment - You make an excellent point, Richard, and I agree with you. However, since 1.8 Moodle has an obligation (legal in some countries where it is used) to implement only XHTML strict code. Frames are not valid at any level of the XHTML spec, so we can't provide an option to use them in the core Moodle code. Until MS and Adobe get their act together, the only acceptable compromise I can see is to offer a download link. I will fix the issues you reported above.
Hide
Ryan Smith added a comment -

On my 1.9 install I also see [[forcedownload]]

Also, the help file for the feature is missing.

Show
Ryan Smith added a comment - On my 1.9 install I also see [[forcedownload]] Also, the help file for the feature is missing.
Hide
Eloy Lafuente (stronk7) added a comment -

The missing lang string and help file were fixed by MDL-14010.

Closing this. Ciao

Show
Eloy Lafuente (stronk7) added a comment - The missing lang string and help file were fixed by MDL-14010. Closing this. Ciao
Hide
Anthony Borrow added a comment -

For what it is worth, I was having trouble viewing embedded pdfs running FF3 on Ubuntu but I've had other problems with Java that make me think there may be something quirky with my installation.

Show
Anthony Borrow added a comment - For what it is worth, I was having trouble viewing embedded pdfs running FF3 on Ubuntu but I've had other problems with Java that make me think there may be something quirky with my installation.

Dates

  • Created:
    Updated:
    Resolved: