From: Jan Szejko Date: Tue, 4 Jul 2017 10:46:29 +0000 (+0200) Subject: fix sciezki kopernika test form X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/885e6a6d823dda70ab555bc8a3ef50f826610a69 fix sciezki kopernika test form --- diff --git a/edumed/contact_forms.py b/edumed/contact_forms.py index 6a53fad..d0b38a2 100644 --- a/edumed/contact_forms.py +++ b/edumed/contact_forms.py @@ -1707,7 +1707,7 @@ class SciezkiKopernikaTestForm(ContactForm): 'comment': mark_safe(markdown.convert(cls.ANSWER_COMMENTS[i-1][chosen_idx])), 'answers': [(text, a_score == score, a_score == 2) for a_score, text in choices], } - question_count = len(fields) - 1 + question_count = len(fields) - 2 questions = [question_data(i) for i in xrange(1, question_count + 1)] points = sum(question['score'] for question in questions) return {'questions': questions, 'points': points/2., 'total': question_count}