gabrieldoty / simplify-scorm

Scorm 1.2 Javascript API
MIT License
230 stars 77 forks source link

throwSCORMError : 104: Content Instance Terminated #23

Open sureshmariadass opened 4 years ago

sureshmariadass commented 4 years ago

Hi @gabrieldoty

In SCORM 2004, when i click next page like previous or continue it have terminated. How to fix this issues? Please help me.

image

Advance thanks for your valuable reply.

xob commented 4 years ago

It appears that your SCO is trying to initialize the API after terminating it.

As per the SCORM 2004 API specifications, REQ_4.4:

If the communication session has been terminated and the Initialize() API method is invoked, the LMS shall set the error code to Content Instance Terminated (104) and return false.

The API is designed to be used by only one SCO. To change to another SCO (which I assume is what your previous and continue buttons do), you would have to instanciate a new API as well.

sureshmariadass commented 4 years ago

Thanks @xob for your reply. SCORM 2004 unable to return the score

xob commented 4 years ago

SCORM 2004 unable to return the score

I believe that if the API is unable to return the score, it may be that the SCO has not set it., or maybe you are not looking at the correct path.

In SCORM 2004, the score is located in cmi.score.raw but in SCORM 1.2 it is located in cmi.core.score.raw