Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how can close the module If there's an error message of LMS ?

New Here ,
Oct 23, 2015 Oct 23, 2015

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

fff.png

error.png

333
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Oct 24, 2015 Oct 24, 2015

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();

    }

}

Translate
People's Champ ,
Oct 23, 2015 Oct 23, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 23, 2015 Oct 23, 2015

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 ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 24, 2015 Oct 24, 2015

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();

    }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2015 Oct 26, 2015
LATEST

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();

     }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources