next_question_id = question_list[0]
question = Question.objects.get(id=next_question_id)
+ question_type = next_question.__class__.__name__
return render_to_response('question.html',
{'quiz': quiz,
'question': question,
+ 'question_type': question_type,
'previous': previous,
'show_advert': show_advert,
},
next_question = Question.objects.get(id=question_ID)
+ question_type = next_question.__class__.__name__
return render_to_response('question.html',
{'quiz': quiz,
'question': next_question,
+ 'question_type': question_type,
'previous': previous,
'show_advert': show_advert,
},
{% if previous %}
-
- <p class="muted"><small>The previous question:</small></p>
+
+ <p class="muted"><small>The previous question:</small></p>
<p>{{ previous.previous_question }}</p>
-
+
{% ifequal previous.previous_outcome 'correct' %}
<div class="alert alert-success">
{% else %}
<p><small>Your answer was </small><em>{{ previous.previous_answer }}</em><small> which is </small><strong>{{ previous.previous_outcome }}</strong></p>
</div>
-
+
{% correct_answer previous %}
<p><strong>Explanation:</strong></p>
<div class="well " style="background-color: #fcf8e3;">
<p>{{ previous.previous_question.explanation }}</p>
</div>
-
-
+
+
<hr>
-
-{% endif %}<br />
+
+{% endif %}
+
+<br />
{% if question %}
<p><small class="muted">Question category:</small> <strong>{{ question.category }}</strong></p>
<p class="lead">{{ question.content }}</p>
{% answers_for_question question quiz %}
-
+
{% endif %}
-
+
<hr>
-
+
</div>