Forum Discussion
Issue with SCORM loading on SuccessFactor
Hey all,
We have a client who is using a RISE SCORM 1.2 on SuccessFactor.
The client needed a profiler in the course so we have built a standard HTML landing page using index.html which launches into 5 different RISE SCORMs. The course doesn't initialize until a profile is selected.
This works when we load the course onto SCORM cloud, however when the client tries to launch the course once they click on a profile which should launch the course they get Initializing error messages which I've attached. I think its worth noting that this package worked for them back about 2 years ago.
My thought is that their LMS and RISE are both trying to initialise the course and its causing an error. Is there anything I can do about this? Can we turn the initialising off in a SCORM package in RISE? Or any other suggestions.
6 Replies
- SamHillSuper Hero
Hi there LisaMacken-e00c it's unfortunate the LMS is showing the dialogue as the error is not really serious and could be ignored if the LMS didn't tell us about it. As the message says, the LMS is already initialized, which suggests that LMSInitalize("") is being called multiple times.
Is it possible that your landing page also contains script to initialize the SCORM API? If so, you could remove it from there and rely on the individual Rise modules to initialize.
If the landing page doesn't contain script to initialize the LMS, it sounds like whichever module is loading is executing it twice, this could be caused by the LMS reloading the content quickly.
When you ran in SCORM cloud, I would recommend you check the logs and see if you can see that it also runs LMSInitialize("") twice. Whilst SCORM Cloud wouldn't have shown this as a fatal error, it's possible that it is there in the logs and you just didn't notice as it wasn't a problem?
- On SCORM Cloud, launch your content but do not go beyond the landing page.
- Exit and check the logs. See if there is any SCORM activity at all in the logs.
- If there is SCORM activity, the landing page must be initializing the API.
- If not, launch the content again, and progress beyond the landing page, exit and check the logs again. Search for all instances of LMSInitialize("") and confirm there is only one instance.
If there is only one instance of LMSInit in SCORM Cloud at least you can be sure that it is system related.
What you can do in SF is when you launch the content, open up the developer console on your browser using F12, and check the network activity. You might have to be quick to hit F12 if the content launches in a pop-up window. As soon as you see that window loading, hit F12 and select the Network tab. What you want to look for is evidence of the content loading, and then reloading.
It's usually not a problem if content does reload, but it can depend on the LMS. Most content would ensure that LMSFinish("") is run when the content is unloaded, which would close the connection with the SCORM API, and so a new LMSInitialize("") would just be seen as a new session anyway.
This could be a complex one to troubleshoot if you find that the content is not responsible for the issue, but it is unusual if the content works correctly if you take the landing page out of the equation, so I would lean toward the content being the issue if that's the case.
If you do get stuck after these tests, I do have a lot of experience troubleshooting these kinds of issues and you can reach out to me via my email address mailto:sam.hill@rebusmedia.com
- LisaMacken-e00cCommunity Member
Thank you Sam for this in dept reply its much appreciated.
The SCORM doesn't initialise on the landing page it only initializes after a profile is selected. I checked their logs and it does only send a LMSInitialize once. I'm asking the client if they can check and see if it does load and then reload. If they do find that it does reload would that be an issue with the LMS more than the SCORM package itself?
I've also done a comparison between a version that does work on Success Factor and the clients which doesn't. I can see the strResults is coming back as blank for them and not coming back as index.html#/lessons/ which would bring them to the start of the course.
I've attached a screenshot of what I see working version is on the left and the clients version is on the right. Do you think this would be due to losing connection with the API too?
- SamHillSuper Hero
Hi LisaMacken-e00c I wouldn't worry about strResults as this is just the return value from lesson_location which is the bookmarked location of the content. If there is a value returned for lesson_location, it just means you've already been in the course before.
If you are seeing this on first launch in the LMS, then this could confirm that a page refresh (double load) is occurring, as it would be likely when the content first loads, the strResults for lesson_location is empty, the content then reloads, possibly triggering lesson_location to be updated with the current page, hence why you would see data returned from lesson_location even on the first load.
It wouldn't be possible for me to say that the issue is with the LMS, as there is most likely other SCORM courses running that do not have an issue, but it is also possible that the landing page sequence required for your content is causing or exposing an existing issue.
It's not possible to answer this without investigation. If you are able to share the landing page, I might be able to spot something in that.
- LisaMacken-e00cCommunity Member
Hi SamHill ,
Thank you for all your help, the scripts tags weren't the issue in the end. So I wanted to reply to what did fix was in case it could help anyone else.
The course was initializing twice on their end but their LMS team could not change it on their end so I add a new global variable in the scormdriver.js called
var isSCORMAlreadyInitialized = false;
And the change the SCORM_Initialize function itself to return if it was previously entered (Line 7 - 10 and line 37).
Updated code is here -
var isSCORMAlreadyInitialized = false; function SCORM_Initialize() { var blnResult = true; WriteToDebug("In SCORM_Initialize"); if (isSCORMAlreadyInitialized) { WriteToDebug("SCORM already initialized. Skipping redundant initialization."); return true; // Already done, nothing to redo } SCORM_ClearErrorInfo(); WriteToDebug("Grabbing API"); try { SCORM_objAPI = SCORM_GrabAPI(); } catch (e) { WriteToDebug("Error grabbing 1.2 API - " + e.name + ": " + e.message); } if (typeof SCORM_objAPI == "undefined" || SCORM_objAPI == null) { WriteToDebug("Unable to acquire SCORM API:"); WriteToDebug("SCORM_objAPI = " + typeof SCORM_objAPI); InitializeExecuted(false, "Error - unable to acquire LMS API, content may not play properly and results may not be recorded. Please contact technical support."); return false; } WriteToDebug("Calling LMSInit"); blnResult = SCORM_CallLMSInitialize(); if (!blnResult) { WriteToDebug("ERROR Initializing LMS"); InitializeExecuted(false, "Error initializing communications with LMS"); return false; } isSCORMAlreadyInitialized = true; // Mark as initialized if (SCORM_GetLessonMode() != MODE_REVIEW) { if (SCORM_IsContentInBrowseMode()) { WriteToDebug("Setting Status to Browsed"); blnResult = SCORM_CallLMSSetValue("cmi.core.lesson_status", SCORM_BROWSED); } else if (!PREVENT_STATUS_CHANGE_DURING_INIT) { if (SCORM_GetStatus() == LESSON_STATUS_NOT_ATTEMPTED) { WriteToDebug("Setting Status to Incomplete"); blnResult = SCORM_CallLMSSetValue("cmi.core.lesson_status", SCORM_INCOMPLETE); } } blnResult = SCORM_CallLMSSetValue("cmi.core.exit", SCORM_TranslateExitTypeToSCORM(DEFAULT_EXIT_TYPE)) && blnResult; } else if (typeof REVIEW_MODE_IS_READ_ONLY !== "undefined" && REVIEW_MODE_IS_READ_ONLY === true) { blnReviewModeSoReadOnly = true; } WriteToDebug("Calling InitializeExecuted with parameter - " + blnResult); InitializeExecuted(blnResult, ""); return; }