summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2017-04-26 14:35:10 +0530
committeradityacp2017-04-26 14:35:10 +0530
commitfdbc43f2216661c6166590b7f81cf598976167a0 (patch)
tree97bf44f4f06f830205d433188d7893922fc88136 /yaksh/templates
parent66add60208394d9aebdc642564ad905d4fc096c4 (diff)
parent7da22eb25f2bd5c0a6c5ba29d1febacb4f03f939 (diff)
downloadonline_test-fdbc43f2216661c6166590b7f81cf598976167a0.tar.gz
online_test-fdbc43f2216661c6166590b7f81cf598976167a0.tar.bz2
online_test-fdbc43f2216661c6166590b7f81cf598976167a0.zip
Merge https://github.com/fossee/online_test into email_verification
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/404.html4
-rw-r--r--yaksh/templates/yaksh/course_detail.html4
-rw-r--r--yaksh/templates/yaksh/courses.html2
-rw-r--r--yaksh/templates/yaksh/grade_user.html84
-rw-r--r--yaksh/templates/yaksh/moderator_dashboard.html4
-rw-r--r--yaksh/templates/yaksh/monitor.html67
-rw-r--r--yaksh/templates/yaksh/showquestions.html1
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html8
8 files changed, 114 insertions, 60 deletions
diff --git a/yaksh/templates/404.html b/yaksh/templates/404.html
index 7d33dd3..e9d99de 100644
--- a/yaksh/templates/404.html
+++ b/yaksh/templates/404.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block content %}
-The requested page does not exist.
+It seems that you have encountered an error
+Type of Error - {{ exception }}
+Please contact your administrator
{% endblock %}
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index 4b7efaf..81569fa 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -1,8 +1,8 @@
{% extends "manage.html" %}
-{% block title %} Course {% endblock title %}
+{% block title %} Course Details {% endblock title %}
-{% block subtitle %} {{ course.name }} {% endblock %}
+{% block pagetitle %} Course Details for {{ course.name|title }} {% endblock %}
{% block script %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index 60e6bf4..e09a9cc 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -1,5 +1,5 @@
{% extends "manage.html" %}
-
+{% block title %} Courses {% endblock %}
{% block pagetitle %} Courses {% endblock pagetitle %}
{% block content %}
{% if not courses %}
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 1cb1f99..c93ec10 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -1,5 +1,7 @@
{% extends "manage.html" %}
+{% block title %} Grade User {% endblock %}
+
{% block pagetitle %} Grade User {% endblock pagetitle %}
{% block content %}
@@ -8,11 +10,10 @@
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
{% endblock script %}
-
{% if course_details %}
<table id="course-details" class="table table-bordered">
<tr>
- <th>Courses</th>
+ <th>Courses</th>
<th> Quizzes </th>
</tr>
@@ -37,23 +38,31 @@
{% endif %}
<div class="row">
-{%if users %}
+{% if not course_details %}
+{% if users %}
<div id = "student" class="col-md-2">
{% for user in users %}
<p><a href = "{{URL_ROOT}}/exam/manage/gradeuser/{{quiz_id}}/{{user.user__id}}">
{{user.user__first_name}} {{user.user__last_name}}</a></p>
{% endfor %}
</div>
+{% else %}
+<h4>No Users Found for {{ quiz.description }}</h4>
+{% endif %}
{% endif %}
+{% if has_quiz_assignments %}
+<a href="{{URL_ROOT}}/exam/manage/download/quiz_assignments/{{quiz_id}}/">
+ Download All Assignments</a>
+{% endif %}
<div id = "paper" class="col-md-10">
{% if data %}
<p> <h3> <center> Showing paper for {{data.user.get_full_name.title}} </center></h3>
-<p><b>Name:</b>{{ data.user.get_full_name.title }}
+<p><b>Name:</b> {{ data.user.get_full_name.title }}
{% if data.profile %}
<p><b> Roll number:</b> {{ data.profile.roll_number }}
@@ -68,7 +77,8 @@
<hr>
{{ paper.total_marks }}
-<h3> Quiz: {{ paper.question_paper.quiz.description }} </h3>
+<h4> Course: {{ paper.question_paper.quiz.course.name }}</h4>
+<h4> Quiz: {{ paper.question_paper.quiz.description }} </h4>
<p>
Attempt Number: <b>{{paper.attempt_number}} </b>
@@ -80,7 +90,6 @@ Attempt Number: <b>{{paper.attempt_number}} </b>
</option>
{% endfor %}
</select>
-
<br/>Questions correctly answered: {{ paper.get_answered_str }} <br/>
Total attempts at questions: {{ paper.answers.count }} <br/>
Marks obtained: {{ paper.marks_obtained }} <br/>
@@ -95,7 +104,6 @@ Status : <b style="color: red;"> Failed </b><br/>
Status : <b style="color: green;"> Passed </b><br/>
{% endif %}
</p>
-
{% if paper.answers.count %}
<h4> Report </h4><br>
@@ -122,8 +130,8 @@ Status : <b style="color: green;"> Passed </b><br/>
{% endif %}
method="post">
{% csrf_token %}
-{% for question, answers in paper.get_question_answers.items %}
+{% for question, answers in paper.get_question_answers.items %}
<div class="panel panel-info">
<div class="panel-heading">
<strong> Details: {{forloop.counter}}. {{ question.summary }}
@@ -153,7 +161,6 @@ Status : <b style="color: green;"> Passed </b><br/>
<strong>{{ testcase.error_margin|safe }}</strong>
{% endif %}
{% endfor %}
-
{% else %}
<h5> <u>Test cases: </u></h5>
{% for testcase in question.get_test_cases %}
@@ -163,29 +170,50 @@ Status : <b style="color: green;"> Passed </b><br/>
</div>
</div>
<h5>Student answer: </h5>
- {% for ans in answers %}
- {% if ans.answer.correct %}
- <div class="panel panel-success">
- <div class="panel-heading">Correct answer:
+ {% if question.type == "upload" %}
+ {% if has_user_assignments %}
+ <a href="{{URL_ROOT}}/exam/manage/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}">
+ <div class="panel">
+ Assignment File for {{ data.user.get_full_name.title }}
+ </div>
+ </a>
+ {% with answers|last as answer%}
+ {% if answer.answer.correct %}
+ <div class="panel panel-success">
+ <div class="panel-heading">Correct answer</div></div>
+ {% else %}
+ <div class="panel panel-danger">
+ <div class="panel-heading">Incorrect Answer</div></div>
+ {% endif %}
+ {% endwith %}
+ {% else %}
+ <h5>No Assignment submitted by {{ data.user.get_full_name.title }}</h5>
+ {% endif %}
+ {% else %}
+ {% for ans in answers %}
+ {% if ans.answer.correct %}
+ <div class="panel panel-success">
+ <div class="panel-heading">Correct answer:
+ {% else %}
+ <div class="panel panel-danger">
+ <div class="panel-heading">Error:
+ {% endif %}
+ {% for err in ans.error_list %}
+ <div><pre>{{ err }}</pre></div>
+ {% endfor %}
+ </div>
+ <div class="panel-body">
+ {% if question.type != "code" %}
+ <div class="well well-sm">
+ {{ ans.answer.answer.strip|safe }}
+ </div>
{% else %}
- <div class="panel panel-danger">
- <div class="panel-heading">Error:
+ <pre><code>{{ ans.answer.answer.strip|safe }}</code></pre>
{% endif %}
- {% for err in ans.error_list %}
- <div><pre>{{ err }}</pre></div>
+ </div>
+ </div>
{% endfor %}
- </div>
- <div class="panel-body">
- {% if question.type != "code" %}
- <div class="well well-sm">
- {{ ans.answer.answer.strip|safe }}
- </div>
- {% else %}
- <pre><code>{{ ans.answer.answer.strip|safe }}</code></pre>
{% endif %}
- </div>
- </div>
- {% endfor %}
{% with answers|last as answer %}
Marks: <input id="q{{ question.id }}" type="text"
name="q{{ question.id }}_marks" size="4"
diff --git a/yaksh/templates/yaksh/moderator_dashboard.html b/yaksh/templates/yaksh/moderator_dashboard.html
index 0468ed9..faccffe 100644
--- a/yaksh/templates/yaksh/moderator_dashboard.html
+++ b/yaksh/templates/yaksh/moderator_dashboard.html
@@ -9,6 +9,7 @@
<center><h4>List of quizzes! Click on the given links to have a look at answer papers for a quiz.</h4></center>
<table class="table table-bordered">
+ <th>Course</th>
<th>Quiz</th>
<th>Taken By</th>
<th>No. of users Passed</th>
@@ -16,6 +17,9 @@
{% for paper, answer_papers, users_passed, users_failed in users_per_paper %}
<tr>
<td>
+ {{ paper.quiz.course.name }}
+ </td>
+ <td>
<a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.id}}/">{{ paper.quiz.description }}</a>
</td>
<td>
diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html
index d2c89ce..9ce0dc4 100644
--- a/yaksh/templates/yaksh/monitor.html
+++ b/yaksh/templates/yaksh/monitor.html
@@ -1,15 +1,16 @@
{% extends "manage.html" %}
{% load custom_filters %}
-
-{% block pagetitle %} Quiz results {% endblock pagetitle %}
+{% block title %} Monitor {% endblock %}
+{% block pagetitle %} {{ msg }} {% endblock pagetitle %}
{% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %}
{% block script %}
+{% if papers %}
<script src="{{ URL_ROOT }}/static/yaksh/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
-$(document).ready(function()
+$(document).ready(function()
{
$("#result-table").tablesorter({sortList: [[5,1]]});
var papers_length = "{{papers|length}}";
@@ -23,41 +24,48 @@ $(document).ready(function()
}
});
</script>
-
+{% endif %}
{% endblock %}
-
-{% block subtitle %}
- {% if not quizzes and not quiz %}
- Quiz Results
- {% endif %}
- {% if quizzes %}
- Available Quizzes
- {% endif %}
- {% if quiz %}
- {{ quiz.description }} Results
- {% endif %}
-{% endblock %}
{% block content %}
- {% if not quizzes and not quiz %}
- <center><h5> No quizzes available. </h5></center>
- {% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor #}
-{% if quizzes %}
-<ul class="list-group">
-{% for q in quizzes %}
-<li class="list-group-item"><a href="{{URL_ROOT}}/exam/manage/monitor/{{q.id}}/">{{ q.quiz.description }}</a></li>
-{% endfor %}
-</ul>
+
+{% if course_details %}
+ <table id="course-details" class="table table-bordered">
+ <tr>
+ <th>Courses</th>
+ <th> Quizzes </th>
+ </tr>
+
+ {% for course in course_details %}
+ <tr>
+ <td><ul class="list-group">{{course.name}} </td>
+
+ {% if course.get_quizzes %}
+ <td>
+ {% for quiz in course.get_quizzes %}
+ <li class="list-group-item"><a href = "{{URL_ROOT}}/exam/manage/monitor/{{quiz.id}}">
+ {{quiz.description}}
+ </a></li>
+ {% endfor %}
+ </td>
+ {% else %}
+ <td> No quiz</td>
+ {% endif %}
+ </ul></tr>
+ {% endfor %}
+ </table>
{% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor/quiz_num #}
+{% if msg != "Monitor" %}
{% if quiz %}
-
{% if papers %}
+<p>Course Name: {{ quiz.course.name }}</p>
+<p>Quiz Name: {{ quiz.description }}</p>
<p>Number of papers: {{ papers|length }} </p>
{% completed papers as completed_papers %}
{# template tag used to get the count of completed papers #}
@@ -80,6 +88,7 @@ $(document).ready(function()
<th> Marks obtained </th>
<th> Attempts </th>
<th> Time Remaining </th>
+ <th> Status </th>
</tr>
</thead>
<tbody>
@@ -93,13 +102,17 @@ $(document).ready(function()
<td> {{ paper.marks_obtained }} </td>
<td> {{ paper.answers.count }} </td>
<td id="time_left{{forloop.counter0}}"> {{ paper.time_left }} </td>
+ <td>{{ paper.status }}</td>
</div>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
-<p> No answer papers so far. </p>
+<p> No answer papers found for {{ quiz.description }}</p>
{% endif %} {# if papers #}
+{% else %}
+<h4>No Quiz Found</h4>
+{% endif %}
{% endif %}
{% endblock %}
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index 157b378..a136ddf 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -1,5 +1,6 @@
{% extends "manage.html" %}
+{% block title %} Questions {% endblock %}
{% block pagetitle %} List of Questions {% endblock pagetitle %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 4520ac3..f4c8846 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -84,7 +84,13 @@
<h5><u>Student answer:</u></h5>
<div class="well well-sm">
{{ answers.0.answer|safe }}
- </div>
+ {% if question.type == "upload" and has_user_assignment %}
+ <a href="{{URL_ROOT}}/exam/download/user_assignment/{{question.id}}/{{data.user.id}}/{{paper.question_paper.quiz.id}}">
+ <div class="panel">
+ Assignment File for {{ data.user.get_full_name.title }}
+ </div></a>
+ {% endif %}
+ </div>
</div>
</div>
{% else %}