Gapfill - answer used more than once may create duplicate draggable answers

Gapfill - answer used more than once may create duplicate draggable answers

by Nancy Chan -
Number of replies: 7

Hi all,

I'm working on a drag and drop quiz in Moodle 3.8 with the Gapfill plugin. The quiz occasionally allows either one of two answers to be counted as correct, so I was really excited to see that Gapfill may solve the issue I was running into with the stock drag and drop question type (which didn't allow for more than one correct answer).

The issue is, when the same answer is used for another question that doesn't have the exact same answer option(s), a duplicate draggable answer is created.

My quiz example:

Question 1 [answer 1]

Question 2 [answer 2]

Question 3 [answer 1|answer 2]

From the above, I would assume only 2 draggable options would appear, one for answer 1 and one for answer 2.

Instead, I get 4 draggable answers:

dragdrop with duplicated answers

Interestingly, this only seems to affect the drag and drop option. If I change the display to dropdown, duplicate answers do not show up in the list of possible options:

dropdown of answer 1 and answer 2

I originally thought it was an issue with a multi word answer, but it appears to work correctly if the exact same combination of "correct answers" is used. For instance, if my quiz were

Question 1 [answer 1|answer 2]

Question 2 [answer 1|answer 2]

the correct number of draggable answers will show up - only one instance of answer 1 and one instance of answer 2.

Would love to know if there's a workaround (without giving up the dragdrop display) or if it's a bug. Thank you!
Average of ratings: Useful (1)
In reply to Nancy Chan

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm the author of the question type and I think this is a bug. I cannot think of any circumstances where it should display duplicate draggables. I have opened an issue with myself here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/65
I hope to look more closely over the christmas break.
In reply to Marcus Green

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I have looked more closely at this, it is a really interesting permutation. I have no timeframes but I will work on it. Thank you for asking this quesiton.
In reply to Marcus Green

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Nancy Chan -
Thank you for your attention to it! I noticed another duplication issue that may or may not be related to the same bug (in case it helps at all):

If I repeat one of the correct answers as a distractor, it can also come up as a duplicate draggable as well:
adding a correct answer as a distractor also
duplicated draggable
Average of ratings: Useful (1)
In reply to Nancy Chan

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Nancy, the most recent release of Gapfill (2.11) has code to fix this. See
https://github.com/marcusgreen/moodle-qtype_gapfill/blob/master/changelog.md
Would you confirm that it fixes it as intended.
In reply to Marcus Green

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Nancy Chan -
Hi Marcus, thank you! I'll try to get this updated in our test Moodle and let you know how it looks. Will return with my results.
Average of ratings: Useful (1)
In reply to Nancy Chan

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Nancy Chan -
Hi Marcus, so sorry for the delay! I was able to test out the update in our dev Moodle today, and everything looks great! For any quiz questions created prior to the fix, I just had to go to edit the question (no actual edit needed) and save to have the fix take effect.

Thank you so much for your help with this and the excellent plugin.
Average of ratings: Useful (1)
In reply to Nancy Chan

Re: Gapfill - answer used more than once may create duplicate draggable answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Excellent, your feedback is appreciated.