0

Send xAPI only once even if the interaction happens twice

447 0 2
Posted   5 months ago

Let's say I have a toggle that sends an xAPI statement when clicked. How do I prevent another xAPI statement from being sent if the learner changes the toggle? Technically, they could toggle back and forth sending a statement each time and my LRS admin would kill me--he would have to weed through the incorrect ones.  

 

Comments

( 0 )

Answers  ( 2 )

1
avatar Paul Schneider   |    
Posted   5 months ago
  ●   Edited   5 months ago

Great question. In the case of a toggle, we send an automatic statement that it was interacted with and consumed when done. You can't turn off this one unless under Publishing Profiles you turn off Behavior -> xAPI Include -> Component Statements. If you turn this off then all form controls and components (e.g., Tabs and Sliders) won't fire statements. If one you will get multiple statements each time they interact with it. 

Another route of "tracking" is to also (or instead of) tie a variable to the toggle value. Then use the Custom xAPI statement action and have that fire and include the variable value. 

The trigger to fire that action can be tied to a button or some other item. E.g., Submit answer button. that way the user can toggle it on off or whatever and you only submit the statement based on when they are "done". 

You could also have multiple toggles on a page and then the "submit" would trigger multiple xAPI statements and perhaps advance to the next page or do something that would visually let the learner know it is done.

 

 

Comments

( 0 )
0
avatar julie_jones   |    
Posted   5 months ago

Amazing! Thank you!

 

Comments

( 0 )