The title says it all, really. I'm not using any built-in quiz functionality because I'm using a custom scoring scheme where there is no one right or wrong answer. This is for a branching scenario.
I have a project variable capturing the cumulative score. It's the value of this variable that I want to pass to the LMS (Brightspace) as the official score. Publishing as SCORM 2004 4th edition.
You sure can. First, set up communication with the Storyline Player by retrieving its handle.
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);
SetScore() requires 3 arguments to work: the learner's score, the maximum score, and the minimum score. Before we can send it, we need to retrieve the learner's score (contained in a variable you created) from the course.
var lmsScore = player.GetVar("learnerScore");
Now we can send that back to the LMS.
lmsAPI.SetScore(lmsScore, 100, 0);
If you also want to tell the LMS if the learner has passed or not, you can send the course status at the same time, based on the score. For example, if the passing score is 80:
Thanks very much. I'm pretty new to Javascript. I'll give this a shot and let you know.
If I don't need to tell the LMS if the learner has passed (that's already being done with a trigger), then I don't need to add the third argument, correct?
I realized I have one more question before I try this. In the argument:
lmsAPI.SetScore(lmsScore, 100, 0);
is the 100 and 0 setting the score range in points? If so, should I replace 100 with the max value my project scorekeeping variable can attain (6) and 0 with the lowest value (-3)?
That could be a problem, as per the SCORM specification, both cmi.core.score.max and cim.core.score.min (what a SCO and the LMS use to set minimum and maximum scores) have to be "normalized values between 0 and 100."
Well, I may just let it stand, then, since the folks on the client side know what the scoring parameters are and course pass/fail is being sent by a separate SL360 trigger.
I know with an LMS like SumTotal, I essentially "turned over" course completion to the LMS, where it handled the marking of either "Passed" or "Incomplete," based on the score returned by the course.
In your case, which executed first, the SL trigger or the Javascript? Order of execution does make a difference. Try it with the SL trigger disabled.
I had the JS trigger fire first. I took your advice and disabled the course completion trigger but no score was passed to SCORM Cloud.
I really appreciate your help. Passing the score to the LMS is, at this point, a nice-to-have. I have each scenario set up so the learners see a summary page based on their score, and those pages have the appropriate pass/fail SL trigger built in.
I really would like Articulate to move beyond just right and wrong answer capability, and to allow the built-in variable that captures scores on a quiz to be exposed to triggers.
10 Replies
You sure can. First, set up communication with the Storyline Player by retrieving its handle.
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);
SetScore() requires 3 arguments to work: the learner's score, the maximum score, and the minimum score. Before we can send it, we need to retrieve the learner's score (contained in a variable you created) from the course.
var lmsScore = player.GetVar("learnerScore");
Now we can send that back to the LMS.
lmsAPI.SetScore(lmsScore, 100, 0);
If you also want to tell the LMS if the learner has passed or not, you can send the course status at the same time, based on the score. For example, if the passing score is 80:
if (lmsScore >= 80) {
SetStatus("passed");
} else {
SetStatus("failed");
}
Joseph-
Thanks very much. I'm pretty new to Javascript. I'll give this a shot and let you know.
If I don't need to tell the LMS if the learner has passed (that's already being done with a trigger), then I don't need to add the third argument, correct?
The last block of code can be considered "bonus," since you're sending that information in a trigger.
OK, thanks.
Joseph-
I realized I have one more question before I try this. In the argument:
lmsAPI.SetScore(lmsScore, 100, 0);
is the 100 and 0 setting the score range in points? If so, should I replace 100 with the max value my project scorekeeping variable can attain (6) and 0 with the lowest value (-3)?
That could be a problem, as per the SCORM specification, both cmi.core.score.max and cim.core.score.min (what a SCO and the LMS use to set minimum and maximum scores) have to be "normalized values between 0 and 100."
Sharable Content Object Reference Model (SCORMĀ®)
Scroll down to SCORM 1.2 > Technical Specification (Version 1.2) (zip file) for details.
Well, I may just let it stand, then, since the folks on the client side know what the scoring parameters are and course pass/fail is being sent by a separate SL360 trigger.
Tested on SCORM Cloud. I went for a perfect score. SL trigger worked, JS didn't. See attached image for results.
I know with an LMS like SumTotal, I essentially "turned over" course completion to the LMS, where it handled the marking of either "Passed" or "Incomplete," based on the score returned by the course.
In your case, which executed first, the SL trigger or the Javascript? Order of execution does make a difference. Try it with the SL trigger disabled.
I had the JS trigger fire first. I took your advice and disabled the course completion trigger but no score was passed to SCORM Cloud.
I really appreciate your help. Passing the score to the LMS is, at this point, a nice-to-have. I have each scenario set up so the learners see a summary page based on their score, and those pages have the appropriate pass/fail SL trigger built in.
I really would like Articulate to move beyond just right and wrong answer capability, and to allow the built-in variable that captures scores on a quiz to be exposed to triggers.
Again, many thanks.