• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Drag and drop interaction - one object to multiple locations

New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I have a variation on a drag-and-drop quiz with a bit of a twist and I'm having trouble finding a solution.

 

I have 4 drag objects on the left that have to be dragged 3 separate times each to 3 different cells in a table - the drag and drop objects have all been created and named in CP. Any idea on setting this up? Is it possible? 

Screen Shot 2022-10-17 at 3.12.19 PM.png

TOPICS
Advanced , Quizzing and LMS

Views

79

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Sorry but I don't understand what you mean exactly.

'3 separate times': can you elaborate? What needs to be done in ONE attempt?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

There are 4 objects on the left - each object has to be dragged 3 times to 3 different cells in the table. So the challenge is the fact that the object has to be repeatedly dropped to different targets for success.

 

Thanks for your reply.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I am trying to create an example project for you, because I am not sure that my intuition will lead to the wanted result.

You can use object actions, but it will be rather complicated at least if I understand you correctly: you want all the targets to be filled for an answer, which means that you could need to have 3 stacked drag sources to the left.

If you want to know more about all the possible actions in the D&D interaction, have a look at my blog post:

https://blog.lilybiri.com/drag-and-drop-actions

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

I may have understood not correctly what you want? Is it OK to drag the same drag source first to one target, to move it later on to another target? Or do you want to keep a dragged source in the first target as well? I was planning to check out the second situation, and it feels like StagPrime is thinking about the first situation.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I would use some variables and the Object Actions panel to work out the logic for each movement of the draggable.

Be sure to select that you can redrag the dropped source

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Thanks for your reply, I can't find any object properties that define object containment in order to take this approach.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

You'll need to select the drop target(s) a

Stagprime_0-1666040430476.png

 

nd look at the format section.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Thanks very much

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I'm sorry I will need a comprehensive explanation of the entire procedure. I appreciate you sharing this.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Lilybiri is right - I was thinking about the scenario of moving the same draggable to multiple locations.

I am thinking 12 variables - one for each drop target - let's assume a spreadsheet style naming convention.

a1, b1, c1, a2, b2... and so on.

Using the object actions panel - we assgn a 1 to the variable for that cell if the correct block is placed there and a 0 to the variable for that cell if the wrong one is placed there.

I set the accept condition as Replace so that if an object is dropped on top of another - only the most recent one is allowed to remain. One drag object per drop target at a time.

Rinse and repeat for all drop targets.

If the learner has done all correctly - then all the variables would have a value of 1.

You can then do a check for this upon submit.

 

Hopefully that is a little more clear.

 

Stagprime_0-1666096114319.pngStagprime_1-1666096130356.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Is there a 'contains' property in the Advanced actions where I can detect that one object is within another to trigger the value change?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

No, contain is only meant to find a sequence of numbers/characters within a string or a number. It cannot be used for what you mean here.

You didn't answer what I asked before: is it the scenario used by StagPrime or my scenarion that is wanted for? I wouldn't spend more time if I am heading the wrong way.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

LATEST

I have an example ready, using only D&D's functionality (types) and stacked drag sources. Works perfectly. No need for variables nor object actions. But it may not be what you really want.... 

Check it out under this link:

https://www.lilybiri.com/published/DMDTest/index.html

I used colors to make it clear which drag sources need to be in the targets. You have 3 attempts on this level.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Ok, thanx.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines