diff options
Diffstat (limited to 'yaksh/templates/exam.html')
-rw-r--r-- | yaksh/templates/exam.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 101f3f3..dfcaf2d 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -31,7 +31,8 @@ <p> Question Navigator </p> <ul class="pagination pagination-sm"> {% for qid in paper.questions.all %} - {% 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 }}" @@ -41,9 +42,16 @@ 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 %} + {% 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> <p>Question(s) left: <b>{{ paper.questions_left }}</b></p> |