Sending the correct percentage to LMS when more than one quiz to choose from

Hello everyone

I have designed a course in Storyline 3 which has two pathways for different staff groups to select depending on their role.  Each pathway has it's own quiz tailored to their role.

I would like to pass the results back to the LMS of the results from either quiz (not both).  I am using a result slide for each quiz and a separate results slide to send the results back which seems to combine the scores from both quizzes. 

The result slide that combines the two quizzes shows only 50% when scoring 100% in one quiz.  I want users to take the quiz appropriate to their role (not both quizzes) and their percentage to report back.

Do any of you Storyline/Javascript gurus know how I get the correct percentage to pass back to the LMS?

Many thanks for any help.

4 Replies
Sanduni Fernando

The following is the javascript that I use to pass the percentage to LMS when I am not using the storyline's inbuilt results slide (similar to your scenario).

"MyPercent" is the Storyline variable that I use to store the final percentage of the quiz. Pass/ Fail status also passed in the below javascript.

Just give it a try and see whether it is working with the LMS that you are working with.

var player = GetPlayer();
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);
lmsAPI.SetScore(player.GetVar("MyPercent"), 100, 0);

var passingScore = "80";
if (player.GetVar("MyPercent") >= passingScore)
{
lmsAPI.SCORM_CallLMSSetValue("cmi.core.lesson_status", "passed");
} else {
lmsAPI.SCORM_CallLMSSetValue("cmi.core.lesson_status", "failed");
}

 

 

Amanda  Gunning

Thank you to both of you.   Sadly our LMS is pretty basic. I will give the code a go.
Do you think I would need to remove/rebuild the inbuilt results slides for each pathway which show the user their results for the code to work or will the code override any messages already sent to the LMS from the results slides?

Jenny Brock

Hello, I am having this same problem.  I am very new to using Storyline (I am using 360) so I am not even sure how to go about trying this solution.  Do I input this code in the variable trigger itself or where does this code go?

I have one course that has a quiz for 5 different paths.  1 user will only take 1 path.  I am running into my % scores being off and trouble passing the scores appropriately.  I do have a separate results slide for each path. 

Thank you - pictures of how to do this are welcome :)