summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/exam.html4
-rw-r--r--yaksh/templates/user.html2
-rw-r--r--yaksh/templates/yaksh/course_detail.html6
-rw-r--r--yaksh/templates/yaksh/question.html37
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html2
-rw-r--r--yaksh/templates/yaksh/user_data.html4
6 files changed, 40 insertions, 15 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html
index b497cc0..02ff70a 100644
--- a/yaksh/templates/exam.html
+++ b/yaksh/templates/exam.html
@@ -52,7 +52,9 @@
{% endif %}
{% endif %}
{% 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>
+ <li><a style="background-color:#B4B8BA; width:25%" href="#" data-toggle="tooltip"
+ onclick="call_skip('{{ URL_ROOT }}/exam/{{ question.id }}/skip/{{ qid.id }}/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/')"
+ title="{{ qid.description }}">{{ forloop.counter }}</a></li>
{% endif %}
{% else %}
{% if qid.id == question.id %}
diff --git a/yaksh/templates/user.html b/yaksh/templates/user.html
index 0d1f980..b068fae 100644
--- a/yaksh/templates/user.html
+++ b/yaksh/templates/user.html
@@ -16,7 +16,7 @@
<div class= "collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li>
- <li><a style='cursor:pointer' id='logout' onClick='location.replace("{{URL_ROOT}}/exam/complete/");'> <span class="glyphicon glyphicon-log-out">Logout </span></a></li>
+ <li><a style='cursor:pointer' id='logout' onClick='location.replace("{{URL_ROOT}}/exam/logout/");'> <span class="glyphicon glyphicon-log-out">Logout </span></a></li>
</ul>
</div><!-- /.navbar -->
</div><!-- /.container -->
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index dc85080..4b7efaf 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -32,6 +32,7 @@
<div id="enroll-all">
<table class="table table-striped">
<th></th>
+ <th></th>
<th>Full Name</th>
<th>Email</th>
<th>Roll Number</th>
@@ -43,6 +44,7 @@
{% for request in course.get_requests %}
<tr>
<td><input type="checkbox" name="check" value="{{ request.id }}"></td>
+ <td>{{ forloop.counter }}.</td>
<td>{{request.get_full_name}}</td>
<td> {{request.email}}</td>
<td> {{request.profile.roll_number}}</td>
@@ -72,6 +74,7 @@
<div id="reject">
<table class="table table-striped">
<th></th>
+ <th></th>
<th>Full Name</th>
<th>Email</th>
<th>Roll Number</th>
@@ -83,6 +86,7 @@
{% csrf_token %}
<tr>
<td><input type="checkbox" name="check" value="{{ enrolled.id }}"></td>
+ <td>{{ forloop.counter }}.</td>
<td> {{ enrolled.get_full_name|title }} </td>
<td> {{enrolled.email}}</td>
<td> {{enrolled.profile.roll_number}}</td>
@@ -108,6 +112,7 @@
<div id="enroll">
<table class="table table-striped">
<th></th>
+ <th></th>
<th>Full Name</th>
<th>Email</th>
<th>Roll Number</th>
@@ -119,6 +124,7 @@
{% csrf_token %}
<tr>
<td><input type="checkbox" name="check" value="{{ rejected.id }}"></td>
+ <td>{{ forloop.counter }}.</td>
<td>{{rejected.get_full_name|title}}</td>
<td> {{rejected.email}}</td>
<td> {{rejected.profile.roll_number}}</td>
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 1f6e67d..9dd0de5 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -135,13 +135,25 @@ function call_skip(url)
{% block onload %} onload="updateTime();" {% endblock %}
{% block main %}
- <p id="status"></p>
- <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" enctype="multipart/form-data">
- {% csrf_token %}
- <input type=hidden name="question_id" id="question_id" value={{ question.id }}></input>
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4><u> {{ question.summary }}
+ <p id="status"></p>
+ {% if notification %}
+ {% if question.type == "code" %}
+ <div class="alert alert-success" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% else %}
+ <div class="alert alert-warning" role="alert">
+ <strong>Note:</strong> {{ notification }}
+ </div>
+ {% endif %}
+ {% endif %}
+ <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type=hidden name="question_id" id="question_id" value={{ question.id }}></input>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4>
+ <u> {{ question.summary }}
{% if question.type == "mcq" %}
(Single Correct Choice Questions)
{% elif question.type == "mcc" %}
@@ -151,8 +163,8 @@ function call_skip(url)
{% elif question.type == "upload" %}
(ASSIGNMENT UPLOAD)
{% endif %}
- </u>
- <font class=pull-right>(Marks : {{ question.points }}) </font>
+ </u>
+ <font class=pull-right>(Marks : {{ question.points }}) </font>
</h4>
<font size=3 face=arial> {{ question.description|safe }} </font>
{% if files %}
@@ -198,10 +210,15 @@ function call_skip(url)
{% elif question.type == "upload" %}
<br><button class="btn btn-primary" type="submit" name="check" id="check" onClick="return validate();">Upload</button>&nbsp;&nbsp;
{% 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;
+ {% if question in paper.get_questions_unanswered %}
+ <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 %}
{% endif %}
+
{% if paper.question_paper.quiz.allow_skip and not paper.get_questions_unanswered|length_is:"1" %}
+ {% if question in paper.get_questions_unanswered %}
<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>
+ {% endif %}
</div>
</div>
</div>
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index 63f22a1..72fce30 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -6,7 +6,7 @@
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
- <h4><b><u> {{ course.name }} by {{ course.creator }}</u></b></h4>
+ <h4><b><u> {{ course.name }} by {{ course.creator.get_full_name }}</u></b></h4>
</div>
<div class="col-md-4">
{% if user in course.requests.all %} <span class="label label-warning">Request Pending </span>
diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html
index 9be28fb..16707b2 100644
--- a/yaksh/templates/yaksh/user_data.html
+++ b/yaksh/templates/yaksh/user_data.html
@@ -100,7 +100,7 @@ User IP address: {{ paper.user_ip }}
{% else %}
<h5>Student answer: </h5>
{% for answer in answers %}
- {% if not answer.skipped %}
+
{% if answer.answer.correct %}
<div class="panel panel-success">
<div class="panel-heading">Correct answer
@@ -116,7 +116,7 @@ User IP address: {{ paper.user_ip }}
</div>
<div class="panel-body"><pre><code>{{ answer.answer.answer.strip }}</code></pre></div>
</div>
- {% endif %}
+
{% endfor %}
{% endif %}
<hr>