From: Charles Connell Date: Sat, 14 Jun 2014 22:34:27 +0000 (-0400) Subject: Shuffle answers in multiple choice questions X-Git-Tag: release-20150131~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3fb9188be79556bd351e3659a341c9aeeb6b4926;p=oweals%2Fkarmaworld.git Shuffle answers in multiple choice questions --- 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)