## SCORM

### SCORM Displays Menu, Content Blank

Hello Everyone,

I've been searching Google and this forum and can see the errors I'm getting aren't unique to me, but either no solution is posted or my attempts to follow the solutions of others have as yet failed.

Uploading a SCORM file results in my ability to see the menu, but where the content should appear, it is simply blank.

IE Provides a JavaScript error referring to pluginfile.php, which didn't seem too helpful. Setting Moodle to open SCORM content in a new window results in the following errors displaying:

No valid arguments supplied or incorrect server configuration

Stack trace:
• line 429 of /lib/setuplib.php: moodle_exception thrown
• line 39 of /pluginfile.php: call to print_error()
Unfortunately, I'm not sure how to trace what is causing these errors.
I've some suspicion the answer is that the shared hosting is missing some features required, but wanted a solid answer (and solution not involving moving if possible) before moving forward.
I've used a variety of SCORM files, including the example ones from the main SCORM site. I'd be happy to share a specific file or use one provided for testing purposes.
• Slash Arguments, though I had some issues with these breaking links to files.
• Reinstalling Moodle
• Installing Moodle/testing on local Linux machine
• Changing a variety of php.ini settings such as AcceptPathInfo & cgi.fix_pathinfo=1
Setup of the site:
• 1 & 1 Shared Hosting, Linux Server
• Moodle 2.0.3 (Build: 20110505)
• Various SCORM files
Notes:
• XML-RPC is not setup on the server
• There was a note of checking zip url's in admin/server/system paths, but there is no zip or unzip path option here for me
I hope this information is complete enough for you, I'm sure there will be something I've forgotten. Any help would be appreciated and I'm sure for purposes of historicity, there will be another person like me in the future that would love to find a solution simply for the problem.
Thanks in advance to everyone that ponders a solution.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank
Hi Robert,

Good job! Plenty of information here. I don't think the issue is with specific files. Your content files aren't being pulled out of moodledata for some reason. What exactly happened when you tried to install on a local Linux machine? Have you tried adding other Moodle course activities, or just SCORM activities? Do other activities result in the same errors?

I don't believe that paths to zip and unzip apply for M2. If I remember right, the version of php required for M2 is better at handling large zip files.

The first thing I would do is check your moodledata permissions. If you are able to add other activity types, including files/resources, and access them, then this does point to a scorm-specific issue. Also, though I know this isn't super helpful, have you tried a more recent build? I have a localhost install of Moodle 2.0.3+ (Build: 20110525), but we are now well beyond that.

Regards,
Amy

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

Thank you so much for your response.

I'd been considering that perhaps the data wasn't being taken from the moodledata folder, but the file structure was a little too confusing for me to be able to manually go in an attempt anything. Couldn't even work out how to verify whether the SCORM data was even in there.

Much the same happened on the local Linux install - no content in the window where this content should be. I suspected that the settings for the local Linux install could be wrong though, so wouldn't want to put much weight in the local test. I mentioned this more as I thought perhaps there was an obvious step in setting up Moodle/something that I had missed.

Other activities DO work though, it seems to only be SCORM files not working. As I think I mentioned I did have an issue with files I'd attached to lessons, which was solved by disabling Slash Arguments.

Not entirely sure what other permissions to check on the moodledata folder, I've even set it to 777 to ensure permissions shouldn't be an issue. Due to this being shared hosting, it is held in the shared root, along with the actual site (domains are just pointed a directory further down). But I didn't think this would cause any issues in actually accessing the moodledata folder.

I actually attempted to install the most recent release, but it appears to require a version of PHP my host has yet to install, I'd planned to ask when this was going to be installed, but made the assumption the response would be a shrug of the shoulders. I then reinstalled a copy of the most recent release compatible with this version of PHP - Moodle 2.0.3+ (Build: 20110719). Still the same issues though I'm afraid.

This is about the brick wall I seem to have been running into, if you think its likely an issue with Moodledata, is there a way I can manually put data in there, or manually call it in a the way SCORM does? Enabled the debugging tool, but didn't understand enough of it to make any use of it I'm afraid.

Thanks once again for your help.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Robert,
give AcceptPathInfo On a try in your Apache deploy:

<IfDefine APACHE2>    AcceptPathInfo on</IfDefine&gt

HTH,
Matteo

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

Thanks for the suggestion.

I've tried this out, inserting it into the .htaccess file, but unfortunately it didn't have any effect on the errors I'm receiving.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Robert,
it seems you need to go deeper into the debug process: could you try to create a test environment cloning your production instance, on the same server and deploy conditions?

It could be the key in order to safely modify weblib.php, get_file_argument() function: you must discover the content of $_SERVER in your environment to find the reason why the function returns an unexpected false. Something like below, to look at the PHP error logs file: $relativepath = false;    debugging(var_export($_SERVER, true)); HTH, Matteo Average of ratings:Useful (1) Re: SCORM Displays Menu, Content Blank Firstly, thanks once again for your continued support! I added the line you suggested to the function get_file_argument() within /lib/weblib.php I attempted to run a SCORM file, one I'd downloaded fairly randomly from the Internet in an attempt to get one working. (http://www.er4l.co.uk/acatalog/Sums%20Online.zip) This produced the following at the top of the page: array ( 'DBENTRY' => '/kunden/homepages/26/d369050606/htdocs/moodle:d0000#CPU 60 #MEM 81920 #CGI 786762 #NPROC 20 #TAID 63498896 #WERB 0 #LANG 1 #PARKING 1 #STAT 1', 'DOCUMENT_ROOT' => '/kunden/homepages/26/d369050606/htdocs/moodle', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE' => 'en-GB,en-US;q=0.8,en;q=0.6', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_COOKIE' => 'd6ce9b8859893b5432a24b0c2c9cfe41=c818e0a515e49c8b24f3ac298f5dd68f; 79ec6e5cf6df293ab2c0f65787f7b165=ce36b5b413bcf3958295ded3c066a77b; jpanetabs_pane=0; jpanesliders_panel-sliders=0; jpanesliders_position-icon=0; MoodleSession=5abada85ac7b506f2b9d9afa955be464; MOODLEID_=%25E2%25C8%2513E%25BD', 'HTTP_HOST' => 'www.moodletestsite.com', 'HTTP_REFERER' => 'http://www.moodletestsite.com/learning/mod/scorm/loadSCO.php?a=3&scoid=16¤torg=Org001&attempt=1', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30', 'PATH' => '/bin:/usr/bin', 'REDIRECT_DBENTRY' => '/kunden/homepages/26/d369050606/htdocs/moodle:d0000#CPU 60 #MEM 81920 #CGI 786762 #NPROC 20 #TAID 63498896 #WERB 0 #LANG 1 #PARKING 1 #STAT 1', 'REDIRECT_SCRIPT_URI' => 'http://www.moodletestsite.com/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'REDIRECT_SCRIPT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'REDIRECT_STATUS' => '200', 'REDIRECT_UNIQUE_ID' => 'TjEvawouESMAAC@Vd08', 'REDIRECT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'REMOTE_ADDR' => '86.155.238.178', 'REMOTE_PORT' => '51240', 'SCRIPT_FILENAME' => '/kunden/homepages/26/d369050606/htdocs/moodle/learning/pluginfile.php', 'SCRIPT_URI' => 'http://www.moodletestsite.com/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'SCRIPT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'SERVER_ADDR' => '213.223.153.79', 'SERVER_ADMIN' => 'webmaster@moodletestsite.com', 'SERVER_NAME' => 'moodletestsite.com', 'SERVER_PORT' => '80', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache', 'UNIQUE_ID' => 'TjEvawouESMAAC@Vd08', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'REQUEST_URI' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'SCRIPT_NAME' => '/learning/pluginfile.php', 'STATUS' => '200', 'ORIG_PATH_INFO' => '/113/mod_scorm/content/1/Calculations/Unit1/RabbitTakeaway/rabbittakeaway.htm', 'ORIG_PATH_TRANSLATED' => '/kunden/homepages/26/d369050606/htdocs/moodle/learning/pluginfile.php', 'PHP_SELF' => '/learning/pluginfile.php', 'REQUEST_TIME' => 1311846251, 'argv' => array , 'argc' => 0, ) • line 908 of /lib/weblib.php: call to debugging() • line 34 of /pluginfile.php: call to get_file_argument() The debug window resulted in: Thu, 28 Jul 2011 09:44:13 GMT: Moodle SCORM 1.2 API Loaded, Activity: fgdfgdfgdfgdfgdfg, SCO: rabbittakeaway.htm Interesting in this particular SCORM file, when clicking Unit Headings (i.e. Rabbit Takeaway (not the .htm) file, I get this (different) error: A required parameter (scoid) was missing More information about this error Stack trace: • line 429 of /lib/setuplib.php: moodle_exception thrown • line 457 of /lib/moodlelib.php: call to print_error() • line 7 of /mod/scorm/loadSCO.php: call to required_param() While this doesn't mean much to me, I'm hoping it might shed some light on the situation for yourself. Thanks again. Average of ratings: - Re: SCORM Displays Menu, Content Blank Hi Robert, 1. SERVER_SOFTWARE tells 'Apache' but no mention at all about PATH_INFO: it tells about ORIG_PATH_INFO instead! Please modify the file by replacing PATH_INFO with ORIG_PATH_INFO in get_file_argument() and everything will work as expected; 2. scoid, it could be part of the same issue. The question now is: why your deploy is changing the name of an Apache environment variable? I guess it is related with some redirect... shortly there is here room for an enhancement in the Moodle code, to let the code search for ORIG_PATH_INFO if PATH_INFO is missing, potentially this is the first patch proposal: $ git diff lib/weblib.phpdiff --git a/lib/weblib.php b/lib/weblib.phpindex a7509d4..b83cf98 100644--- a/lib/weblib.php+++ b/lib/weblib.php@@ -903,25 +903,31 @@ function get_file_argument() {         return $relativepath; }$relativepath = false;+    $pathinfo = null;+ if (isset($_SERVER['PATH_INFO'])) {+        $pathinfo =$_SERVER['PATH_INFO'];+    } else if (isset($_SERVER['ORIG_PATH_INFO'])) {+$pathinfo = $_SERVER['ORIG_PATH_INFO'];+ } // then try extract file from the slasharguments if (stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) {         // NOTE: ISS tends to convert all file paths to single byte DOS encoding,         //       we can not use other methods because they break unicode chars,         //       the only way is to use URL rewriting-        if (isset($_SERVER['PATH_INFO']) and$_SERVER['PATH_INFO'] !== '') {+        if (isset($pathinfo) and$pathinfo !== '') {             // check that PATH_INFO works == must not contain the script name-            if (strpos($_SERVER['PATH_INFO'],$SCRIPT) === false) {-                $relativepath = clean_param(urldecode($_SERVER['PATH_INFO']), PARAM_PATH);+            if (strpos($pathinfo,$SCRIPT) === false) {+                $relativepath = clean_param(urldecode($pathinfo), PARAM_PATH);             }         }     } else {         // all other apache-like servers depend on PATH_INFO-        if (isset($_SERVER['PATH_INFO'])) {- if (isset($_SERVER['SCRIPT_NAME']) and strpos($_SERVER['PATH_INFO'],$_SERVER['SCRIPT_NAME']) === 0) {-                $relativepath = substr($_SERVER['PATH_INFO'], strlen($_SERVER['SCRIPT_NAME']));+ if (isset($pathinfo)) {+            if (isset($_SERVER['SCRIPT_NAME']) and strpos($pathinfo, $_SERVER['SCRIPT_NAME']) === 0) {+$relativepath = substr($pathinfo, strlen($_SERVER['SCRIPT_NAME']));             } else {-                $relativepath =$_SERVER['PATH_INFO'];+                $relativepath =$pathinfo;             }             $relativepath = clean_param($relativepath, PARAM_PATH);         }

HTH,
Matteo

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

I changed all occurences of PATH_INFO with ORIG_PATH_INFO within the file /lib/weblib.php, you'll be pleased to know this didn't sort the problem out, only created a few more errors! Checked for references to PATH_INFO in this file but didn't see any. Please see below, I'll assume it makes sense to you.

Can not serve file - server configuration problem.

Stack trace:
• line 1555 of /lib/filelib.php: file_serving_exception thrown
• line 2023 of /lib/filelib.php: call to prepare_file_content_sending()
• line 903 of /mod/scorm/lib.php: call to send_stored_file()
• line 702 of /pluginfile.php: call to scorm_pluginfile()
I kept the debug line you asked me to add in and that produced the following additional mass of errors:
array ( 'DBENTRY' => '/kunden/homepages/26/d369050606/htdocs/moodle:d0000#CPU 60 #MEM 81920 #CGI 786762 #NPROC 20 #TAID 63498896 #WERB 0 #LANG 1 #PARKING 1 #STAT 1', 'DOCUMENT_ROOT' => '/kunden/homepages/26/d369050606/htdocs/moodle', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_COOKIE' => '79ec6e5cf6df293ab2c0f65787f7b165=d285da13db88a1ea04233685ef3f64a3; jpanesliders_panel-sliders=0; jpanesliders_position-icon=0; jpanetabs_pane=0; d6ce9b8859893b5432a24b0c2c9cfe41=ed8ce5f9220acb91390ceddb48695c02; MoodleSession=ee4b887977a7f4502b9ecd6f16ada246; MOODLEID_=%25E2%25C8%2513E%25BD', 'HTTP_HOST' => 'www.moodletestsite.com', 'HTTP_REFERER' => 'http://www.moodletestsite.com/learning/mod/scorm/loadSCO.php?id=52&scoid=25', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30', 'PATH' => '/bin:/usr/bin', 'REDIRECT_DBENTRY' => '/kunden/homepages/26/d369050606/htdocs/moodle:d0000#CPU 60 #MEM 81920 #CGI 786762 #NPROC 20 #TAID 63498896 #WERB 0 #LANG 1 #PARKING 1 #STAT 1', 'REDIRECT_SCRIPT_URI' => 'http://www.moodletestsite.com/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'REDIRECT_SCRIPT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'REDIRECT_STATUS' => '200', 'REDIRECT_UNIQUE_ID' => 'TjGFRAouESMAAEMw07k', 'REDIRECT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'REMOTE_ADDR' => '87.136.228.198', 'REMOTE_PORT' => '52309', 'SCRIPT_FILENAME' => '/kunden/homepages/26/d369050606/htdocs/moodle/learning/pluginfile.php', 'SCRIPT_URI' => 'http://www.moodletestsite.com/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'SCRIPT_URL' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'SERVER_ADDR' => '213.251.173.79', 'SERVER_ADMIN' => 'webmaster@moodletestsite.com', 'SERVER_NAME' => 'moodletestsite.com', 'SERVER_PORT' => '80', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache', 'UNIQUE_ID' => 'TjGFRAouESMAAEMw07k', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'REQUEST_URI' => '/learning/pluginfile.php/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'SCRIPT_NAME' => '/learning/pluginfile.php', 'STATUS' => '200', 'ORIG_PATH_INFO' => '/113/mod_scorm/content/1/Calculations/Unit5/BracketBasics/bracketbasics.htm', 'ORIG_PATH_TRANSLATED' => '/kunden/homepages/26/d369050606/htdocs/moodle/learning/pluginfile.php', 'PHP_SELF' => '/learning/pluginfile.php', 'REQUEST_TIME' => 1311868228, 'argv' => array , 'argc' => 0, )line 908 of /lib/weblib.php: call to debugging()line 34 of /pluginfile.php: call to get_file_argument()Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1935Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1945Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1949Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1950Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1951Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 1990Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 2017Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d369050606/htdocs/moodle/learning/lib/weblib.php:2898) in /homepages/26/d369050606/htdocs/moodle/learning/lib/filelib.php on line 2019
Thanks again for your time on this, I can assume the change in error can be considered to be progress and is just a consequence somewhere along the line of changing PATH_INFO.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Robert,
yes, it could be since it is actually trying to serve the file; my fault, please comment out the debugging() call:

// debugging(var_export(\$_SERVER, true));

Matteo

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

My apologies, I was painfully aware I was in a bit of a rush yesterday when trying to work out the origin of that error and didn't stop to consider the debug code I'd left in (in an attempt to help you out!) would actually break it.

This has solved this problem entirely and I'm now able to run SCORM courses from my Moodle install.

For the sake of historicity and Google (even if they may well be synonymous) I realise I hadn't mentioned the hosts name - 1 and 1. So this issue may well come up with other people using shared hosting on 1and1.

Thank you so very much Matteo for all your help and patience I really appreciate it.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Robert,

It could be nice if you could ask a bit more info to your host, 1&1, in order to describe the issue into the Moodle Tracker (I will open the issue and track its progress) providing the right reasons to promote&test my patch proposal and a bit more lurking around other eventual PATH_INFO refs into the Moodle code.

Matteo

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

Do you have any questions in particular you'd like to me to quiz them about that would help you with the patch?

I'm more than willing to pass anything on to help you out.

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Robert,
I've done a quick research and found that it's a feature of 1&1 shared servers, so there's nothing to be asked: MDL-28538. You should register into the Moodle Tracker and "watch" that new feature request: it could be possible that you'll be ask to test something if/when my proposal will be evaluated.

@Amy: room for another entry into the Moodle SCORM FAQ, more or less as done with GoDaddy, here e.g. just by quoting the ref to the Tracker?

Matteo

Average of ratings:Useful (1)
Re: SCORM Displays Menu, Content Blank

Just want to say, thank you for putting all this info here - it helped me google my problem and then, following the instructions, fix it!

Average of ratings: -
Re: SCORM Displays Menu, Content Blank

Hi Andy,
glad to read it . If you could give instructions to reproduce it, you should partecipate to MDL-28538 too, to help us in replicating the issue in a development environment and let the Moodle Dev Process go further towards a nice fix proposal or, at least, a warning during the installation stage.

Matteo

Average of ratings: -