Picture of Matt Leathes
Re: Pass variable (scorm or not) to LMS on page completion
by Matt Leathes - Monday, 4 November 2019, 10:36 AM
 

Without being able to see the code it's hard to be sure but my best guess is that you've placed it inside some code that's run repeatedly, leading to repeated addition of the event listener.

A better place to put it might be in adapt-contrib-pageLevelProgress.js in the function setUpEventListeners. If you do put it there you can use the Backbone listenTo function instead i.e.

this.listenTo(Adapt.contentObjects, 'change:_isComplete', function (contentObject) {
  console.log('page "' + contentObject.get('_id') + ' - ' + contentObject.get('title') + '" completed!');
  // send data to LMS about this event
});
Picture of Rob Mausser
Re: Pass variable (scorm or not) to LMS on page completion
by Rob Mausser - Monday, 11 November 2019, 10:25 PM
 

This worked thank you

Picture of Matt Leathes
Re: Pass variable (scorm or not) to LMS on page completion
by Matt Leathes - Tuesday, 12 November 2019, 6:04 PM
 

No problem!