now list of toppers can be seen only if atleast one user has taken the quiz.
authornishanth
Wed, 30 Jun 2010 10:24:15 +0530
changeset 70 911a24ae80d6
parent 69 70936df01485
child 71 1279f0094687
now list of toppers can be seen only if atleast one user has taken the quiz.
templates/list_toppers.html
--- a/templates/list_toppers.html	Tue Jun 29 19:43:58 2010 +0530
+++ b/templates/list_toppers.html	Wed Jun 30 10:24:15 2010 +0530
@@ -1,5 +1,6 @@
 {% extends 'base.html' %}
 {% block content %}
+{% if sorted_quizzes %}
 List of toppers for {{quiz_name}} of {{event.title}}<br />
 <br />
 <table cellspacing="5" cellpadding="3">
@@ -14,5 +15,8 @@
 			<td>{{quiz.user.get_profile.profession}}</td>
 			<td>{{quiz.score}}</td>
 	</tr>
-	{% endfor %}
+        {% endfor %}
+{% else %}
+No user has taken {{quiz_name}} yet.
+{% endif %}
 {% endblock %}