Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection of duplicate questions should consider the answer choices, not just the question stem. #38

Open
MaduroMF opened this issue Jan 4, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@MaduroMF
Copy link

MaduroMF commented Jan 4, 2021

If two or more multiple choice questions have the same stem (e.g. 'Which of the following is the largest number?') the script raises a 'Duplicate question' error and halts generation of the QTI files. This makes sense if the answer choices are also the same, however if the same question stem is repeated by followed by a different set of answer choices, it should not be flagged as a Duplicate question. Can the program be modified to permit the same stem but with different answer choices?

@MaduroMF
Copy link
Author

MaduroMF commented Jan 4, 2021

A workaround is to append this html snippet to each question stem:

<font style="display:none">uniquetext</font>

... where uniquetext is e.g. a version number that would not be displayed but which prevents text2qti from detecting an identical stem (since they are now unique). In Canvas the hidden text does not appear when the quiz is being taken. It does appear in the html editor within Canvas Quizzes.

@gpoore
Copy link
Owner

gpoore commented Jan 5, 2021

The duplicate check could be easily expanded to consider both the question and the answers. For a lot of what I do, I need the check to consider just the question, but I can see how that is a limitation in some cases. I can add a new new option, maybe something like --allow-identical-questions.

@gpoore gpoore added the enhancement New feature or request label Jan 5, 2021
@MaduroMF
Copy link
Author

MaduroMF commented Jan 5, 2021

A switch/option would be a good way to solve the problem. (Indeed, before posting here I first looked to see if there was a way to disable the check or to allow duplicate question stems.)

@0verdoes
Copy link

I would also greet this feature. Note that if 2 questions only differ with 1 space they are than considered different questions.
So when i ran into the duplicate question error. I just add different amount of spaces to the instances of the same question. And than in Canvas there is absolutely no difference.

@ururk
Copy link

ururk commented Aug 26, 2021

--allow-identical-questions Would be great - we are generating hundreds of MC questions (for instance) that are all a little bit different, but the titles remain the same. At the moment I'm appending <font... to get around this limitation.

Another thought would be to expand how duplicates are looked for. One way I do duplicate checking in my own code for other things is string concatenation - I come up with a repeatable pattern - concatenate the variables, and store it in an array/list to see if I encounter it again. There may be other performance enhancements (hash the string), but generally I've found it to be reliable enough.

@benjamin-j-cooper
Copy link

I am currently working on a project for a software engineering course and I am utilizing text2qti to format the output of my quiz question generating system in .qti format. I ran into this issue because I am generating x iterations of each question, and then putting all the the iterations for each question into groups. The question is the same, the possible responses are different , and the script raises the "duplicate question" error. I am also appending "uniquetext" to get around this limitation. Adding my two cents that --allow-identical-questions would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants