Reporting numeric value to LMS

Feb 15, 2021

Hello,

I created a custom quiz and am having trouble getting my variable, TotalScore, to pass to my LMS (D2L). I believe I followed the instructions found here: https://articulate.com/support/article/Storyline-360-How-to-Send-the-Value-of-a-Variable-to-an-LMS but am still having trouble. It does send the progress and status correctly. I attached my quiz. Any insights would be greatly appreciated. 

Thanks,

Jon

 

3 Replies
Joseph Francis

This is the JavaScript I used to return a score to an LMS using AICC and SCORM:

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);

var lmsScore = player.GetVar("TotalScore");
lmsAPI.SetScore(lmsScore , 30, 0);

Note, because you're using 30 as the max/passing score, I adjusted lmsAPI.SetScore(); (typically it would be set to 100).

SetScore(score, maxScore, minScore); is a function inside the lmsAPI object which sends the score to the LMS. It accepts 3 parameters: Learner's Score, Maximum Score, and Minimum Score.