chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
774 stars 469 forks source link

SCORM not loading #2946

Open lonesomewalker opened 5 years ago

lonesomewalker commented 5 years ago

Describe Simple SCORM course can't load. Error log says: PHP Warning: Declaration of UniqueAnswer::return_header($exercise, $counter = NULL, $score = NULL) should be compatible with Question::return_header(Exercise $exercise, $counter = NULL, $score = Array) in /var/www/chamilo/main/exercise/unique_answer.class.php on line 19, referer: http://192.168.43.139/courses/GYFKURS001/scorm/Musterkurs/assets/htm/blank.htm

SCORM Cloud says: package 100% valid

To Reproduce https://11.chamilo.org/courses/MOB0001/index.php and go to learning path

Additional context zipped SCORM package. Musterkurs.zip

jmontoyaa commented 5 years ago

PHP warning because this change:

https://github.com/chamilo/chamilo-lms/commit/2c588909ef43949e635c9468b7ef19a251485f41

lonesomewalker commented 5 years ago

No, not only the warning is relevant, also the extraction of the scorm package. After extraction, you should still have folders and files, instead we get flat file -> all in one folder.

jmontoyaa commented 5 years ago

There's a problem with your zip package, when I unzip the file, I have all files in one folder, just using ubuntu ark zip manager:

Screenshot_20190704_141805

lonesomewalker commented 5 years ago

Feel free to extract on the commandline with unzip. File is a valid zip file, also the structure in it. Working in several other LMS like Moodle and ILIAS.

Coursenligne commented 5 years ago

I had an issue uploading SCORM files, I changed the maximum upload size in php.ini file (using LAMP or WAMP) and all seems to work so far. I hope this helps.

opensourcecompany commented 4 years ago

Upload size is 512M, should not be an issue ;-)

lonesomewalker commented 4 years ago

Any update on this? Maybe somebody can give me a hint where the extraction of the uploaded SCORM package happens, so i will investigate further this on my own.

ywarnier commented 4 years ago

As @jmontoyaa mentioned above, there seems to be something wrong with the zip format itself (backslashes instead of slashes, which makes the unzip in Chamilo interpret them as all files in the same root folder, with strange "\" signs in their names). Not sure how the scorm cloud and other LMSes accept it. Maybe they have special settings to support this type of Windows Zip... I've never seen one react like this before (even for ZIPs created under Windows).