Javascript raw score >100 won't report back to LMS.
Sep 05, 2013
By
Job Vlaming
Hi,
I could use some help/advice.
I use simple javascript to send back a raw score to Scorm Cloud LMS. I've found it won't work when either score is >100. I use Scorm 2004.
I use this code:
var p = GetPlayer();
var TotalScore = p.GetVar("TotalScore");
var lmsAPI = parent;
lmsAPI.SetScore(TotalScore, 100, 0);
This should set this in the LMS:
- cmi.score_raw = value of TotalScore variable (0-15000)
- cmi.score_max = 100
- cmi.score_min = 0
No data is sent to Scorm Cloud LMS. According to Scom 2004 and Scorm Cloud specs, cmi.score_raw is not limited to 100, but can be any number with up to 7 digits. cmi.score_max is limited to 100.
Storyline apparently limits the raw score to 100. It seems Storyline imposes the Scorm 1.2 limit on th
Other things I've found that are related:
- Storyline does allow cmi.score_raw to be greater than cmi.score_max, as long as both less than 100.
- Storyline won't send any score element if any are >100.
- Looking in various .js-files Storyline generates there seems to be some code that checks if the raw score is <100. Changing that code didn't help, but seeing the code did confirm my suspicion the problem is at the Storyline end.
Ayoub
10 Replies
Hi Ayoub.
I dont´t have an answer for you, but I have a problem with storyline. My course doesn't sends raw score to Scorm Cloud. I supose that you managed it, but how?
Can you attach here an example, please?
Many thanks.
Hi Poiutre,
I use javascript to send a score back to Scorm cloud. I don't use any of the built in scoring options, though.
I send back the value of a variable using the 'execute javascript' function.
// get storyline player
var p = GetPlayer();
//get variable. LMSScore is the variable I store the score in.
var LMSScore= p.GetVar("LMSScore");
//get LMS API
var lmsAPI = parent;
//set score; the first number is the score
lmsAPI.SetScore(LMSScore, 100, 0);
Good luck!
Ayoub, thanks for sharing your solution with Poiutre!
Thanks a lot, Ayoub!
Hi,
I tried this code but I can seen to make it work :(
It doesn't get my variable from the course... I'm publishing to scorm 1.2...
var player = GetPlayer();
var Score = player.GetVar(“ScorePercent”)
var lmsAPI = parent;
lmsAPI.SetScore(Score, 100,60);
Can anyone help?
Hi Ana,
just looking at your script, I can see that the last line does not reference your variable 'ScorePercent'.
Perhaps try
lmsAPI.SetScore(ScorePercent, 100, 0);
hope this works
Hi,
I have found something very strange.
The score and status will not be overwritten, if the success_status is different.
If both scores have the same success_status then the score is overwritten.
eg. Passing score is 80%
The score that was sent - SetValue('cmi.score.raw', '97') - success_status 'passed'
The articulate score - SetValue('cmi.score.raw', '73.33') - success_status 'failed'
There seems to be some kind of error checking that corrects the score and status on close.
Has anyone else experienced this?
The assessment was built in Articulate Storyline 2 and output as SCORM 2004.
I have found what is causing the issue.
If you add an 'exit course' button to your module, it seems to do a check before closing, adjusting your results if they no not match.
If the user exits the window by closing the browser, this does not cause an issue.
I now seem to have the same issue re raw score 100+ - was this ever resolved please?
Thanks
hi Linda,
This discussion is a bit older, so it's hard to know if you're experiencing the same issue as mentioned here.
What version of Storyline are you using? What LMS are you using to test in? You may also want to look at testing in SCORM Cloud which is a good way to confirm where the issue may be. Also, if you want to see the information that Storyline is passing to an LMS, look at the steps here to enable LMS debug mode.
Let us know if you need anything else!
This discussion is closed. You can start a new discussion or contact Articulate Support.