overhangio / openedx-scorm-xblock

SCORM XBlock for Open edX
GNU Affero General Public License v3.0
37 stars 46 forks source link

Importing a course with scorm and changing the scorm file deletes the exported course scorm file as well #70

Closed Danyal-Faheem closed 4 months ago

Danyal-Faheem commented 4 months ago

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:

image

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

  1. Install Tutor and make sure scorm is installed by running: tutor [dev|local] run lms pip list | grep -i scorm
  2. Create a new course.
  3. Add scorm into the "Advanced Module List" under advanced settings.
  4. 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:

  1. Publish the unit and export the current course.
  2. Create a new course and import the exported course into it.
  3. Change the scorm file with another file (not the same scorm file) in either the exported course or the imported course.
  4. 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:

  1. Duplicate the unit or subsection in which the scorm module was opened.
  2. Open the scorm module unit and it will show that error.

Possible Cause

For the course export import issue:

For the subsection/unit duplicate issue:

Possible solutions