PrairieLearn icon indicating copy to clipboard operation
PrairieLearn copied to clipboard

Add check for duplicate answers to MC questions

Open trombonekenny opened this issue 7 years ago • 8 comments

In tests? Or on sync? Or both?

trombonekenny avatar Aug 30 '18 16:08 trombonekenny

On sync is probably the best time to do it. Catch it early.

mwest1066 avatar Aug 30 '18 16:08 mwest1066

This was being worked on at HackIL, hopefully we get a PR soon!

nwalters512 avatar Feb 26 '19 20:02 nwalters512

Cool, I look forward to seeing it!

trombonekenny avatar Feb 26 '19 20:02 trombonekenny

One of the things I realized from reviewing a PHYS 10x question last week is that sometimes auto-generated distractors can repeat. I wonder if there's something we could do at the question generation level to inspect for this and take action (invalidate and make a new variant?)

That's not the same as duplicated manual answers, but shows up the same to the student.

trombonekenny avatar Feb 26 '19 20:02 trombonekenny

Agree that would be nice, but it would be difficult to differentiate between "the question is fundamentally broken" and "just this variant is bad, we can regenerate". I'd prefer to just encourage people to a) be aware of that when and b) use "test 100 times" a lot to check for edge cases.

nwalters512 avatar Feb 26 '19 20:02 nwalters512

I actually think the right place to do this is in prepare(), so it will be caught very early.

mwest1066 avatar Feb 21 '20 14:02 mwest1066

I was thinking of taking a stab at this issue since it hits my students often in some ultra-randomized "sig fig" type questions where they have to choose the right answer with different errors.

IMHO, I think an error should be thrown if there are multiple choice options whose string representations are exactly identical. That way, students will see a regenerate variant button right away.

Does that make sense as the expected outcome?

138740089-88174492-226d-4c42-a8b7-d71a7c761f0a

firasm avatar Jul 26 '22 04:07 firasm

IMHO, I think an error should be thrown if there are multiple choice options whose string representations are exactly identical. That way, students will see a regenerate variant button right away.

Yes, this sounds correct to me. I think my original comment was wrong and it's best to catch this in generate() and throw an error if any duplicates are found in the list of answers. Allowing students to regenerate a broken variant will often fix the problem.

mwest1066 avatar Jul 26 '22 22:07 mwest1066

it's best to catch this in generate() and throw an error if any duplicates are found in the list of answers.

As commented on the PR for this, elements don't call the generate() function, so I think catching duplicates in prepare() (as is done currently in the PR) is the way to go.

eliotwrobson avatar Dec 15 '22 20:12 eliotwrobson