Use variable to place drag object into a target drop object
Oct 11, 2020
By
Robert Edgar
Hello all. I haven't figured this one out yet, so I'm appealing for Hero Help...
I have a drag and drop question early in my course. Eight drag objects, three targets. There are no correct or incorrect answers, but I assign a value of 1-3 to each drag object, depending on which of the three targets the learner drops it on.
The problem: at the end of the course, I want to reintroduce the slide, with the drag objects all in place, where the learner left them. How can I use the variable to place the object in the target where it was left?
I'm continuing to think and work on this, but just in case I can't figure this out, would love any suggestions. Thanks!
3 Replies
Ah, the other requirement is that the learner be able to rearrange the drag objects the second time around, and I will save the new placement values when the learner leaves that second screen. Thanks again.
OK, I solved it. In the second appearance of the screen, I placed copies of all eight draggable objects into each of the three targets. Then I defaulted them to Hidden when the screen's timeline starts:
Then I check each draggable item's variable to find which target it had been dragged into.
I then set the corresponding copy to Normal.
That way, each of the eight is represented in the target where it was left in the earlier screen.
Here is my test with just one of the draggable items, that I had dragged into the first target:
The item is still draggable, and my code updates the variable when the learner re-assesses the problem, so I can save it to the server document the answer (using SCORM 2004).
Cool.
Thanks for coming back to share your solution, Robert! It's helpful to have these types of questions and answers documented here in the community for others who are searching to do something similar.
This discussion is closed. You can start a new discussion or contact Articulate Support.