Copy link to clipboard
Copied
Hello,
how can close the module If there's an error message of LMS ?
When there's à message error with LMS, and when the user click in thé button "OK" the module is closed
Find the function in the scormdriver.js and edit as follows in bold:
function DisplayError(strMessage) {
var blnShowDebug;
WriteToDebug("In DisplayError, strMessage=" + strMessage);
blnShowDebug = confirm("An error has occured:\n\n" + strMessage + "\n\nPress 'OK' to view debug information to send to technical support.");
if (blnShowDebug) {
DoCPExit();
//ShowDebugWindow();
}
}
Copy link to clipboard
Copied
Are you sure that the LMS supports the SCORM version you are using?
I've never had a problem with the API not being found as the discovery routine searches in the window parents and openers.
Copy link to clipboard
Copied
My problem isn't with the specific error I'm getting. What i'm trying to is in case of any error appearing, when the user clicks "OK", I would like to force the module to close. How could I do that ?
Copy link to clipboard
Copied
Find the function in the scormdriver.js and edit as follows in bold:
function DisplayError(strMessage) {
var blnShowDebug;
WriteToDebug("In DisplayError, strMessage=" + strMessage);
blnShowDebug = confirm("An error has occured:\n\n" + strMessage + "\n\nPress 'OK' to view debug information to send to technical support.");
if (blnShowDebug) {
DoCPExit();
//ShowDebugWindow();
}
}
Copy link to clipboard
Copied
Thank youTLCMediaDesign
I added else... because when he click in Button "Ok" or" Annuler" the module close.
function DisplayError(strMessage) {
var blnShowDebug;
WriteToDebug("In DisplayError, strMessage=" + strMessage);
blnShowDebug = confirm("An error has occured:\n\n" + strMessage + "\n\nPress 'OK' to view debug information to send to technical support.");
if (blnShowDebug) {
DoCPExit();
//ShowDebugWindow();
}else{
DoCPExit();
}
}