Skip to main content
Inspiring
May 16, 2016
Question

How can I use API.LMSCommit(”); to check LMS connection?

  • May 16, 2016
  • 1 reply
  • 2300 views

Hi all,

I want to find a way to use an API.LMSCommit('') call to let my modules check to see that they are still connected to the LMS.

If it is a false boolean then it calls myAlert function to pop up a message to tell the learner they need to reconnect.

Is this the right way to do this? or is there a way to do this already in Captivate 8?

var checked = API.LMSCommit()

if (checked == true){

//do nothing;}

if(checked == false){

import flash.external.ExternalInterface;

ExternalInterface.call("myAlert");

}

Cheers

Luke

    This topic has been closed for replies.

    1 reply

    Inspiring
    May 16, 2016

    Further to the above,

    I did find a function in the scormdriver.js that comes with 8 and I figured that already has a call to commit.

    So I am trying this in AS3

    import flash.external.ExternalInterface;

    var checked = ExternalInterface.call.("SCORM_CallLMSCommit")

    if(checked == "SCORM_FALSE"){

    ExternalInterface.call("myAlert");

    }

    TLCMediaDesign
    Inspiring
    May 16, 2016

    First question, even if you alert that is not connected, how is the learner going to reconnect?

    The SCORM_CallLMSCommit will actually return "false" as that is the default value of SCORM_FALSE. Plus the function returns either true or false as a Boolean.

    So you could just say:

    import flash.external.ExternalInterface;

    var checked:Boolean = ExternalInterface.call.("SCORM_CallLMSCommit")

    if( !checked ){

    ExternalInterface.call("myAlert");

    }

    Inspiring
    May 16, 2016

    Thanks TLC,

    I have added a function that changes the users browser and throws up a warning (blinking) to tell the learner that they need to log in again to complete the learning.

    Thanks for the above code, I'll try it out and see what happens

    Luke