Heyo, popping in to inform you that I found a… logic error? I suppose.
I was trying to adapt Hubbit’s wonderful Review Summary script to have a special section for passed items that I used Double Check’s undo feature on. To this end I needed to listen for the didUnanswerQuestion event Double Check dispatches. However, I found that this event was being fired for every single item I reviewed, regardless of if I used undo.
It turns out that next_item calling set_answer_state with reset:true fires the event because there’s no check in that block to determine if the reset is because of undo or because we are going to the next item. I tried to see if I could fix this without adding any new variables, but sadly state is always 'second_submit' and final_submit is undefined for both these cases. So I added another property to the object passed to set_answer_state in next_item – e.g. going_next: true – and then a simple check in front of the dispatch: if (!results.going_next) ...
And that’s that… Happy Holidays!