summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormahesh2018-01-16 01:13:49 +0530
committermaheshgudi2018-03-16 15:15:50 +0530
commit98775e565c99fd6486fb5908a5ca9be491db9b1c (patch)
treea9ba8019171ee6b2a030c55fc82da4d7527066ac /yaksh/templates
parent6aeda97b5f37fc7ce50b7fd1f1e0465c42ba0969 (diff)
downloadonline_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.tar.gz
online_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.tar.bz2
online_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.zip
Add test case order in view_answerpaper
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>