Drag - drop - change to drop correct/incorrect state only on last attempt

Hi,
I’m trying to use some Drop correct and incorrect states for the correction of a drag and drop exercise.
I like the fact that it update to these states automatically on submit.

But, my issue is that it already updates the states to reflect “correct” or “incorrect” on the submit of the first attempt. Is there a way to restrict this automatic state update to the final attempt?

Thanks a lot,
Michael

Hi Michael,

I’m not sure if it works for your case, but you can try as follows:

  1. Add custom states (not built-in states for correct/incorrect)
  2. Use Change Object State action and Attempt condition to change objects to these states.

Regards

Hi,
yes, this will work - just that I need to add multiple items to the onCorrect or onIncorrect results.
Not a problem, I was just hoping there was a faster way.
Thanks,
Michael

Hi,
In fact - what is the best way to know if my drag object is correct?
do I have to use a variable which checks when the drop accepts? or is there a way I can read it directly from the drag object - I tried to use this but it does not seem to work:
image
With Correct being my custom state and Drop correct exists but its format is the same as normal.
Any tips on the best way to do this would be great.
I can do it with variables but it seems overcomplicated.
Thanks,
Michael

Hi Michael,

Unfortunately, it’s not possible to know if a drag source is correct or not based on its state.
You must use a variable which checks when the drag source is accepted.
We’ll try to improve in the future to make it more simple.

However, you can use JavaScript in On Incorrect event as in this attached sample to update the drag sources:
drag-states.approj (260 KB)

Regards

Hi,
thanks, this works and makes it much easier.
Thanks,
Michael