Getting a Custom Quiz to Interact with the Results Slide

Jul 19, 2018

I have created a quiz that contains scenario type questions that have several correct answers and several incorrect answers. I’d like the learner to receive points for each correct answer because, in the context of this particular assessment, I don’t want the learner to receive zero credit if they select 3 out of 4 correct answers.

To achieve this, I have created a variable called TotalScore and set each correct answer to “add 1 to TotalScore” when the learner clicks a checkbox.

This seems to work well; however, I’m getting hung up on how to make this “TotalScore” variable interact with the results slide so that a pass/fail score can be communicated with the LMS.

In the attached file I have created a workaround where I use a fake results slide which is actually a pick one question. One of the two buttons on this slide will show depending on how many points the learner has scored. Clicking the button advances them to the real results slide and triggers either the success or failure slide layers.

I feel like there has to be a more eloquent and straightforward way to achieve what I’m trying to achieve. I’m certain others in this community have created custom assessments before but I’m not finding anything in the forums. If anyone has any ideas or has created anything similar I would really appreciate your feedback.

2 Replies
Nicole Legault

Hey there Nadia!

Thanks for posting your question here. 

As far as I know, you need to use a Results slide to communicate with an LMS. So you will need to have a Results slide somewhere in your course. I don't think the learner even has to actually visit the results slide, it could just be hidden or unused. When you insert a Results slide, Storyline generates 4 variables by default, and those are the variables that pass on the score to the LMS.

Those variables are:

 

You probably want to replace the TotalScore variable you created with the system variable called Results.ScorePoints to track the amount of points they earn during the course. That variable will be passed on to the Results slide, and then can be passed on to the LMS. 

Hope this information helps :) 

Sanduni Fernando

Hi Nadia,

I have used javascript for a similar scenario. It is well explained here.

Thanks to Mateusz Szuter (on the above thread), the following code worked for me.

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("Your_Score_Variable"), 100, 0);

 

//"Your_Score_Variable" is the TotalScore you mentioned here.

 

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

This discussion is closed. You can start a new discussion or contact Articulate Support.