KodyAnderson1 / CanvasQuizFileGenerator

0 stars 0 forks source link

Duplicate Questions when combining quizzes #10

Open KodyAnderson1 opened 1 year ago

KodyAnderson1 commented 1 year ago

Ex. Two quizzes have identical question, choices, and answer. If the answers differ, then both will appear because of how I am hashing the questions to compare and combine.

The hashes for each question object are getting compared, and the bug only happens when one quiz has a different answer selected, so the hashes don't match. Either change the hash only to hash the question or exclude the answer from the hash.

The above fix will likely cause issues where when there are two identical questions if one was answered incorrectly and the other one correctly, it will not keep the correctly answered version. Add a compare to check if answer is NO_ANSWER then pick the other

Multiple Choice and True/False are fixed.