Shuffle answers in multiple choice questions
[oweals/karmaworld.git] / karmaworld / apps / quizzes / create_quiz.py
index d7fd8e0941b81f3f48f565c2fb3643efe190b4af..a61d236cf1340b77c82e24ef2ab339b70dab041e 100644 (file)
@@ -98,6 +98,8 @@ def _create_keyword_multiple_choice(keyword, keywords):
 
     question_text = u'Pick the keyword to match "{d}"'.format(d=keyword.definition)
 
+    random.shuffle(choices)
+
     return MultipleChoiceQuestion(question_text, choices)
 
 
@@ -111,6 +113,8 @@ def _create_definition_multiple_choice(keyword, keywords):
 
     question_text = u'Pick the definition to match "{w}"'.format(w=keyword.word)
 
+    random.shuffle(choices)
+
     return MultipleChoiceQuestion(question_text, choices)