Can we manually set the score (Results.ScorePercent)

May 25, 2015

Hi,

We are working on a project where we need to set the score manually, but the javascript to set Results.ScorePercent is not working. Is this possible?

 

If so, can anyone help us get the js script for the same.

 

Thanks in advance :)

 

Thanks,

Srini

41 Replies
Srinivas Kumar K

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

 

Rick Gomez

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

 

Srinivas Kumar K

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

Rick Gomez

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

Brandon Beaver

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.

This discussion is closed. You can start a new discussion or contact Articulate Support.