Forum Discussion
lmsAPI Functionality in HTML5 Output
So, I believe the way that it works is that as soon as you call the Submit Results trigger, it is going to set Passed/Failed and send a score to the LMS based on the actual results of your quiz.
I would put an alert into each portion of your if/else statement to see which one it's calling. If it's calling the "Failed" one, but you are still getting a "Passed" in the LMS, it's most likely because the Submit Results trigger is overriding your code (or something to that effect).
You *might* be able to swap the order of your triggers so that your JS trigger comes before the Submit Results trigger, but I don't know that it would help or not. You might not be able to accomplish exactly what you are going for without digging further into the Storyline engine code to understand exactly what's happening.
I suspected that may be the case.
Do you know if there's a way to push variables to the LMS via Javascript without the need to track using quiz results?