Error initializing communication with LMS: workaround
Jan 08, 2013
Hi all,
I published my storyline course (SCORM 1.2) on SABA Enterprise 5.5 LMS platform.
Testing my output sometimes loading didn't work. My SCORM had problems to initialize communications, as said by this javascript alert:
The problem appeared randomly. I read this is a known issue in relationship between Storyline and Saba, so I developed this workaround in SCORMFunctions.js. The code in italic is my integration (sorry for bad formatting):
---
function SCORM_Initialize(){
var blnResult = true;
WriteToDebug("In SCORM_Initialize");
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");
document.body.style.background = "url(story_content/loading.gif) no-repeat center center";
SCORM_Initialize_2();
}
var bodyClassName = "";
var tryes = 0;
function SCORM_Initialize_2(){
blnResult = SCORM_CallLMSInitialize();
if (!blnResult){
tryes++;
if (tryes > 120) {
alert("ActiveX connection error. Close and re-open the browser.");
return false;
}
setTimeout(SCORM_Initialize_2, 500);
return;
}
document.body.style.background = "";
if (! blnResult){
WriteToDebug("ERROR Initializing LMS");
InitializeExecuted(false, "Error initializing communications with LMS");
return false;
}
//only reset status and such if we are not reviewing
if (SCORM_GetLessonMode() != MODE_REVIEW){
if (SCORM_IsContentInBrowseMode()){
WriteToDebug("Setting Status to Browsed");
blnResult = SCORM_CallLMSSetValue("cmi.core.lesson_status", SCORM_BROWSED);
}
else{
//only set the status to incomplete if it's not attempted yet
if (SCORM_GetStatus() == LESSON_STATUS_NOT_ATTEMPTED){
WriteToDebug("Setting Status to Incomplete");
blnResult = SCORM_CallLMSSetValue("cmi.core.lesson_status", SCORM_INCOMPLETE);
}
}
//we want to set the exit type to suspend immediately because some LMS's only store data if they get a suspend request
blnResult = SCORM_CallLMSSetValue("cmi.core.exit", SCORM_TranslateExitTypeToSCORM(DEFAULT_EXIT_TYPE)) && blnResult;
}
else{
//mode is review, check if we should go to read only mode
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;
}
---
I think this workaround could help some of you and I ask Articulate developers if it could cause some problems to SCORM parameters communication.
Thanks and regards
2 Replies
Hi @Andrea, I'm running into the same error in D2L. Is this still an issue? Does this workaround still work? Thanks!
We started seeing this earlier. From what I can tell its currently seen on courses built on Rise and its x-browser (chrome, safari) and x-platform (windows, mac).. our courses are exported in 1.2 and they are pretty linear and straight forward. Can anybody suggest some solution please?
This discussion is closed. You can start a new discussion or contact Articulate Support.