Moodle Community Sites

Create one "directdownload.php" script to handle some downloads

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Component/s: download.moodle.org
  • Labels:
    None

Description

Right now we are publishing all moodle / langs / plugins ... downloads by using the "download.php script" that features accounting of downloads (http://download.moodle.org/stats.php).

But some downloads are escaping from being controlled:

  • lang packages downloaded from within moodle.
  • timezone files downloaded from within moodle.
  • environment files downloaded from within moodle.

it would be great to have one "directdownload.php" script able to serve all those files performing the accounting (and without the js and redirects present in current download.php script). And then, HEAD only, point to it for downloading those components.

For reference, here it's a nice file server (chuncked) for PHP that we could use as reference:

http://teddy.fr/blog/how-serve-big-files-through-php

Martin, Y/N ? Ciao

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Resolving this as fixed. Now we support direct downloads by prepending with "/direct". To consider if we use it from within Moodle (langs...).

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Resolving this as fixed. Now we support direct downloads by prepending with "/direct". To consider if we use it from within Moodle (langs...). Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Looking download logs I've detected bunch of "sourceforge" uses about MoodleCron-Setup.exe . I've moved it from sourceforge to http://download.moodle.org/download.php?windows/MoodleCron-Setup.exe and updated Docs pages pointing to it (English and Spanish versions).

There are also a few attempts to download some Moodle 1.4 and 1.5 from sourceforge... sure there are URLs out there still pointing to those killed URLs... I think it's ok to keep them not working anymore, yup?

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Looking download logs I've detected bunch of "sourceforge" uses about MoodleCron-Setup.exe . I've moved it from sourceforge to http://download.moodle.org/download.php?windows/MoodleCron-Setup.exe and updated Docs pages pointing to it (English and Spanish versions). There are also a few attempts to download some Moodle 1.4 and 1.5 from sourceforge... sure there are URLs out there still pointing to those killed URLs... I think it's ok to keep them not working anymore, yup? Ciao
Hide
Anthony Borrow added a comment -

Eloy - I think that the more information we have the better. Having a better sense of what languages are being downloaded would be good. I'm attaching a diff file for Moodle 1.9 of some possible areas we may want to change. I simply searched the code base for download.moodle.org and in most places added the download.php/direct bit; however, I have done no testing to see if this is the correct usage and that any of it actually works. I thought it would provide some idea of what might all need to be changed. Use the patch in so far as it is helpful, ignore it if it is less than helpful. Peace -Anthony

Show
Anthony Borrow added a comment - Eloy - I think that the more information we have the better. Having a better sense of what languages are being downloaded would be good. I'm attaching a diff file for Moodle 1.9 of some possible areas we may want to change. I simply searched the code base for download.moodle.org and in most places added the download.php/direct bit; however, I have done no testing to see if this is the correct usage and that any of it actually works. I thought it would provide some idea of what might all need to be changed. Use the patch in so far as it is helpful, ignore it if it is less than helpful. Peace -Anthony
Hide
Anthony Borrow added a comment -

untested possible list of changes for Moodle 1.9

Show
Anthony Borrow added a comment - untested possible list of changes for Moodle 1.9

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: