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

Forcing a Commit() to LMS

New Here ,
Jul 19, 2013 Jul 19, 2013

Copy link to clipboard

Copied

We're experiencing issues with our captivate coureses in Oracle LMS.  I'm trying to used execute a javascript to force the course to send a commit to the LMS more often.

I've tried doing this through a button that would execute g_objAPI.LMSCommit(''); and also go to the next slide.  It doesn't seem like this worked as we don't see any additional commits on the LMS side.

I've tried executing the script to happen upon entering a slide. Again  there was no increase on the LMS side.

Does anyone know how to force a commit to happen through javascript within the course or by modifying the HTML file?  I'm currently working in captivate 6 thought I have 7 as well.

TOPICS
Quizzing and LMS

Views

2.9K

Likes

Translate

Translate

Report

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
Explorer ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

Did you ever find a solution for this problem?  I would like to do the same thing (using SCORM 2004).

Thanks

Likes

Translate

Translate

Report

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
Community Expert ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

What is not happening that you feel you need to force a commit? Are your bookmarks not staying?

You only need to do a commit when data is written to the database. In 2004 using an exit to suspend is more advantageous. We are using an older version of Oracles LMS, Learn.com.

Likes

Translate

Translate

Report

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
Explorer ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

Normally the bookmarking works fine for us, but about 10% of the students

run into the following problem.

We have the student go through about 12 slides in our course (slides 3

through 12 are slides which contain videos and last about 6 minutes each),

which takes them about an hour to go through. Then for certain people

they get a communication error and have to close out the course. Then

when these students try to resume the course, they always have to start

over at slide 3 again and are forced to watch the same hours worth of

video again.

I am using Adobe Captivate to create this course. The last course we ran

was using Scorm 1.2. This time we will be using Scorm 2004 version 4.

I just want to make sure that if someone gets a communication error (which

apparently no one has any idea what is causing it) that the student will

be able to actually resume where they left off.

I have heard that when using Scorm 2004, the suspend data and location

only get updated when a commit takes place, and since these students

always get sent back to slide number 3 (the first video slide), then slide

3 must be the only slide doing a commit (behind the scenes).

Therefore, I am trying to figure out what the correct sequence and syntax

for making sure that we are updating our suspend data and location as well

as doing the commit on each of these 6 minute video slides.

Any help would be greatly appreciated.

Randy

Likes

Translate

Translate

Report

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
Community Expert ,
Jan 07, 2014 Jan 07, 2014

Copy link to clipboard

Copied

In SCORM 2004, in Learn.com, which Taleo bught, and then Oracle bought, data is stored in a temporary table. The way the data gets commited to a permanent table is when the exit is set to suspend. If the course blows up, the progress is still saved. Another thing, don't make any calls when a swf or a video is loading. All initialization really should take place before the captivate swf is loaded. In all of our functions we set the exit to suspend like this in the setValue function:

function doSetValue(name, value)

{

   var api = getAPIHandle();

  

   if (api == null)

   {

      //alert("Unable to locate the LMS's API Implementation.\nSetValue was not successful.");

      return;

   }

   else

   {

      var result = api.SetValue(name, value);

 

   api.SetValue("cmi.exit", "suspend");

   doCommit();

  

      if (result.toString() != "true")

      {

         var err = ErrorHandler();

   result = err;

      }

   }

   return result;

}

  else

  {  

var win=window.open("","_top","","true");

  win.opener = true;

  win.close();

  }

}

}

Likes

Translate

Translate

Report

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 ,
Jan 08, 2014 Jan 08, 2014

Copy link to clipboard

Copied

Hi BubbaRB - for our specific issue I was able to place a question (survey) slide at various intervals within the course.  So the questions weren't scored but the interaction was.  This helped for our really long courses. Since you're embedding videos, I'm not sure that solution is going to work. So far for every course I've seen with videos, if you leave or are disconnected from the LMS, you have to watch the entire video all over again unless you keep the fast forwarding capability in there.

Likes

Translate

Translate

Report

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
Community Expert ,
Jan 10, 2014 Jan 10, 2014

Copy link to clipboard

Copied

There are several commit statements in the scormdriver.js and SCORM_utilities.js file.

You could try any of these to force a commit:

SCORM 1.2 = SCORM_CallLMSCommit();

SCORM 2004 = SCORM2004_CallCommit();

There is also a function CommitData();, can't tell off hand what it is used for, there is a ton of trash no matter which version of SCORM you choose.

Likes

Translate

Translate

Report

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
Community Beginner ,
Oct 09, 2020 Oct 09, 2020

Copy link to clipboard

Copied

I am having a simular issue, we are dealing with an old LMS, when it disconnects unexpectingly, it does not bookmark.. Would putting this code: SCORM_CallLMSCommit(); into the next button of each page, allow it to save progress.

Likes

Translate

Translate

Report

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
Participant ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

We used this successfully on a course last year.  This same course when tested the other day no longer works when running SCORM_CallLMSCommit();.  Have there been Browser updates that stop this from working?  

Likes

Translate

Translate

Report

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
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

What do you mean by it no longer works? How do you know the commit is not working?

 

The only thing that would stop it from happening is if the API is lost and it can't find it again.

 

log"API" with JS where you are calling the commit and see what is being logged in the browser.

 

console.log(API)

 

It should return an object.

Likes

Translate

Translate

Report

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
Community Beginner ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

We figured out that it is the pop up message that stopped working. We are thinking because of later versions of the web browser, so are going to try this:

 

SCORM_CallLMSCommit();

 

var commitTest = "xx";

try {

    commitTest = SCORM_CallLMSCommit();

} catch (err) {

}

if (commitTest == "xx" || commitTest === false) {

window.open("pop/disconnect_warning.html ", "SameWindow", "toolbar=yes, scrollbars=yes, resizable=yes, width=650, height=550");

}

 

Then we will create an HTML page called disconnect_warning.html, with the following text, and an exit button for the code to call to:

"The TMS did not respond to the last request. Please exit and relaunch the course. If you continue without doing so, your progress will"

 

Does this new code look good to you?

Thanks,

Charley

Likes

Translate

Translate

Report

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
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

Shouldn't the "SameWindow" argument be "_self"?

Likes

Translate

Translate

Report

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
Participant ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

We are no longer getting the popup warning folks that the server disconnected.  

 

This is what we were using that no longer works:

SCORM_CallLMSCommit();
var commitTest = "xx";
try {
    commitTest = SCORM_CallLMSCommit();
} catch (err) {
}
if (commitTest == "xx" || commitTest === false) {
    alert("The TMS did not respond to the last request. Please exit and relaunch the course. If you continue without doing so, your progress will not be saved. Select the button below to continue.");
}

 

 

We will be trying this:

SCORM_CallLMSCommit();
var commitTest = "xx";
try {
    commitTest = SCORM_CallLMSCommit();
} catch (err) {
}
if (commitTest == "xx" || commitTest === false) {
window.open("pop/disconnect_warning.html ", "SameWindow", "toolbar=yes, scrollbars=yes, resizable=yes, width=650, height=550");
}

 

Likes

Translate

Translate

Report

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
Community Expert ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

LATEST

I don't think the try..catch is necessary either, use this as the commit function only returns true or false:

 

var commitTest = SCORM_CallLMSCommit();

if ( commitTest === false )
{
window.open("pop/disconnect_warning.html ", "_self", "toolbar=yes, scrollbars=yes, resizable=yes, width=650, height=550");
}

Likes

Translate

Translate

Report

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