How to create a drag and drop, for two groups

How to create a drag and drop, for two groups

by Sudhir Singhal -
Number of replies: 12
I need to create a question of drag and drop for two categories, say textbook and digital contents, and some answer choices will be given for both the categories which need to dragged. The answer choices can be dropped in any sequence on the respective categories.

To accomplish this, I created a 'drag and drop into text' question type, and define two columns for it, as shown in the below image:

But the issue here is that, in this case it defines the answer in the particular order/ sequence.
I want that whatever relevant answers choices are there, related to Textbook or digital content, should come in that column and it can be in any sequence.

If I define the choices according to the groups, then it shows both the group choices in different colours. Then the user directly knows the answer choices for each category, as in this case sequence is not important.
Is there any way to make the colour of the choices, in both the groups, same?

Can anyone guide how to do that or is there any other similar question type which I can use for this purpose?

Average of ratings: -
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Matthias Giger -
Picture of Particularly helpful Moodlers
The gapfill question type be Marcus Green can do what you want. But it is an additional plugin:

https://moodle.org/plugins/qtype_gapfill

You would have to write your question like this:

Media
Textbooks Digtal Content
[1|2|3|4] [5|6|7|8]
[1|2|3|4] [5|6|7|8]
[1|2|3|4] [5|6|7|8]
[1|2|3|4] [5|6|7|8]

Instead of each number just write the term you want the students to drag.

In the settings you have to activitate "single use draggables" option and you get exactly what you want.



Average of ratings: Useful (2)
In reply to Matthias Giger

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
Thank you Matthias, it works as per my requirement.

After entering the choices, in feedback, for incorrect choices, it is showing multiple options [option1 or option 2  or option 3 or option 4], as we set during creating of the question, as shown below.


Can we disable this general feedback message for a particular question? 
It will show only cross and right symbol for the incorrect and correct choices but not the correct answer.
I am asking for this as in my answer choices, I need to write sentences and not just one word, so it will look very odd if it shows all the possible option for that box.

Also I am not sure why option 7, option 6 and option 8 are coming again in the bottom after submitting the response.
I am attaching my sample question file for your reference.


In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
Dear Marcus,

Kindly guide on the above.
How to disable the feedback of possible choices for such particular questions without effecting rest of the quiz?

Also, in the above question, the choice text will be different sentences instead of a single word and gap fill space will become too large in all position of that category.
Is it possible to text wrap the answer text in the choices if it exceeds certain limit so that it display properly on the screen without taking much spaces?
Kindly guide what can be the best way to represent such questions?

Thanks in advance
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Matthias Giger -
Picture of Particularly helpful Moodlers
For the options 7, 6, and 8 shown at the bottom of the question, try the "no duplicates" option.


In reply to Matthias Giger

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
Dear Matthias,

I already selected 'No Duplicates' as you can see in the attached question file, in my earlier message.
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Matthias Giger -
Picture of Particularly helpful Moodlers
It seems that when you include a space either at the beginning or at the end of an option (didn't test the details) you get the unwanted behaviour.

Instead of writing [option 5 | option 6 | ...] try writing [option 5|option 6| ... and see whether that solves the problem.
Average of ratings: Useful (1)
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Matthias Giger -
Picture of Particularly helpful Moodlers
To disable the feedback after each field you can try adding the following script to your questions:

<script>
    window.onload = function() {
        feedbackEntries = document.querySelectorAll(".aftergapfeedback")
        feedbackEntries.forEach(fE => fE.style.display = "none")
    }
</script>
This is by now means a perfect solution, but after the page has loaded (which might take a bit of time), it will hide the feedback.

Average of ratings: Useful (1)
In reply to Matthias Giger

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
Thank you Matthias!
This is really helpful and easily solve the issue for me.

Just one last thing, is it possible to select the grade/ maximum marks in the question?
By default it is taking according to the number of choices to be selected.
For the time being, I found a temporary solution to this.
After adding it to the quiz, I manually changes the maximum mark for the question.
Is there any other way possible?
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Matthias Giger -
Picture of Particularly helpful Moodlers
As far as I know this is not possible. You have to set the total numbers of points the way you have described it.
In reply to Matthias Giger

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
I have some more query about the this wonderful question type.
In the choice text options, is it possible to text wrap the answer text, if it exceeds certain limit?
When the sentence is big, it still shows it one row only and brings scrolling.
And gap fill space also become too large in all position of that category.

Right now I am creating a table and for different categories and they are coming one after the other, row-vise.
So the user knows how many options are there in each category.
Is it possible to define to insert the choice options without displaying the number of possible options and it will increase the space as new choices are filled.

Or is there any other question type available for such functionality?
In reply to Sudhir Singhal

Re: How to create a drag and drop, for two groups

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
could you add a screen shot or the text of what you are attempting to do?
Average of ratings: Useful (1)
In reply to Marcus Green

Re: How to create a drag and drop, for two groups

by Sudhir Singhal -
There are questions in which two main categories or topics are there and users need to select the correct choices, from the given options.
The problem is when they are sentences instead of just few words,
Suppose two categories are - Traditional teaching and Technology base teaching.
And the options are:
- Limited access to educational materials and information
- Uniform content for all students
- Enables a more personalized kind of learning for students
- More available channels & tools for communication & collaboration
- Same content for all the students

I can not upload or paste the images here. When I click on Advanced, it shows the following message:
Sorry, you have been blocked You are unable to access moodle.org
Cloudflare Ray ID: 839a717cc9015471

This happens for the first time, kindly check and guide me.