event/views.py
changeset 81 848c009b8a60
parent 78 2264a51fc9cf
child 83 76971eed55c6
--- a/event/views.py	Thu Jul 01 16:13:01 2010 +0530
+++ b/event/views.py	Thu Jul 01 16:20:17 2010 +0530
@@ -7,7 +7,7 @@
 from offline.event.models import Event
 from offline.event.forms import EventCreateForm, OpenQuizForm
 
-from offline.quiz.models import Quiz, QuestionBank
+from offline.quiz.models import Quiz, QuestionBank, TOPIC_CHOICES
 from offline.quiz.utils import correct_quiz
 
 num2name = {"11" : "Day 1 Quiz 1",
@@ -203,5 +203,9 @@
     """
 
     questions = QuestionBank.objects.all()
+    topic_num2name = dict(TOPIC_CHOICES)
+
+    for question in questions:
+        question.topic_name = topic_num2name[question.topic]
     return render_to_response("list_questions.html", {"questions":questions})