How do I pass custom Game Assessment data to an LMS?

Hi Heroes,

I am using a custom game as the final assessment for a Storyline course. Passing grade, as set by the client, is 70%.

Since this is a custom quiz, I am using the "Execute JavaScript" trigger at the timeline start of the quiz results layer. I am NOT a Java programmer.

I need to pass the grade and if the student passed or failed. I think I figure out how to pass the grade, but I don't know how to pass the pass/fail data.

Here's what I have so far:

/*Get player to reference*/

var player = GetPlayer();

/*get LMS API*/

var lmsAPI = parent;

/*set score; the first number is the score*/

lmsAPI.SetScore(player.GetVar("zGameshowGameScore"), 100, 70);

/*set status; possible values: "completed","incomplete", "failed", "passed"*/

SetStatus("passed")

Any ideas?

3 Replies
Rick Blunt

Here's what I've tried so far that does not work:


/*Get player toreference*/ 
var player =GetPlayer(); 
/*get LMS API*/ 
var lmsAPI =parent; 
/*set score; thefirst number is the score*/ 
lmsAPI.SetScore(player.GetVar("zGameshowGameScore"),100, 70); 
/*set status;possible values: "completed","incomplete","failed", "passed"*/ 
SetStatus("passed") 

 ********************************************************************************************

/*Get player to reference*/

var player = GetPlayer();

/*get LMS API*/

var lmsAPI = parent;

/*set score; the first number is thescore*/ lmsAPI.SetScore(player.GetVar("zGameshowGameScore"), 100,70);

/*set status; possible values:"completed","incomplete", "failed","passed"*/

if(player.GetVar("zGameshowGameScore")>=70)

{

ImsAPI.SetStatus("passed");

}

else

{

ImsAPI.SetStatus("failed");

}

***************************************************************************************************

var player = GetPlayer();

var lmsAPI = parent;

lmsAPI.SetScore(player.GetVar(“hazards”), 70, 0);

if(player.GetVar(“hazards”)>=60)

SetStatus = "Passed";

if(player.GetVar(“hazards”)

SetStatus = "Failed";

Rick Blunt

Looks like this is the code that works:

/*Get player to reference*/

var player = GetPlayer();

/*get LMS API*/

var lmsAPI = parent;

/*set score; the first number is the score*/lmsAPI.SetScore(player.GetVar("zGameshowGameScore"), 100, 70);

/*set status; possible values:"completed","incomplete", "failed","passed"*/

if (player.GetVar("zGameshowGameScore")>=70)

SetStatus("passed");

else

SetStatus("failed");