Forum Discussion
AmanDubey
4 years agoCommunity Member
Need your Help -Sending custom variable to LMS
Hi,
I have a course with custom variable storing the score,
Need to send the score to LMS. the limitations is that i can't convert the interaction to free form questions , as the scoring mecha...
JoeFrancis
4 years agoCommunity Member
To return a learner's score to an LMS using JavaScript, you can do the following:
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 userScore= player.GetVar("numUserScore");
lmsAPI.SetScore(userScore, 100, 0);
SetScore requires 3 parameters: the learner's score, the maximum-possible score (usually 100), and the minimum score (usually 0).
numUserScore is the numeric variable you create in Storyline to track the learner's score.
Related Content
- 2 months ago
- 2 months ago
- 9 months ago
- 2 months ago