From 22295f4a2cc181929df92c88102f2a39fcd12dab Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Tue, 25 Feb 2014 16:00:39 -0500 Subject: [PATCH] Display quiz questions as a form --- karmaworld/templates/quizzes/quiz.html | 96 ++++++++++++++++---------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/karmaworld/templates/quizzes/quiz.html b/karmaworld/templates/quizzes/quiz.html index 364c5b5..c691409 100644 --- a/karmaworld/templates/quizzes/quiz.html +++ b/karmaworld/templates/quizzes/quiz.html @@ -59,48 +59,68 @@ {% endif %} - {% for item in questions %} - -
-
- {% if 'MultipleChoiceQuestion' in item.0 %} - {% with question=item.1 %} -
-

{{ question.question_text }}

-
    - {% for choice in question.choices.all %} -
  • {{ choice.text }}
  • - {% endfor %} -
-
- {% endwith %} - {% endif %} - - {% if 'TrueFalseQuestion' in item.0 %} - {% with question=item.1 %} -
-

{{ question.text }}

-

True or False?

-
- {% endwith %} - {% endif %} - - {% if 'FlashCardQuestion' in item.0 %} - {% with question=item.1 %} -
-

{{ question.keyword_side }}

-

{{ question.definition_side }}

-
- {% endwith %} - {% endif %} - +
+ {% csrf_token %} + {% for item in questions %} +
+
+ {% if 'MultipleChoiceQuestion' in item.0 %} + {% with question=item.1 %} +
+

{{ question.question_text }}

+
    + {% for choice in question.choices.all %} +
  • +
  • + {% endfor %} +
+
+ {% endwith %} + {% endif %} + + {% if 'TrueFalseQuestion' in item.0 %} + {% with question=item.1 %} +
+

{{ question.text }}

+
  • +
  • +
  • +
  • +
    + {% endwith %} + {% endif %} + + {% if 'FlashCardQuestion' in item.0 %} + {% with question=item.1 %} +
    +

    {{ question.definition_side }}

    + + +
    + {% endwith %} + {% endif %}
    - +
    +
    + {% endfor %} +
    +
    +
    - - {% endfor %} +
    -- 2.25.1