From 3fb9188be79556bd351e3659a341c9aeeb6b4926 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Sat, 14 Jun 2014 18:34:27 -0400 Subject: [PATCH] Shuffle answers in multiple choice questions --- karmaworld/apps/quizzes/create_quiz.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/karmaworld/apps/quizzes/create_quiz.py b/karmaworld/apps/quizzes/create_quiz.py index d7fd8e0..a61d236 100644 --- a/karmaworld/apps/quizzes/create_quiz.py +++ b/karmaworld/apps/quizzes/create_quiz.py @@ -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) -- 2.25.1