Forum Discussion
LisaMacken-e00c
7 months agoCommunity Member
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 ...
LisaMacken-e00c
7 months agoCommunity 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;
}
Related Content
- 2 months ago
- 4 months ago
- 2 months ago