Calling LMSCommit(); in JavaScript trigger no longer working in Storyline 360
Mar 07, 2018
Hello,
I've been working on a course that relies on forcing bookmarking on LMS when loading certain slides. The reason for this is send the users back to the beginning of an assessment if they leave partway through. The project requires normal bookmarking behavior during the learning content, but users must take the entire assessment in one session.
The logic on each assessment slide is this:
- Jump to Beginning of Assessment if slideX var = true
- Set slideX var = true
- Execute JavaScript LMSCommit();
This was working fine in previous versions of Storyline 360, but LMSCommit(); does not seem to work any longer. Now the variable is not saved because bookmarking does not happen in Storyline until the slide changes, and thus the user returns back to the middle of the assessment instead of the beginning.
So my question is - does anyone know a way to manually force bookmarking in the latest version of Storyline 360?
I am thinking that Storyline's LMS-related JavaScript changed with the addition of the new course completion triggers, but I don't know how to work around this issue now that LMSCommit no longer works.
I noticed another function in lms.js called ForceCommit() that doesn't seem familiar, but I can't seem to call it directly.
Any help would be greatly appreciated, because I am stuck without the LMSCommit functionality for this course.
Thank you,
Matt
12 Replies
This might be the result of changes to the player in html5. I haven't tested this, but you might first have to locate the lms before calling LMSCommit();
Again, I haven't tested this code but you might try the following which uses the GetStudentID command as an LMS marker to confirm the path to the LMS:
function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;
// all done if no parent
else if (win.parent == win) return null;
// climb up to parent window & look there
else return findLMSAPI(win.parent);
}
//Run the function and store the result in a variable
var lmsAPI = findLMSAPI(this);
//Call the LMS commit command
lmsAPI.LMSCommit();
Hi Owen,
Thanks so much for your response!
I actually tried that exact code earlier today to see if it would make LMSCommit work, and have not had any luck.
I've used that function to find the lmsAPI for setting LMS status in the past and it works wonders, but it doesn't seem to work for this issue.
I'm not an LMS guru but I'm wondering if maybe you can use the LMS cmi.core.lesson_location functionality to set and get a slide number for bookmarking.
Hi Owen,
I was wondering about that too. I will give it a try when time permits.
I'm a little worried that it still won't work if I can't do a LMS commit, but there might be a workaround in there somewhere.
As an aside, a co-worker tested the LMSCommit(); code on an older version, Storyline 360 v11 and it worked. So it seems like something changed with v12 or v13. If I had to guess it was that some of the LMS code was re-written when they introduced the Course Completion triggers in v13.
Thanks again.
Hello,
I've notice this with Storyline 360 on a Saba LMS too where forcing a lms commit via a JavaScript doesn't work these days. It did work in the past.
Thanks.
Hi,
Did anyone find any solution of how to call LMSCommit() from storyline? I am currently working on how to make the learners know that they have lost the internet connection while taking the course. I am using a java script trigger to call LMSCommit() but it is not doing anything.
Were you able to find the solution to trigger the LMSCommit()?
Hello Naeem,
We have the issue with the LMSCommit() filed as a software bug and this conversation is attached to the report so that we can update you here when we can.
I wanted to share some information on how we define bugs and how we tackle them when they occur.
I've been looking at the lmsAPI object in JavaScript. It doesn't seem to have the methods it used to have.
There are other objects e.g., objLMS which does have methods that can be called.
Has anyone knowledge of a sure-fire way to call LMSCommit these days?
So LMSCommit in SL 360 is broken. Is it working in Storyline 3?
Hi Sam. I tested in the most recent update of Storyline 3, and I saw the same behavior: No indication that the LMSCommit was called in the debug log. I've made sure we have this documented for Storyline 3 as well.
Bumping this thread. Is there a reliable way to call LMS commit called via javascript? I'd like to have a constantly updated course variable saved to the LMS every 30 seconds in case the course is closed on a particular slide.
This discussion is closed. You can start a new discussion or contact Articulate Support.