Explore the community Forums Lectora Lectora Questions & Answers Trigger Lectora event from JavaScript Reply To: Trigger Lectora event from JavaScript

#398452 Score: 0
Profile photo of Stan Miller
Stan Miller
LUC16 Attendee
wise owl
curious george
friend finder
LUC17 Attendee
38 pts

Yes, it’s SCORM 1.2.

If it’s a SCORM 1.2 package, you need to trigger the cmi.core.lesson_status event, which you can do manually via Javascript directly,

How did you get a course to publish by setting the completion in JavaScript? When I try that, Lectora says, “Assignable Unit … is missing a scored Test or a Modify Variable action for either AICC_Lesson_Status or AICC_Score.” I suppose I could add a test that nobody sees and set the score on that, but that’s pretty hacky.

and creating some event/action trigger to fire which then sets the variable = “completed”

That’s the rub. As noted, I don’t want the user to have to do anything else; they’ve already submitted the survey, so seeing a button that says “Submit Survey” would be confusing, and as noted, we know from experience that some users will simply close the course window. I’m looking to set completion status when they submit the survey. I can already detect when they submit the survey, and need to be able to fire an action from that.