summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormaheshgudi2017-02-03 14:40:50 +0530
committermaheshgudi2017-02-03 18:18:52 +0530
commit1d5cd5253b125eb6406dd67e9f267c208658bcfc (patch)
tree5421d3bc26c160447434b07f51786fb4fe76dbf8 /yaksh/templates
parentb277f9191bf8720533901e58db36851675b8f430 (diff)
downloadonline_test-1d5cd5253b125eb6406dd67e9f267c208658bcfc.tar.gz
online_test-1d5cd5253b125eb6406dd67e9f267c208658bcfc.tar.bz2
online_test-1d5cd5253b125eb6406dd67e9f267c208658bcfc.zip
renamed quiz model attribute from can_skip_questions to allow_skip
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/exam.html12
-rw-r--r--yaksh/templates/yaksh/question.html4
2 files changed, 9 insertions, 7 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index 00633a3..dfcaf2d 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -31,8 +31,8 @@
<p> Question Navigator </p>
<ul class="pagination pagination-sm">
{% for qid in paper.questions.all %}
- {%if paper.question_paper.quiz.can_skip_questions%}
- {% if qid in paper.questions_unanswered.all %}
+ {%if paper.question_paper.quiz.allow_skip %}
+ {% if qid in paper.get_questions_unanswered %}
{% if qid.id == question.id %}
<li class="active"><a style="width:25%" href="#"data-toggle="tooltip"
title="{{ qid.description|striptags }}"
@@ -42,11 +42,15 @@
onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/')">{{ forloop.counter }}</a></li>
{% endif %}
{% endif %}
- {% if qid in paper.questions_answered.all %}
+ {% if qid in paper.get_questions_answered %}
<li class="disabled"><a style="background-color:#B4B8BA; width:25%" href="#" data-toggle="tooltip" title="{{ qid.description }}" >{{ forloop.counter }}</a></li>
{% endif %}
{% else %}
- <li><a style="width:25%" href="#" data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a></li>
+ {% if qid.id == question.id %}
+ <li class="active"><a style="width:25%" data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a></li>
+ {% else %}
+ <li class="disabled"><a style="width:25%" data-toggle="tooltip" title="{{ qid.description|striptags }}">{{ forloop.counter }}</a></li>
+ {% endif %}
{% endif %}
{% endfor %}
</ul>
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 8fea8b3..6218b18 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -199,8 +199,7 @@ function call_skip(url)
{% else %}
<button class="btn btn-primary" type="submit" name="check" id="check" onClick="submitCode();">Check Answer <span class="glyphicon glyphicon-cog"></span></button>&nbsp;&nbsp;
{% endif %}
- {% if paper.question_paper.quiz.can_skip_questions %}
- {% if paper.unanswered.all|length != 1 %}
+ {% if paper.question_paper.quiz.allow_skip and not paper.get_questions_unanswered|length_is:"1" %}
<button class="btn btn-primary" onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/')" name="skip" id="skip">Attempt Later <span class="glyphicon glyphicon-arrow-right"></span></button>
</div>
</div>
@@ -208,7 +207,6 @@ function call_skip(url)
</form>
{% endif %}
- {% endif %}
<!-- Modal -->
<div class="modal fade " id="upload_alert" >