summaryrefslogtreecommitdiff
path: root/yaksh/templates/exam.html
diff options
context:
space:
mode:
authorankitjavalkar2017-10-05 16:27:51 +0530
committerankitjavalkar2017-10-05 16:27:51 +0530
commit2aa6ad38c89162eaef2e886947f9b7eabc4dfc4c (patch)
tree5518a1f47f550919ed8cf50d41b952ca597e6423 /yaksh/templates/exam.html
parent52bb77f0afeec8233702dd854e5a2aa81b89855d (diff)
downloadonline_test-2aa6ad38c89162eaef2e886947f9b7eabc4dfc4c.tar.gz
online_test-2aa6ad38c89162eaef2e886947f9b7eabc4dfc4c.tar.bz2
online_test-2aa6ad38c89162eaef2e886947f9b7eabc4dfc4c.zip
Allow user to quit the paper manually and revisit the paper if necessary
Diffstat (limited to 'yaksh/templates/exam.html')
-rw-r--r--yaksh/templates/exam.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index 45b85f0..4d211d2 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -18,7 +18,13 @@
<form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" class="pull-right">
{% csrf_token %}
<ul class="nav navbar-nav navbar">
- <li style="padding: 10px"><button class="btn btn-danger btn-sm" type="submit" name="quit">Quit Exam <span class="glyphicon glyphicon-off"></span></button></li>
+ <li style="padding: 10px"><button class="btn btn-danger btn-sm" type="submit" name="quit">
+ {% if paper.questions_unanswered.all %}
+ Quit Exam
+ {% else %}
+ Finish Exam
+ {% endif %}
+ <span class="glyphicon glyphicon-off"></span></button></li>
</ul>
</form>
<div class="time-div" id="time_left"></div>