You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exporting a course that contains a unit with a scorm module and then importing it into another course works perfectly fine. However, if you change the scorm file in either the exported or the imported course, the other one breaks with the message:
This issue only happens if the exported course and the imported course are in the same openedx instance.
This error is also seen when you duplicate a subsection/unit that contains a scorm module with a scorm file already uploaded. For that, just duplicated the unit throws that error.
Steps to reproduce
Install Tutor and make sure scorm is installed by running: tutor [dev|local] run lms pip list | grep -i scorm
Create a new course.
Add scorm into the "Advanced Module List" under advanced settings.
Create a new unit with a scorm module and upload any scorm file in it.
And then after this, follow the respective steps for each issue.
To reproduce the course import/export and change scorm issue:
Publish the unit and export the current course.
Create a new course and import the exported course into it.
Change the scorm file with another file (not the same scorm file) in either the exported course or the imported course.
The scorm module in the other course (the one in which the scorm file was not changed) will show that error.
To reproduce the subsection/duplicate issue:
Duplicate the unit or subsection in which the scorm module was opened.
Open the scorm module unit and it will show that error.
Possible Cause
For the course export import issue:
Scorm saves the zip_file content at the location scorm/block_id/hash_of_file. It seems that the imported course keeps the same block_id and hash_of_file of the exported course and thus they reading the data from the same directory. When the scorm file is changed in either course, it overwrites the previous directory as the hash changes and the other course cannot access the data.
For the subsection/unit duplicate issue:
Scorm only saves the contents inside the zip_file after submitting inside studio. This means that whenever the unit it duplicated or a new course is created, the data for that scorm unit is not saved automatically and it tries to access the file at the path scorm/block_id/hash_of_file but that directory doesn't exist as nothing was saved there.
Possible solutions
The simplest solution would be to just never delete the directory when the course is imported. However, I do not know if there is a way to check the course was imported. This does not resolve the subsection/unit duplicate issue.
Save the package_file onto the storage as was already being done before this commit and extract the zip_file contents again onto the storage in case the original directory does not exist on the storage.
Change the location where scorm stores the zip_file contents to make it unique for each course. For example appending course_id to block_id to make it something like scorm/block_id+course_id/hash_of_file. This would make separate directories for the exported and the imported course. However, this would require the zip_file contents to be extracted again as there would be nothing saved at the new directory resulting in the same issue as the subsection/unit duplicate.
The text was updated successfully, but these errors were encountered:
Issue
Exporting a course that contains a unit with a scorm module and then importing it into another course works perfectly fine. However, if you change the scorm file in either the exported or the imported course, the other one breaks with the message:
This issue only happens if the exported course and the imported course are in the same openedx instance.
This error is also seen when you duplicate a subsection/unit that contains a scorm module with a scorm file already uploaded. For that, just duplicated the unit throws that error.
Steps to reproduce
tutor [dev|local] run lms pip list | grep -i scorm
And then after this, follow the respective steps for each issue.
To reproduce the course import/export and change scorm issue:
To reproduce the subsection/duplicate issue:
Possible Cause
For the course export import issue:
scorm/block_id/hash_of_file
. It seems that the imported course keeps the sameblock_id
andhash_of_file
of the exported course and thus they reading the data from the same directory. When the scorm file is changed in either course, it overwrites the previous directory as the hash changes and the other course cannot access the data.For the subsection/unit duplicate issue:
scorm/block_id/hash_of_file
but that directory doesn't exist as nothing was saved there.Possible solutions
package_file
onto the storage as was already being done before this commit and extract the zip_file contents again onto the storage in case the original directory does not exist on the storage.scorm/block_id+course_id/hash_of_file
. This would make separate directories for the exported and the imported course. However, this would require the zip_file contents to be extracted again as there would be nothing saved at the new directory resulting in the same issue as the subsection/unit duplicate.The text was updated successfully, but these errors were encountered: