Submit Final Score to LMS Without Using Results Screen

I have a project I am completing in Storyline 360 that has six separate games that the user completes in order to work through a "final exam". Each game has it's own score variable (%game01score%, %game02score% etc.) and each of these individual game score is computed manually - none of them rely on a Results Screen.

At the end of each game, each of these scores adjust a %TOTALscore% variable. On the home screen, the user can see each separate game score and the total score.

When all six games have been completed, I have some trigger logic that sends them to a final screen that shows them their total score and evaluates how they did based on this total score. 

I need to be able to send a "complete/incomplete" value to the LMS, plus I need to send the %TOTALscore% variable to the LMS. The LMS settings seem to rely on a Results Screen which I am not using. Any recommendations?

2 Replies
Crystal Horn

Hi there, Thomas. The results slide (which is what calculates the reportable score variables) is how Storyline communicates information to the LMS. Do you have many possible scores? Some folks will build quiz interactions with offstage elements that automatically submit interactions to results slides, which then score the interactions and send the information to the LMS.

So while it's possible to do using Storyline's built-in quizzing features, it'll take some creativity. Does anyone in the community have an example of using a behind-the-scenes quiz to pass information to the LMS?

Tom W

Hi Thomas.

I've been experimenting with trying a similar thing recently and found some help on a few different threads, so I'll try to pass on what I've learned.

If it's just the final score and a completion status you need to be reported to the LMS then you should be able to achieve that with some JavaScript code. I think you'll need to set your completion tracking to either 'Track using number of slides viewed' or 'Track using complete course trigger' though. When you have it set to 'Track using quiz result' the JavaScript code will be overwritten by the built-in passed/failed status.

Here's the code that may work. I'm a novice when it comes to JavaScript, but this is what I found on other threads here and it's worked when I've tested it:

var p = GetPlayer();

var passingScore = [enter the passing score here];

function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);

var TOTALScore = p.GetVar("TOTALScore");

p.SetVar("TOTALScore", TOTALScore );

lmsAPI.SetScore(TOTALScore, [enter the maximum score here], [enter the minimum score here]);

if (player.GetVar("TOTALScore")>= passingScore)
{
SetStatus("passed");
} else {
SetStatus("failed");
}

As I say, I don't know much about JavaScript, so that may not be entirely right, but it should be a good starting point. If anything's not working I'm sure some of the more code-savy members can help.

EDIT: The above is based on your total score just being a number rather than a percentage. If it's a percentage you'll need some extra code, which I think I can provide if needed.