Abstract-Tech / abstract-scorm-xblock

XBlock for Open edX to support SCORM packages with course import/export
Apache License 2.0
9 stars 3 forks source link

Issue with saving #3

Open mslyon opened 3 years ago

mslyon commented 3 years ago

Hi, I tried to test how it works and when I enter the name of the zip file the studio drops an error..any idea what it could be? P.S I used some sample scorm files (eg https://scorm.com/scorm-explained/technical-scorm/golf-examples/) issue

chiruzzimarco commented 3 years ago

Thank you @mslyon for providing your feedback! Do you see any error in the CMS log ? Can you please upload it ? Can you also provide the exact SCORM package you are trying to load ?

mslyon commented 3 years ago

Thank you @mslyon for providing your feedback! Do you see any error in the CMS log ? Can you please upload it ? Can you also provide the exact SCORM package you are trying to load ?

Hi

CMS logs is this one: 2020-09-15 08:26:29,875 WARNING 4823 [abstract_scorm_xblock.scormxblock] scormxblock.py:122 - SCORM package "Intro.zip" not found

Here is the scorm file: https://drive.google.com/file/d/1fYHjXwaStnhlhwj0zhW4308_TresqSyg/view?usp=sharing

Also, I'm using bitnami Ironwood.

thanks.

chiruzzimarco commented 3 years ago

The SCORM package needs to be uploaded through the "Files & Upload" section of your course and then referenced by name (e.g. "Intro.zip" in your case) in the XBlock "SCORM file package" field.

Good that you are using Ironwood since the XBlock is not yet compatible with Juniper.

Could you please try again? Please let me know if the issue persist.

mslyon commented 3 years ago

that is exactly what I did and it throws the error. COuld it be that bitnami Ironwood stores the file somewhere else and the code does not pick it up where it should?

chiruzzimarco commented 3 years ago

The code is looking into course files which are stored within the course in the MongoDB database. The search is case sensitive and if the filename set on the XBlock doesn't match exactly a zipfile loaded in the course files an error is raised.

I can't reproduce your issue so i'm going to test on a Bitnami setup before coming back to you again, thank you for you patience.

chiruzzimarco commented 3 years ago

Hi @mslyon , sorry for making you wait so long. I finally managed to test the XBlock on a Bitnami installation.

Unfortunately i could not reproduce your problem since the XBlock was able to find the zip package with no issues (screenshots attacched).

Screen1 Screen2 Screen3

There is indeed a problem since by default Django sets the X-Frame-Options header to "DENY" which will prevent your browser from loading the SCORM content in an iframe. This is easily solved by adding a setting "X_FRAME_OPTIONS" in the Django settings module (which on a bitnami installation is /home/bitnami/apps/edx/edx-platform/lms/envs/bitnami.py for the LMS and /home/bitnami/apps/edx/edx-platform/cms/envs/bitnami.py for the CMS) like shown in the following screenshot.

Screen4

mslyon commented 3 years ago

thanks a lot - I tried and still the same "Studio's having trouble saving your work" - I will install it from scratch..thanks a lot.

johnlourdusamy commented 3 years ago

I also have above same issue. Are you found any resolution? Please advice.