diff options
author | Prabhu Ramachandran | 2017-01-16 21:56:23 +0530 |
---|---|---|
committer | GitHub | 2017-01-16 21:56:23 +0530 |
commit | d03826261adae349151e28d09ea2e2f85e168909 (patch) | |
tree | 4951c40ade87e2679b42b71ee8f392496c6fe880 /yaksh/templates/exam.html | |
parent | 0e3e0cdbf322df9b5c8b7da0301cebe71eadcbe9 (diff) | |
parent | 51ddfe4b5876c99077db9de130eec01a40787d59 (diff) | |
download | online_test-d03826261adae349151e28d09ea2e2f85e168909.tar.gz online_test-d03826261adae349151e28d09ea2e2f85e168909.tar.bz2 online_test-d03826261adae349151e28d09ea2e2f85e168909.zip |
Merge pull request #180 from prathamesh920/UI-modifications-phase-2
Ui modifications phase 2
Diffstat (limited to 'yaksh/templates/exam.html')
-rw-r--r-- | yaksh/templates/exam.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html new file mode 100644 index 0000000..19d760a --- /dev/null +++ b/yaksh/templates/exam.html @@ -0,0 +1,78 @@ +{% extends "base.html" %} +{% block css%} + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> +{% endblock %} +{% block nav %} + <nav class="navbar navbar-fixed-top navbar-inverse"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="#"> Yaksh </a> + </div> + <div class= "collapse navbar-collapse" id="navbar"> + <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> + </ul> + </form> + <div class="time-div" id="time_left"></div> + </div><!-- /.navbar --> + </div><!-- /.container --> + </nav><!-- /.navbar --> +{% endblock %} +{% block content %} +<div class="row"> + <div class="col-sm-3 col-md-2 sidebar"> + <p> Question Navigator </p> + <ul class="pagination pagination-sm"> + {% for qid in paper.questions.all %} + {% if qid in paper.questions_unanswered.all %} + {% if qid.id == question.id %} + <li class="active"><a style="width:25%" href="#"data-toggle="tooltip" + title="{{ qid.description|striptags }}" + onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/')">{{ forloop.counter }}</a></li> + {% else %} + <li><a style="width:25%" href="#" data-toggle="tooltip" title="{{ qid.description|striptags }}" + 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 %} + <li class="disabled"><a style="background-color:#B4B8BA; width:25%" href="#" data-toggle="tooltip" title="{{ qid.description }}" >{{ forloop.counter }}</a></li> + {% endif %} + {% endfor %} + </ul> + <p>Question(s) left: <b>{{ paper.questions_left }}</b></p> + </div> + <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> + <div class="row"> + <div class="col-md-8"> + {% block main %} + {% endblock %} + </div> + {% if question.type == 'code' %} + {% if error_message %} + <div class="col-md-4"> + {% for error in error_message %} + {% if error == "Correct answer" %} + <div class="panel panel-success"> + {% else %} + <div class="panel panel-danger"> + {% endif %} + <div class="panel-heading">Testcase No. {{ forloop.counter }}</div> + <div class="panel-body"><pre><code>{{ error }}</code></pre></div> + </div> + {% endfor %} + + </div> + {% endif %} + {% endif %} + </div> + </div> + </div> +</div> +{% endblock %} |