Help with Variables and JavaScript - reporting custom scores to LMS
Hello. Here is what our goal is:
and I have attached the file which includes some JavaScript on the final slide - which doesn't work in the LMS.
To report custom scores to an LMS - Cornerstone.
Here is how I've set up the attached SL file:
There are 3 questions. Each question is worth 5 points. The learner must answer the question correctly before moving to the next question. Each time a learner answers incorrectly (and lands on the Try Again layer) 1 point is subtracted from the total possible of 15 (3 slides x 5 points each).
a. How do I turn the learner's score into a percentage?
b. What is the JavaScript code to report this learner's score to the LMS - Cornerstone.
Note: One person recommended not adding a Results slide, so there is no Results slide in the attached file.
I know it's possible - just need some help in figuring it out or fixing the attached file. Any assistance would be appreciated. Thanks.