Inform about zero selected answers in closed part of a question
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 7 Nov 2013 10:34:38 +0000 (11:34 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 15 Jan 2014 10:18:55 +0000 (11:18 +0100)
wtem/admin.py

index 99877fd..a23874e 100644 (file)
@@ -45,6 +45,8 @@ def get_open_answer(answers, exercise):
         for selected in answer['closed_part']:
             option = get_option(exercise['options'], selected)
             toret += '%s: %s\n' % (selected, option['text'])
+        else:
+            toret += u'<nie wybrano odpowiedzi>\n'
         toret += u'\nCzesc otwarta (%s):\n\n' % ' '.join(exercise['open_part'])
         toret += answer['open_part']