Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorm package doesn't show up on OpenEDX #35

Open
mariovitale1979 opened this issue Aug 28, 2023 · 17 comments
Open

Scorm package doesn't show up on OpenEDX #35

mariovitale1979 opened this issue Aug 28, 2023 · 17 comments

Comments

@mariovitale1979
Copy link

Using the liascript exporter, I generated a very basic simple Scorm package from a Markdown file. This scorm package:

  • works like a charm in an LMS system as Moodle
  • is valid according to Scorm Cloud
    .. but it's not showing in OpenEDX.

In OpenEDX the scorm package is accepted and uploaded but when trying to view it, only a blank window is shown. Similar behaviour is with our own OpenEDX installation or the OpenEDX sandbox environment (https://sandbox.openedx.org/)

I tried the different SCORM parameters that the Liascript exported provides (scorm formats, scorm-iframe, scorm-embed,....) but so far no combination that gives any result. Weird thing is that OpenEDX also doesn't return any error or whatsoever so no sure how to debug this.

In attachment the MD file and the scorm package generated from it using liaScript exported that doens't get shown in OpenEDX
helloworld.md
helloworld.zip

@andre-dietrich
Copy link
Member

Hi Mario and thanks for the report,

I just updated the Exporter, so that the there is no black-screen anymore.

I tried this with the following command:

liaex -i README.md -f scorm2004 --scorm-masteryScore 80 --scorm-embed

Although it should load the course now, it was not possible in my case to store the state in the backend within the sandbox.openedx.org ...

image

I added an error-message, which indicates that the SCORM-package cannot access the SCORM-API. I tried this also with the official SCORM-demos here:

https://scorm.com/scorm-explained/technical-scorm/golf-examples/

The result was the same, their content could not be loaded either. I think this this has to be enabled for edX, as it is described here in section Installation

https://github.com/overhangio/openedx-scorm-xblock

Then, as I hope, the state should be also stored within the backend.

@mariovitale1979
Copy link
Author

Hi, I tested your changes but unfortunately I don't notice any differences.
First of all, to enable SCORM in OpenEdx, you just need to add "Scorm" under "Advanced Settings"-->Advanced Module List Menu (see instructions https://github.com/overhangio/openedx-scorm-xblock#usage )

In openEDX I couldn't find the Scorm API calls made but using the developer tools I see this error when loading the SCORM package:
Screenshot from 2023-08-29 17-01-33

So it seems that the SCORM2004 javascript is somehow not parsed correctly in OpenEDX.
Not sure why this error is not given with Moodle or SCorm Cloud.. maybe the codepath is different somewhere but I hope this will give you a clue

@andre-dietrich
Copy link
Member

I updated the exporter, this error can only be caused if no cmi.scaled_passing_score value is set. I made the JSON-parsing for this now bulletproof. I hope this fixes the issue, could you try this with the latest version?

From the log, I can see that this course is not rated, could you try it in both modes, rated and not rated?

Kind regards ;-)

@mariovitale1979
Copy link
Author

Hi,

Sorry if this is a dumb remark but just replacing the JSON.Parse with Utils.jsonParse doesn't work for me. Browser complains it doesn't find the Utils module.
_

SCORM2004.25f0b6df.js:1 Uncaught (in promise) ReferenceError: Utils is not defined
at c.init (SCORM2004.25f0b6df.js:1:1462)
at new c (SCORM2004.25f0b6df.js:1:5268)
at index.928b97d5.js:1:498045

_

image

Maybe there is a straigtforward solution for a Javascipt/Nodejs developer but that is not my strong suit so not sure how to tackle this.

I wonder if you are using a valid alternative JSOn parser. Quick search on the internet and I don't find really any reference to a Utils module that provides a jsonParse function .. but again...I'm not a Javascript/Nodejs developer so I might be wrong (probably :-) )

@andre-dietrich
Copy link
Member

I rebuild the app with a newer version of npm and node. This error should actually not happen, and might be caused due to some wrong file-packing. Could you try to uninstall the exporter and then installing it again and see if the problem persits?

Utils.jsonParse is simply :

export function jsonParse(json: string) {
  try {
    return JSON.parse(json)
  } catch (e) {}
  return null
}

@mariovitale1979
Copy link
Author

It indeed works better now. SCORM package is shown now in OpenEDX.
But there is still some issue with the scores and tracking progress. In SCORM Cloud and Moodle this seems to work fine but not in OpenEDX. Maybe an issue with OpenEDX or just my lacking understanding of it.
I'll dig deeper but consider at least this issue closed and if I would track a different issue that I think is related to Lia, I'll create separate issue.
Thanks for you quick support.

@andre-dietrich
Copy link
Member

andre-dietrich commented Aug 30, 2023

It must be a rated course, this is commonly set within the LMS.

https://github.com/LiaScript/LiaScript/blob/2511080732fe6f25f19f244ed65d2a508e2e2bf0/src/typescript/connectors/SCORM2004/index.ts#L209C3-L227C8

If the course is rated, then the cmi.mode has to be set to active otherwise it is only for testing and no data is stored.

As described in section 10.38.4. Uploading the SCORM content, scored has to be set to true.

https://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/exercises_tools/scorm.html

image

However, if this does not work, I could also add a special option for this case ...


your screenshot indicates, that there is no mode set ... See the output of SCORM 2004 running in (missing) mode, results will not be stored

image

@mariovitale1979
Copy link
Author

Hmm, still no white smoke unfortunately.
As usually SCORM cloud & Moodle are working fine but the same SCORM package doesn't work in my local OpenEDX and Sandbox OpenEDX.
I'm sure I enabled grading in my course in openEDX correctly(enabled scoring in the SCORM unit + linked section to a grading assignment)

In my local Openedx, the cmi.mode API call still returns an empty string and notice also the error "Cannot write to cmi.suspend"
mode-issue

In sandbox Openedx it can't even open an API Handle. I tested with --scorm-iframe as option but same result.
noapi

I'm using latest OpenEDX 'palm' release published by Tutor.
I generated SCORM package with
liaex -i helloworld/quizzes.md --format scorm2004 --output openedx-test-embed --scorm-embed --scorm-masteryScore 80
openedx-test-embed.zip

It starts to smell like issue with OpenEDX but maybe you have more insights here.. I'm still rather new to this

@andre-dietrich
Copy link
Member

do you have a docker-compose or something equal, so I can test it locally on my machine?

You could also try out the different and official SCORM examples from here:

https://scorm.com/scorm-explained/technical-scorm/golf-examples/

... if they produce the same results or show a different behavior ...

let me know ...

@mariovitale1979
Copy link
Author

The SCORM examples from Scorm.com are the ones I have been using since the beginning as reference to validate that my LMS is properly configured and they work as intended in my OpenEDX installation. There I see the scorm'sAPI calls reporting status/score/success state going to LMS .
The scorm package generated with liaExporter only shows cmi.location but nothing else (because the 'mode' is somehow not read correctly and thus nothing is persisted)

My openEDX installation is a plain vanilla Openedx installation using tutor (https://docs.tutor.overhang.io/) with nu custom made plugins.
If you want and are open for it, I could give you temporary access to our OpenEDX installation . If yes, let me know to what email I can send the credentials as I don't want to put that in a public forum.

@andre-dietrich
Copy link
Member

Sure, you can write me at LiaScript@web.de ...

@mariovitale1979
Copy link
Author

Sure, you can write me at LiaScript@web.de ...

You have mail ;-)

@andre-dietrich
Copy link
Member

After some trials I took a look into the code, turns out that not the full SCORM standard is supported:

https://github.com/overhangio/openedx-scorm-xblock/blob/6bd603f91df29ba6e5621bc9575aaaacf107e1c9/openedxscorm/scormxblock.py#L388C5-L403C56

there are only a hand full of settings ...

Since I cannot get the state in which the "viewer" of a course is attempting the course, I would suggest, that I would add another option, that stores the state and rating in every situation...

@mariovitale1979
Copy link
Author

Indeed, the scorm xblock implementation indeed doesn't support the cmi.mode command. I see that you opened an issue in the repo (overhangio/openedx-scorm-xblock#43) . Thanks!

Funny that the was not reported so far by anyone else since this "cmi.mode" command seems an important 'basic' command to handle.
Curious to see how the raised issue will be handled . But in the meantime I'm curious about the extra option you would add to liaExporter until that issue is fixed

@andre-dietrich
Copy link
Member

Just uploaded a new version with the --scorm-alwaysActive (not documented) parameter, that you can add to build your projects, this will always result in an active mode and try to store the results in the backend and rate them ... Let me know if this works for you?

@mariovitale1979
Copy link
Author

Works like a charm.
I still see some issues with the grading score shown in OpenEDX but I guess that's a configuration I still need to figure out in OpenEDX.
Thanks!!!!

@andre-dietrich
Copy link
Member

You can define different values/scores per quiz

https://liascript.github.io/course/?https://raw.githubusercontent.com/liaScript/docs/master/README.md#76

by default every quiz is 1 point, but you can redefine this per quiz ...

... if you, for example have 20 points and define a masteryScore of 80 in the commandline, that means, the course should be solved if 16 points were achieved (and then you should get the rating that is set by the LMS) ...

I hope this helps otherwise I am happy to assist ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants