summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 410b578..971ef77 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -34,7 +34,7 @@
Start time: {{ paper.start_time }} <br/>
End time : {{ paper.end_time }} <br/>
Percentage obtained: {{ paper.percent }}% <br/>
- {% if paper.passed == 0 %}
+ {% if paper.passed %}
Status : <b style="color: red;"> Failed </b><br/>
{% else %}
Status : <b style="color: green;"> Passed </b><br/>
@@ -55,7 +55,8 @@
<h5><u>Question:</u></h5> <strong>{{ question.description|safe }}</strong>
{% if question.type == "mcq" or question.type == "mcc" %}
<h5> <u>Choices:</u></h5>
- {% for testcase in question.get_test_cases %}
+ {% get_ordered_testcases question paper as testcases %}
+ {% for testcase in testcases %}
{% if testcase.correct %}
<br/>
<strong>{{ forloop.counter }}. {{ testcase.options|safe }}</strong>