Glad the community is able to assist you here - as there isn't a built in way to override the generated results, so using something like Javascript will be the best option.
Thanks for the file Matthew. And I tested in SCORM Cloud and it sets the status as complete. But the score in not showing.
Let me explain you briefly.
We have 8 modules, each having assessment at the end. So we have 8 result slides (starting from Results.ScorePercent, Results1.ScorePercent... so on till Results7.ScorePercent). And at the End of all modules when the user scores 80% in each module we are showing a Final Results slide which adds the score of all the result slides and gives to "Results8.ScorePercent".
This is the score we need to sent to LMS.
So when we complete the course in one go, the score sent to LMS is perfect.
But when we close the course in between and resume again later the score sent to LMS is for the modules we did at the end, say 3 modules and it sends the score as say, 35% to LMS. But the status will change to Completed.
So when we see the status its completed but the scores are like 35%, 55%, 42.% ect which is wrong. Those should be 80%, 85%, 90%.. so on.
So we are using a variable called "All_Res" which will calculate the score for all the 8 modules and keeps the track properly. We want to send this value as LMS score. And this is what I meant when I told manually set the score.
Hi maybe you solve this already, of not, and if im getting this ok you issue is the score is not updated after you complete the module, the status might change but not the score. If that's so, try editing the file called configuration.js after your published, its in the LMS folder of your published package.
you can edit this file with notepad, and search for this text:
var SCORE_CAN_ONLY_IMPROVE = false; //set this to true to ensure that on subsequent attempts, a learner's score can only go up
var REVIEW_MODE_IS_READ_ONLY = true; //set this to true if no new data should be saved when a course is launched in review mode (normally this is the LMS's responsibility)
Swap the values, false change it to true; and the true one, to false;
like this
var SCORE_CAN_ONLY_IMPROVE = true; //set this to true to ensure that on subsequent attempts, a learner's score can only go up
var REVIEW_MODE_IS_READ_ONLY = false; //set this to true if no new data should be saved when a course is launched in review mode (normally this is the LMS's responsibility)
save it, zip the entire thing and try it. It should allows the LMS to modify the score if more progress is done, even when the status is complete.
Hi, Srinivas -- Thanks for the update and if you are able, please feel free to share the solution you discovered, as it may benefit others who come across this post in the future seeking assistance. :)
Actually we had some 5 modules with assessments for each module. The course completion and final score depends on the average of 5 assessment scores.
We added javascript at the results slides of all the assessments and stored the scores by user defined variables. This will help us retrieve the values on re-visit or at final results slide. Once we retrieve the values we calculate the average and depending on that showed the pass or fail layer.
We also made sure that these values are saved when the user exits the course and retrieved then user re-visits the course.
The javascript is just the "player.GetVar" and "player.SetVar".
If anyone face any technical issues in Storyline, please feel free to contact me. I will do my best to give you the best solution.
I don't know if Srini is still subscribed to this thread, but you may want to use the "contact me" button on his profile to reach out to him directly and see if he's able to share specifics with you.
Maybe this will help you, this is what im using, its a clasic JS with a few modifications i made myself.
var player = GetPlayer(); var YourScore= player.GetVar("scoreCustom"); var MaxSlides = 130; var YourScore=(YourScore*100)/MaxSlides; var YourScore=Math.round(YourScore); // This make the score into a round integer like 45% instead of 44,68% for example var lmsAPI = parent;
lmsAPI.SetScore(YourScore,100,0); //second parameter is max, second is min scale
if (YourScore >= 75 ) //change the number if you want a higher or lower % in order to complete the module.
Thanks for popping in to assist Man here. I just wanted to mention that replying to the forums via e-mail attaches your signature. You are welcome to edit if needed.
I have a course that is made up of many scoring modules that is calculated and produced to the end user upon course completion on a final results slide.
Is there anyway to pass this value to cmi.core.score.raw in the LMS
Has anyone had any luck getting the lmsAPI.SetScore function to work with HTML5 output?
I'm manually forcing completion and score for my course using javascript. Both of those functions (setStatus and lmsAPI.SetScore) work perfectly and consistently in the swf output. However, only the completion status is passed in the HTML5 output. The score is not passed.
I should mention, the course is published to the AICC standard.
I have the same issue, i found a way that works but i dont have it here i
can certainly look tonight at home. Cant remember if i ended up using it or
not but i can check then you can tell me if it worked for you.
41 Replies
Hi Shrini,
You can do it without using javascript.
First let me know, Do you want to submit that score on LMS?
Hi Sagar,
Yes, I would like to send the score to LMS as well as show it onscreen.
Thanks,
Srini
Hi Shrini,
Glad the community is able to assist you here - as there isn't a built in way to override the generated results, so using something like Javascript will be the best option.
Hi Matthew Bibby,
I did try the code you gave, but still it is not working.
Thanks,
Srini
Hi Srinivas -
Give this a shot:
You can find references to the direct LMS API interaction by searching for lmsAPI.
https://community.articulate.com/discussions/articulate-storyline/basic-integration-of-scorm-api#reply-77681
We did try in SCORM Cloud, Absorb, & Reload.
But same result in all. :(
Thanks,
Srini
Thanks for the file Matthew. And I tested in SCORM Cloud and it sets the status as complete. But the score in not showing.
Let me explain you briefly.
We have 8 modules, each having assessment at the end. So we have 8 result slides (starting from Results.ScorePercent, Results1.ScorePercent... so on till Results7.ScorePercent). And at the End of all modules when the user scores 80% in each module we are showing a Final Results slide which adds the score of all the result slides and gives to "Results8.ScorePercent".
This is the score we need to sent to LMS.
So when we complete the course in one go, the score sent to LMS is perfect.
But when we close the course in between and resume again later the score sent to LMS is for the modules we did at the end, say 3 modules and it sends the score as say, 35% to LMS. But the status will change to Completed.
So when we see the status its completed but the scores are like 35%, 55%, 42.% ect which is wrong. Those should be 80%, 85%, 90%.. so on.
So we are using a variable called "All_Res" which will calculate the score for all the 8 modules and keeps the track properly. We want to send this value as LMS score. And this is what I meant when I told manually set the score.
Thanks,
Srini
And would like to let you know that we are publishing it in SCORM 1.2.
And for "cmi.core.score.raw" we need to set a normalized value between 0 and 100. But here am trying to send the value we are storing in a variable.
Hi maybe you solve this already, of not, and if im getting this ok you issue is the score is not updated after you complete the module, the status might change but not the score.
If that's so, try editing the file called configuration.js after your published, its in the LMS folder of your published package.
you can edit this file with notepad, and search for this text:
var SCORE_CAN_ONLY_IMPROVE = false; //set this to true to ensure that on subsequent attempts, a learner's score can only go up
var REVIEW_MODE_IS_READ_ONLY = true; //set this to true if no new data should be saved when a course is launched in review mode (normally this is the LMS's responsibility)
Swap the values, false change it to true; and the true one, to false;
like this
var SCORE_CAN_ONLY_IMPROVE = true; //set this to true to ensure that on subsequent attempts, a learner's score can only go up
var REVIEW_MODE_IS_READ_ONLY = false; //set this to true if no new data should be saved when a course is launched in review mode (normally this is the LMS's responsibility)
save it, zip the entire thing and try it. It should allows the LMS to modify the score if more progress is done, even when the status is complete.
Cheers
Hi Rick,
Thanks for your valuable feedback. I have completed that project successfully using java script. Will keep your inputs in mind for further projects.
Thank you :)
Hi, Srinivas -- Thanks for the update and if you are able, please feel free to share the solution you discovered, as it may benefit others who come across this post in the future seeking assistance. :)
Sure Christie.
Actually we had some 5 modules with assessments for each module. The course completion and final score depends on the average of 5 assessment scores.
We added javascript at the results slides of all the assessments and stored the scores by user defined variables. This will help us retrieve the values on re-visit or at final results slide. Once we retrieve the values we calculate the average and depending on that showed the pass or fail layer.
We also made sure that these values are saved when the user exits the course and retrieved then user re-visits the course.
The javascript is just the "player.GetVar" and "player.SetVar".
If anyone face any technical issues in Storyline, please feel free to contact me. I will do my best to give you the best solution.
Thanks,
Srini
Hi Srini,
Can you please tell me which javascript code you had used to send the value.
I am using this code to lmsAPI.SetScore('player.GetVar(Score)',100,0) to send the score to the LMS but it didnt worked.
Thanks
Manmohan
Hi Manmohan,
I don't know if Srini is still subscribed to this thread, but you may want to use the "contact me" button on his profile to reach out to him directly and see if he's able to share specifics with you.
Hi There,
Maybe this will help you, this is what im using, its a clasic JS with a few modifications i made myself.
var player = GetPlayer();
var YourScore= player.GetVar("scoreCustom");
var MaxSlides = 130;
var YourScore=(YourScore*100)/MaxSlides;
var YourScore=Math.round(YourScore); // This make the score into a round integer like 45% instead of 44,68% for example
var lmsAPI = parent;
lmsAPI.SetScore(YourScore,100,0); //second parameter is max, second is min scale
if (YourScore >= 75 ) //change the number if you want a higher or lower % in order to complete the module.
{
SetStatus("completed")
}
else
{
SetStatus("Incompleted")
}
Cheers
Rick
Hi Rick,
Thanks a lot for the suggestion.
It worked :)
That's great, glad to help!
Rick
Hey Rick!
Thanks for popping in to assist Man here. I just wanted to mention that replying to the forums via e-mail attaches your signature. You are welcome to edit if needed.
Cool thanks! Edited now
Hi,
I have a course that is made up of many scoring modules that is calculated and produced to the end user upon course completion on a final results slide.
Is there anyway to pass this value to cmi.core.score.raw in the LMS
Hi Therese
this previous post may have some answers for you
Hi, Therese -
A couple of examples in this thread. The Storyline LMS functions pass the results value to cmi.core.score.raw in the LMS. You can force this using:
var player=GetPlayer();
var yourScore=player.GetVar("yourStorylineScoreVariable");
lmsAPI=parent.
lmsAPI.SetScore(yourScore,100,0);
Has anyone had any luck getting the lmsAPI.SetScore function to work with HTML5 output?
I'm manually forcing completion and score for my course using javascript. Both of those functions (setStatus and lmsAPI.SetScore) work perfectly and consistently in the swf output. However, only the completion status is passed in the HTML5 output. The score is not passed.
I should mention, the course is published to the AICC standard.
Hi Bradon,
I have the same issue, i found a way that works but i dont have it here i
can certainly look tonight at home. Cant remember if i ended up using it or
not but i can check then you can tell me if it worked for you.
Cheers
Ricardo M. Gomez
http://www.rmgtoonz.com.ar
Hi Ricardo,
I would greatly appreciate if you could let me know if/how you got that to work in your HTML5 output.
Thank you!
- Brandon
This discussion is closed. You can start a new discussion or contact Articulate Support.