Learner enters number which registers score on LMS

Oct 19, 2023

Hi, All. I'd like a learner to enter a score (they received from an outside learning). Then, I'd like that number they typed to be the score that registers to the LMS (Workday Learning). I'm thinking this should be simple...but, I'm stuck. I was thinking of making the graded slide, correct answer = 0, and then whatever they type will add that many points therefore telling the course it passed (80+) or not (<80).

Any help is appreciated. Thanks.

8 Replies
Jose Tansengco

Hi Sandra, 

Happy to help! 

There isn't a built-in way to overwrite the quiz score that gets sent to the LMS since the calculation of this score is done internally. I've seen other members of the community alter this value using Javascript. While we don't officially support this method, here's a sample code if you'd like to check this solution out: 

Alternatively, you can just store the value of the score that the learner enters in a variable and sent this to the LMS. This will make this value available in the reporting section. This article explains this method in greater detail: 

Nedim Ramic

I created a Survey Question "How Many" slide so the learner can enter a numeric response. All survey questions can be reported to LMS. I created a custom number variable 'scoreEntered' equal to 0, and two triggers as follow: 

On the next slide, I referenced the "scoreEntered" variable and created "Execute JavaScript" trigger when the timeline starts on this slide, with the below code:

const LMS = parent;
let scoreEntered= GetPlayer().GetVar('scoreEntered');
LMS.SetScore(scoreEntered, 100, 0);

This way the typed value gets reported to LMS setting a score equal to the typed value. 
I am attaching my .story file so you can take a look of more in details. Ignore disabled triggers, and layer 'alert' if you don't need it. 

sandra muir

Wow!
Nedim, THANK YOU very much for sharing the file and taking the time to help!
At a quick glance, when comparing my file to yours, I notice I have followed some of the same steps, but I went wrong somewhere. What you shared has helped so much. I have tested my project in my LMS with your guidance and I am able to reach my deadline in time with your solution. Again, thank you!!!