Force one drop object per drop zone.

Aug 29, 2013

I have a dilemma with a project that I am working on.  I have multiple drop zones with multiple correct combinations of where the objects can be placed. I have most of the triggers figured out but where I am having trouble now is that it is allowing users to place multiple items in a single drop zone. This creates a way to get a correct answer without getting it really correct. I set this up as a true or false slide because I found the regular drag and drop setup too restricting for what I needed to do. 

Long story short, is there a way for me to force drop locations to only receive one drop object?

12 Replies
David Anderson

Kevin's suggestion should work if you're using the basic drag-drop functionality with Convert to Freeform.

If you're doing everything with your own triggers, you have some different options.

Depending on the interaction and how you want to score it, you might be able to use triggers to disable drop targets once an object is dropped on an acceptable drop target.

That would eliminate the target from accepting multiple targets.

Joel Shifflet

Well. I ran into a lot of problems trying to do this as a free form drag and drop, so I set it up as a true of false question. I have attached the file for you to look at. It might make more sense seeing it. On this question slide, you should place 6 quarter notes on the first 6 place holders and a half note on the last one.  I have managed to get this to score, but then if I drag one of the quarter notes and stack it on one of the other drop zones, I end up with 2 quarter notes in one drop zone and one zone left blank. Under these conditions, I can get the correct answer even though it's not correct. Any ideas that you have to remedy or simplify this sort of question would be very helpful. 

Mathieu Gingras

Hi Leslie, thank you for replying quickly!

Here are the details:

Hello,

I'm creating a drag and drop question which needs to be very precise and can only work in this way, however I can't find how to allow only one drop item in a drop zone. Here is the basic setup of my page:

Code:

DROP ITEM 1 DROP ZONE 1
DROP ZONE 2
DROP ITEM 2 DROP ZONE 3
DROP ZONE 4
DROP ITEM 3 DROP ZONE 5
DROP ZONE 6


My example, DROP ITEM 1 has 3 correct answers: DROP ZONE 2, DROP ZONE 5, DROP ZONE 6. If a user has already inserted DROP ITEM 1 in DROP ZONE 2, how can I be sure that DROP ZONE 2 can not be selected again? As it stands, Lectora is made to allow more than 1 drop item in a drop zone. I can't have this. Is there a script or anything that will allow me to work around this?

This is what I need it to do: If the user selects a drop zone which has already been selected, the drop item needs to return to its original position. That's it. I made 6 distinct images of each drop item (to give the possibility for the user to use 6 times the same drop item into every possible drop zone), so I actually have 18 drop items on the left, but the user only sees 3.

I will add my version of Lectora is v11.3.2

Thank you for your time.

Walt Hamilton

I would try creating an exact copy of the target that is just below it. Then when an object is dropped on the target, make it invisible. To the user it would look the same, but the now visible object would not accept dropped objects.

There are so many ways to make things disappear. The exact on you would use depends on a lot of factors involved in how the interaction is designed and how it functions. All those things would also come into play for setting up a way to return it to visibility if the user drags the original object off.

Attach what you've got, and maybe somebody will have a more specific solution.

SUSANNE AXELSEN

That did not solve the problem. You can stil drop more than one objects on the same drop object.

What I did instead was. I build the drag and drop In the same way as Mathieu describes using variables to determine if the dragobjects was placed in one of the right droptargets. 

Then I set the drag and drop option for the droptarget to tile. (Right clik on the droptarget and you will see the options, default is snap to center) Now it is easy for the user to see that there is already a dragobject in the droptarget. As the objects no longer snaps to the center on top off each other. 

This discussion is closed. You can start a new discussion or contact Articulate Support.