Moodle
  1. Moodle
  2. MDL-16123

Implement cURL for SCORM due to ISPs disabling allow_url_fopen

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.9.4
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Moodle 1.9.2+ (Build 20080806), PHP 5.2.5, Apache 1.3.41, MYSQL 4.1.22
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      35029

      Description

      Apologies if the SCORM cURL implementation is covered by the following:

      http://tracker.moodle.org/browse/MDL-8018
      http://tracker.moodle.org/browse/MDL-7947

      I am getting an IE Error 404 (and Firefox) when I try and open SCOEs with non-local resources (i.e. stored on a supplier's server). They were previously working and local SCOEs (with resources stored on our server) still work, but like many ISP's, they have recently disabled the allow_url_fopen function, as this is proving to be a major issue for my site as I have a large number of 'Midleaders' SCORMS (potentially 200) which I can no longer access, my ISP recommending that cURL is used as an alternative. They will not re-enable the function. We have around 800 users which means my site is in maintenance mode with a around 800 users unable to access their learning - so things are pretty desperate! I am on a semi-maintained shared server hosting plan with a UK company called Evo Hosting, so cannot make Apache configuration changes myself, although I have CPanel access and maintain our installation.

      I'd be happy to provide a test login if required, and use our site to test implementation.
      Thanks
      Stuart

      1. MDL-16123-usecurl.patch
        1 kB
        Dan Marsden
      2. MDL-16123-usecurlv2.patch
        3 kB
        Dan Marsden

        Activity

        Hide
        Dan Marsden added a comment -

        Hi Stuart,

        I've had a good look over the code, and I can't actually see anywhere in the Scorm code that uses include or fopen like this! I'm not sure that this is your problem.

        can you please provide a copy of one of the objects that is causing this issue for you (via e-mail is fine.) and we can investigate further?

        thanks,

        Dan

        Show
        Dan Marsden added a comment - Hi Stuart, I've had a good look over the code, and I can't actually see anywhere in the Scorm code that uses include or fopen like this! I'm not sure that this is your problem. can you please provide a copy of one of the objects that is causing this issue for you (via e-mail is fine.) and we can investigate further? thanks, Dan
        Hide
        Dan Marsden added a comment -

        I think Piers has found where this problem occurs - it might be due to the use of "copy()" in the function scorm_check_package() in scorm/locallib.php

        we should change this to use download_file_content() when $externalpackage is true.

        good work piers!

        Dan

        Show
        Dan Marsden added a comment - I think Piers has found where this problem occurs - it might be due to the use of "copy()" in the function scorm_check_package() in scorm/locallib.php we should change this to use download_file_content() when $externalpackage is true. good work piers! Dan
        Hide
        Dan Marsden added a comment -

        Hi Stuart - here's a patch that "might" fix the problem, it isn't tested though, so be careful with it!

        if this doesn't fix the issue, can you please turn debugging on for your site, and give any errors that display here?

        thanks,

        Dan

        Show
        Dan Marsden added a comment - Hi Stuart - here's a patch that "might" fix the problem, it isn't tested though, so be careful with it! if this doesn't fix the issue, can you please turn debugging on for your site, and give any errors that display here? thanks, Dan
        Hide
        Dan Marsden added a comment -

        attaching version2 of the patch missed a few other calls to copy() - Thanks Piers for testing.

        Dan

        Show
        Dan Marsden added a comment - attaching version2 of the patch missed a few other calls to copy() - Thanks Piers for testing. Dan
        Hide
        Dan Marsden added a comment -

        Stuart? - have you had the chance to test this? - if it works, we're keen to commit it to Core!

        Show
        Dan Marsden added a comment - Stuart? - have you had the chance to test this? - if it works, we're keen to commit it to Core!
        Hide
        Stuart Hiles added a comment -

        Apologies for the delay Dan.
        Good work chaps! Seems to have done the trick!
        Many thanks!

        Show
        Stuart Hiles added a comment - Apologies for the delay Dan. Good work chaps! Seems to have done the trick! Many thanks!
        Hide
        Petr Škoda added a comment -

        this should be already fixed in HEAD

        Show
        Petr Škoda added a comment - this should be already fixed in HEAD
        Hide
        Dan Marsden added a comment -

        finally got round to committing this to 1.9Stable - as petr mentions, this is already fixed in HEAD

        Show
        Dan Marsden added a comment - finally got round to committing this to 1.9Stable - as petr mentions, this is already fixed in HEAD
        Hide
        Dan Marsden added a comment -

        assigning Piers for QA

        Show
        Dan Marsden added a comment - assigning Piers for QA

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: