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
798 stars 480 forks source link

Updating a SCORM from "Learning paths" does not work #4429

Closed juan-cortizas-ponte closed 1 year ago

juan-cortizas-ponte commented 1 year ago

Describe

The update SCORM feature, on "Learning paths" list, does not work since this commit that adds the bigupload lib. Chamilo does not create anymore a folder with the zip original name at app/courses/{course_code}/scorm/, but a folder with a random name. So when you try to update the SCORM, the name of the original zip does not match the folder name that Chamilo creates and the update process fail.

To Reproduce

  1. Upload a new SCORM zip file
  2. Click on the update icon for the scorm uploaded
  3. Select again the SCORM zip file
  4. See error

Expected behavior

The behavior when importing a SCORM should be the same as before the commit 28fee3c73168c67a024a526f4d37c422633c4270.

The folder created when importing the SCORM should have the same name as the zip file

Screenshots

The update tool location: imagen

Debugging the import of a new SCORM on lp_upload.php, the SCORM original name is "scorm12-120621-271.zip": imagen

Debugging the import of a new SCORM on scorm.class.php: imagen

Debugging the import of a new SCORM on scorm.class.php: imagen

Uploading the same SCORM zip file again as an update of the previously imported, path names check fail: imagen

Error: imagen

Desktop:

Desktop:

Server

Server

christianbeeznest commented 1 year ago

I just added a PR about it https://github.com/chamilo/chamilo-lms/pull/4439 , the scorm folder keeps the name, so it is possible to update now.

Coursenligne commented 1 year ago

Strange, as I managed localy and distantly to upload and modify SCORM packages both from the internal Chamilo's authoring tool and an extra vendor tool. 2 things I had to modify thought: 1- In configuration.php there are SCORM parts that are false by default, I turned them to true. 2- In php.ini of my server, I had to change the post_max_size value as it was too low.

There was also a course_import.php file amended. It's mainly used for csv matter, but I uploaded the patch without any trouble. I hope this helps.

NicoDucou commented 1 year ago

It is now working fine, I just accepted PR #4439