Issue Details (XML | Word | Printable)

Key: MDL-16123
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dan Marsden
Reporter: Stuart Hiles
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Implement cURL for SCORM due to ISPs disabling allow_url_fopen

Created: 19/Aug/08 06:01 PM   Updated: 01/Dec/08 02:30 PM
Return to search
Component/s: SCORM
Affects Version/s: 1.9.2
Fix Version/s: 1.9.4

File Attachments: 1. Text File MDL-16123-usecurl.patch (1 kB)
2. Text File MDL-16123-usecurlv2.patch (3 kB)

Environment: Moodle 1.9.2+ (Build 20080806), PHP 5.2.5, Apache 1.3.41, MYSQL 4.1.22

Database: MySQL
Participants: Dan Marsden, Petr Skoda and Stuart Hiles
Security Level: None
QA Assignee: Piers Harding
Resolved date: 01/Dec/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden added a comment - 20/Aug/08 05:38 AM
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


Dan Marsden added a comment - 25/Aug/08 03:32 PM
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


Dan Marsden added a comment - 26/Aug/08 08:51 AM
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


Dan Marsden added a comment - 26/Aug/08 09:17 AM
attaching version2 of the patch missed a few other calls to copy() - Thanks Piers for testing.

Dan


Dan Marsden added a comment - 05/Sep/08 10:44 AM
Stuart? - have you had the chance to test this? - if it works, we're keen to commit it to Core!

Stuart Hiles added a comment - 05/Sep/08 03:23 PM
Apologies for the delay Dan.
Good work chaps! Seems to have done the trick!
Many thanks!

Petr Skoda added a comment - 25/Sep/08 03:34 PM
this should be already fixed in HEAD

Dan Marsden added a comment - 01/Dec/08 02:29 PM
finally got round to committing this to 1.9Stable - as petr mentions, this is already fixed in HEAD

Dan Marsden added a comment - 01/Dec/08 02:30 PM
assigning Piers for QA