gabrieldoty / simplify-scorm

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

window.API.isInitialized() is returning false #36

Closed sainag closed 3 years ago

sainag commented 3 years ago

Hi @gabrieldoty , having some issues with the scorm package exported from Rise 360 version 7.7.0. I'm not able to see any logs. I'm just wondering is it compatible to use with simplify-scorm. It's the same scorm 1.2 but it is not responding. Please see the attached scorm package and let me know if you can see any issue.

Thanks

employee-health-and-wellness-sample-course.zip

xob commented 3 years ago

Your training course works perfectly with Simplify SCORM. I uploaded your package to my own LMS, and everything worked correctly. Here's the console output I saw, starting the training and going through a couple of slides:

scormAPI.min.js:3 Initialize          : returned: true
scormAPI.min.js:3 GetValue            : cmi.success_status                              : returned: unknown
scormAPI.min.js:3 GetLastError        : returned: 0
scormAPI.min.js:3 GetValue            : cmi.completion_status                           : returned: unknown
scormAPI.min.js:3 GetLastError        : returned: 0
scormAPI.min.js:3 SetValue            : cmi.completion_status                           : incomplete: result: true
scormAPI.min.js:3 SetValue            : cmi.exit                                        : suspend: result: true
scormAPI.min.js:3 GetValue            : cmi.mode                                        : returned: normal
scormAPI.min.js:3 GetLastError        : returned: 0
scormAPI.min.js:3 GetValue            : cmi.location                                    : returned: 
scormAPI.min.js:3 GetLastError        : returned: 0
scormAPI.min.js:3 GetValue            : cmi.suspend_data                                : returned: 
scormAPI.min.js:3 GetLastError        : returned: 0
scormAPI.min.js:3 SetValue            : cmi.location                                    : index.html#/lessons/ccSkkJwZ6QAHnQSHkiw3zuxYNcAKqFW6: result: true
scormAPI.min.js:3 SetValue            : cmi.suspend_data                                : {"v":1,"d":[123,34,112,114,111,103,114,101,115,115,34,58,256,108,263,115,111,110,265,267,34,49,266,256,112,266,49,55,44,34,105,278,34,48,287,99,281,284,286,275,289,275,291,58,49,125,301,284,277,275,294,123,302,34,50,287,306,308,51,311,278,308,52,315,267,308,53,319,307,301,325,125]}: result: true
scormAPI.min.js:3 SetValue            : cmi.suspend_data                                : {"v":1,"d":[123,34,112,114,111,103,114,101,115,115,34,58,256,108,263,115,111,110,265,267,34,49,266,256,112,266,53,48,44,34,105,278,34,48,287,99,266,49,284,286,275,289,275,291,58,49,125,302,284,277,298,292,294,287,297,256,299,301,303,34,50,290,307,285,309,317,300,302,125,284,51,287,295,123,314,52,327,278,314,53,332,267,323,338]}: result: true
scormAPI.min.js:3 SetValue            : cmi.suspend_data                                : {"v":1,"d":[123,34,112,114,111,103,114,101,115,115,34,58,256,108,263,115,111,110,265,267,34,49,266,256,99,266,49,44,257,281,48,48,283,105,278,34,48,290,280,58,282,34,289,275,292,275,294,49,125,304,283,277,301,281,288,290,300,279,281,304,125,283,50,293,309,297,311,319,295,315,283,51,323,296,298,256,312,34,302,316,276,328,335,318,308,324,326,337,283,52,337,305,34,345,340,329,322,350,325,34,53,328,310,299,346,315,335,112,281,52,304]}: result: true

I'm not sure what the problem you're experiencing is, but your LMS needs to initialize Simplify SCORM after setting the initial values (student information, suspend data, etc) and before loading the training course's HTML file.