drag and drop question
January 18, 2018 12:00 AM
Hi all,
i tried to build a drag and drop question. Until now it works very fine.
but nevertheless i have an question again :-)
following case:
both drop fields are correct, but i can only define one Feedbackaction.
Maybe someone has an good idea:-)
i uploaded some pics to show.



Discussion (27)
Building off what Math said and some great timing, I put together a sample that I think matches what you're looking for. Each time a drop item is released in a drop zone, a series of action groups are triggered:
- Set a custom variable based on whether a drop is correct.
- Display a message for each correctly dropped item
- Set the contents of a status indicator for each correct option
The setting of the custom variables is based on the variable values for the question (i.e. Set BMW correct IF question_0001 contains Car1-BMW or Car2-BMW, etc).
One minor issue I noted is that the action to start everything in motion has to be on each choice text AND has to have a short delay because it looks like the action group is run before the variable for the question is updated.
Hi Tim, thx
i think it looks a little bit more complicated :-)
i uploaded i plan of my problem.
i hope you understand my idea

Allthough im not quite sure of your issue...im sure a solution can be made with the help of variables.
2 options to solve this without diving deep into it i see
- Use a variable to define which group ( feedback group ) to show. So you have several groups with different feedback in it... and with a variable you decide which group you show when.
- Use a variable to change the contents of a feedback textfield. With this option you have 1 feedbackgroup. And based upon a variable you change the content of the textfield, thus changing the feedback.
Kind regards,
Math
Hi Marcel,
do you know about action groups? You can create a group with [Strg] + [5] or from the "Einfügen" tab. Add all the actions you need to the group and use the one Feedback action to "Run action group", probably "Aktionsgruppe ausführen". Select the group you've created as the target.
i know action groups. And i made an action group for feedback, but i dont know how i can manage this like i have drawn in my plan. So when the user takes the first drag-file (car) and drop it to BMW then the BMW field is marked. But this should als happen when the second car drag file is taken to this field. How can i define this in one action group?
undefined
Nice Jason. To fix it to get none-direct feedback. Add a 'Check Answers' button and add the last 2 actions from the 'Set variables'-actiongroup on that button. Set checkmarks and Display messages. Then you get only feedback on a click. Puzzling a bit to fix the delay ;-)
Done. Set the action calling the actiongroup in the feedback-call. That way no need for setting it on every option and the delay is gone too.
hey :-) Thx, great! i will try it tomorrow.
Have a nice evening
greetings Marcel
Great Job Guys!
So is the following also possible?
the pupils have to drag and drop the words to the right parts of the car. For example: the wheel to wheel in the picture and no matter which wheel.
I think its no so easy because of he positions of the drop fields in the picture, The dropfields should be in the picture, so i need more questions to build, what do you think? if there where only one right possibility it would be easy to configurate but there are more then one.
And it would also be cool when the parts in the picture are highlighted when they are droped right!
i hope you understand what i mean and you have an Idea :-)
hi Tim, yes, good idea but the dropezones should also be highlighted when they are correct.
I want a drag and drop question with six drag items (wheel, wheel, door, door, light, light) but only four dropzones. The difficulty is to define that for example both wheels are right in the left wheel dropzone and that the left dropzone will be highlighted when one of the wheels is dragged to there.
I know it would be easier to make frontwheel and backwheel :-)
undefined
or maybe is there are possibility without question object?
hey math, cool that would be fine:-)
i am not really good in working with variables...
another example could be:
What is green? Put the colour to to the Objects, which are green.
On the left side you have "one" green field and on the right side there are different objects, on which you have to drag the green field. And if the green field is droped correctly the object will be highlighed.
Until now i have made a lot of easy drag and drop questions in lectora, but for this kind i have no idea.
thx :-)
It is Photoshop, but you can certainly use any graphics software for something as simple as this. Probably SnagIt can do it, if you're on Inspire, MS Paint should do it also. There's freeware available as well like Gimp.
Both possible...photoshop or use separate pngs and layer them properly in Lectora. If you want to highlight elements its always good to have separate parts.
Although it aint 100% correct yet, this will show you a possible approach. Doing a series of checks when processing the question will end up in actiongroups. In those ag's you can add whatever you want. Some proper doublechecking on the conditions is needed, because i do notice some errors.
Wouldn't it be easier to edit the image to include the dropzones? What are you trying to achieve by using separate questions? You cannot drop an item onto a dropzone of a different question.

hey Jason, thx, i will try now :-) and give you feedback.
Tim mad nice dropzones to my car picture, is there an option in lectora to do this or is it adobe photoshop work. Maybe he can anwer that...looks nice.
Basically it is possible when you use a question with no correct choices. Trigger a actiongroup that checks the variables when processing the question and the outcome there defines what happens. Later today i probably make a sample...
When you're creating a drag and drop question, you can create more drop items than drop zones and select more than one correct answer for each drop zone. From there, using either Math's or my sample, you can create the same highlighting/border/alert that you're looking for.
In the question's properties, choose an image then set the X/Y coordinates and width/height over that image. One caveat is that you'll need some white space around the image depending on where you want the drop zones to be.
thx guys,
i tried it now with a room. I want that the user have to drag the categories to the correct room segment. And when the part is assigned correctly there should appear a room colour. I took your file to build and enhance it but there is somewhere a mistake or anything that i have overseen.
here is my projectfile
greetings marcel
i think W0-I, W0-I (both green walls) and W2-I, W2-I (both red grounds) work
only W1-I and W1-I dont work!
undefined
ImmediateDNDFeedback-2.zip is the projectfile

hi Math, maybe can you help me? What i have to do that my Room example will work? i like this with the magic walls :-) greetings Marcel
i think i found the mistake, it seems to be a timing mistake...or i dont know....i changed the Time delay and now it seems to work :-) i hope i am right

For the car drag and drop, this one fully works. Any combination you choose will show how many of your choices were correct on clicking the check-button...
You should avoid a setup that needs extra delays to get things working. In the end when its run on a LMS it will behave different again, getting new issues. I made some samples in this thread that dont use delays. Use those as basis.
Hey guys, thanks again for your help and time, it worked perfect:-)
exist anywhere a good guide for using variables? i want to learn it.
greetings Marcel
For Lectora, look around in the samples and try try try. For the basics of variables you can find javascript or other tutorials that show that. If you can handle variables in Javascript, Flash Actionscript or whatever language its easy to get used to in Lectora. Biggest caveat to remember...a Lectora variable is always a string.
Discussions have been disabled for this post