Javascript compare variables in captivate
Hi,
I seem to be having a problem with comparing vars. I have two in captivate, one is called LMSpass and is set to 80 and the other grabs the score from my moodle LMS and populates LMSscore. Then on the quiz results page I compare one with the other and it doesn't work. I want the learner to go to the next page if they pass which is a certificate. Can anyone offer some help, it looks like it should work ok
This is the code on my test results page- both variables are populated.
window.cpAPIInterface.setVariableValue("LMSscore", SCORM_CallLMSGetValue("cmi.core.score.raw"));
if (LMSscore>=LMSpass) {
window.cpAPIInterface.next();
} else {
{alert("Hi you have failed the test. Please retake. If you need technical help please contact ....");
}
