summaryrefslogtreecommitdiff
path: root/testapp/templates/exam
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/templates/exam')
-rw-r--r--testapp/templates/exam/add_question.html39
-rw-r--r--testapp/templates/exam/add_questionpaper.html28
-rw-r--r--testapp/templates/exam/add_quiz.html28
-rw-r--r--testapp/templates/exam/automatic_questionpaper.html88
-rw-r--r--testapp/templates/exam/complete.html12
-rw-r--r--testapp/templates/exam/edit_question.html54
-rw-r--r--testapp/templates/exam/edit_quiz.html40
-rw-r--r--testapp/templates/exam/editquestionpaper.html21
-rw-r--r--testapp/templates/exam/grade_user.html63
-rw-r--r--testapp/templates/exam/intro.html73
-rw-r--r--testapp/templates/exam/login.html32
-rw-r--r--testapp/templates/exam/manual_questionpaper.html81
-rw-r--r--testapp/templates/exam/monitor.html62
-rw-r--r--testapp/templates/exam/question.html140
-rw-r--r--testapp/templates/exam/quit.html18
-rw-r--r--testapp/templates/exam/quizlist.html24
-rw-r--r--testapp/templates/exam/quizzes_user.html18
-rw-r--r--testapp/templates/exam/register.html19
-rw-r--r--testapp/templates/exam/results_user.html26
-rw-r--r--testapp/templates/exam/show_quiz.html32
-rw-r--r--testapp/templates/exam/showquestionpapers.html19
-rw-r--r--testapp/templates/exam/showquestions.html21
-rw-r--r--testapp/templates/exam/showusers.html26
-rw-r--r--testapp/templates/exam/user_data.html22
24 files changed, 771 insertions, 215 deletions
diff --git a/testapp/templates/exam/add_question.html b/testapp/templates/exam/add_question.html
new file mode 100644
index 0000000..e3ba17a
--- /dev/null
+++ b/testapp/templates/exam/add_question.html
@@ -0,0 +1,39 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Add Question{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+{% endblock %}
+
+{% block script %}
+<script type="text/javascript" src="{{ URL_ROOT }}/static/exam/js/min.js"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+<script src="{{ URL_ROOT }}/static/exam/js/add_question.js"></script>
+{% endblock %}
+
+{% block onload %} onload='javascript:textareaformat();' {% endblock %}
+
+{% block manage %}
+<form action="" method="post" name=frm onSubmit="return autosubmit();">
+ {% csrf_token %}
+ <center><table class=span1>
+ <tr><td>Summary: <td>{{ form.summary }}{{ form.summary.errors }}
+ <tr><td>Points:<td><button class="btn-mini" type="button" onClick="increase(frm);">+</button>{{ form.points }}<button class="btn-mini" type="button" onClick="decrease(frm);"">-</button>{{ form.points.errors }} &nbsp; Active: &nbsp; {{ form.active }}{{form.active.errors}} &nbsp; Type: &nbsp;{{ form.type }}{{form.type.errors}}
+ <tr><td><strong>Rendered: </strong><td><p id='my'></p>
+ <tr><td>Description: <td>{{ form.description}} {{form.description.errors}}
+ <tr><td>Test: <td>{{ form.test }}{{form.test.errors}}
+ <tr><td>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></tD></td></tr>
+ <tr><td>Tags: <td>{{ form.tags }}
+ <tr><td id='label_option'>Options: <td>{{ form.options }} {{form.options.errors}}
+
+
+ </table></center>
+ <center><button class="btn" type="submit" name="savequestion">Save</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Cancel</button> </center>
+</form>
+{% endblock %}
+
diff --git a/testapp/templates/exam/add_questionpaper.html b/testapp/templates/exam/add_questionpaper.html
new file mode 100644
index 0000000..4cce8a9
--- /dev/null
+++ b/testapp/templates/exam/add_questionpaper.html
@@ -0,0 +1,28 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Design Question Paper{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+{% endblock %}
+{% block script %}
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+<script src="{{ URL_ROOT }}/static/exam/js/add_questionpaper.js"></script>
+{% endblock %}
+
+{% block manage %}
+<input type=hidden id="url_root" value={{ URL_ROOT }}>
+<form>
+{% csrf_token %}
+Select mode to design Question Paper:
+<select name='mode' id='mode' onChange='javascript:load_data();'>
+ <option>---------</option>
+ <option>Automatic</option>
+ <option>Manual</option>
+</select>
+</form>
+
+{% endblock %}
diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html
new file mode 100644
index 0000000..9851584
--- /dev/null
+++ b/testapp/templates/exam/add_quiz.html
@@ -0,0 +1,28 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Add Quiz{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+{% endblock %}
+{% block script %}
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+<script src="{{ URL_ROOT }}/static/exam/js/add_quiz.js"></script>
+{% endblock %}
+{% block onload %} onload="javascript:test();" {% endblock %}
+{% block manage %}
+<form name=frm id=frm action="" method="post" >
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {{ form.as_table }}
+ </table>
+ </center>
+
+ <center><button class="btn" type="submit" id="submit" name="questionpaper">Design Question Paper</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/showquiz/");'>Cancel</button> </center>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/automatic_questionpaper.html b/testapp/templates/exam/automatic_questionpaper.html
new file mode 100644
index 0000000..1175f55
--- /dev/null
+++ b/testapp/templates/exam/automatic_questionpaper.html
@@ -0,0 +1,88 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Design Question Paper{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+<style>
+select
+{
+ width:auto;
+}
+</style>
+{% endblock %}
+{% block script %}
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+<script src="{{ URL_ROOT }}/static/exam/js/add_questionpaper.js"></script>
+{% endblock %}
+
+{% block manage %}
+<input type=hidden id="url_root" value={{ URL_ROOT }}>
+<center><b>Automatic mode to design the Question Paper</center><br>
+<form action="" method="post" name=frm>
+ {% csrf_token %}
+ <center>
+ Tag Conditions:
+ <select name='first_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+
+ <select name='first_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+
+ <select name='second_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+
+ <select name='second_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+
+ <select name='third_tag'>
+ <option value="null">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ </center>
+
+ <br>
+
+ <center>Number of question: <input type=text id=questions name='questions' style="width:25px;">&nbsp;<button class=btn type=submit name='fetch' value='fetch'>Fetch Questions</button><br></center>
+
+ <br>
+ <br>
+ <p><b>Below is the list of Questions fetched according to the given tag conditions</p>
+ <hr>
+ <center><table class=span10>
+ <th>Summary
+ <th>Type
+ <th>Points
+ <th>Tags
+ {% for question in data.questions %}
+ <input type=hidden name='questions' value={{ question.id }} />
+ <tr><td>{{ question.summary }} <td>{{ question.type }} <td>{{ question.points }} <td>
+ {% for tag in question.tags.all %}
+ {{ tag }}
+ {% endfor %}
+ </tr>
+ <br>
+ {% endfor %}
+ </table>
+ {% if data.msg %}<div class="alert alert-error">{{ data.msg }}</div>{% endif %}
+ <center><button class=btn type=submit name='save' value='save'>Save Question Paper</button></center>
+</form>
+
+{% endblock %}
diff --git a/testapp/templates/exam/complete.html b/testapp/templates/exam/complete.html
index 4c3f3d5..1d5df3c 100644
--- a/testapp/templates/exam/complete.html
+++ b/testapp/templates/exam/complete.html
@@ -2,11 +2,11 @@
{% block title %}Good bye!{% endblock %}
+{% block pagetitle %}Online Test{% endblock %}
{% block content %}
-<h2> Good bye! </h2>
-
-<p> {{message}} </p>
-<br />
-<p>You may now close the browser.</p>
-
+{% csrf_token %}
+ <center><h2> Good bye! </h2></center>
+ <center><h4> {{message}} </h4></center>
+ <center><h4>You may now close the browser.</h4></center><br>
+ <center><a href="{{URL_ROOT}}/exam/"> Login Again </a></center>
{% endblock content %}
diff --git a/testapp/templates/exam/edit_question.html b/testapp/templates/exam/edit_question.html
new file mode 100644
index 0000000..96502f1
--- /dev/null
+++ b/testapp/templates/exam/edit_question.html
@@ -0,0 +1,54 @@
+{% extends "manage.html" %}
+
+{% block subtitle %}Edit Question{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+{% endblock %}
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/edit_question.js"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+{% endblock %}
+
+{% block onload %} onload = 'javascript:textareaformat();' {% endblock %}
+
+{% block manage %}
+<form name='frm' action="{{URL_ROOT}}/exam/manage/editquestion/" method="post" onSubmit="return autosubmit()" onKeyPress='javascript:render_question(frm);'>
+ {% csrf_token %}
+<center><p>Click on the Question links to edit the question.</p></center>
+
+<table>
+
+ {% for form in forms %}
+
+ <tr><td height=10><a id='a{{forloop.counter}}' onClick="data('contentDiv{{forloop.counter}}','myContent{{forloop.counter}}','a{{forloop.counter}}','{{form.summary.value}}');" style='cursor:pointer;'>{{form.summary.value}}</a>
+
+ <div id="contentDiv{{forloop.counter}}" style="display:none;">
+ <div id="myContent{{forloop.counter}}" style="display: none;">
+
+ <center><table class=span1>
+ <tr><td><b>Summary:</b> <td>{{ form.summary }}{{ form.summary.errors }}
+
+ <tr><td><b>Points:<td><button class="btn-mini" name={{forloop.counter}} type="button" onClick="increase(frm,{{forloop.counter}});">+</button>{{ form.points }}<button class="btn-mini" type="button" onClick="decrease(frm,{{forloop.counter}});"">-</button>{{ form.points.errors }} &nbsp; Active: &nbsp; {{ form.active }}{{form.active.errors}} &nbsp; Type: &nbsp;{{ form.type }}{{form.type.errors}}
+
+ <tr><td><strong>Rendered: </strong><td><p id='my{{forloop.counter}}'></p>
+ <tr><td><b>Description: <td>{{ form.description }} {{form.description.errors}}
+ <tr><td><b>Test: <td>{{ form.test }}{{form.test.errors}}
+ <tr><td><b>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></b></td></tr>
+ <tr><td>Tags: <td>{{ form.tags }}
+ <tr><td id='label_option{{forloop.counter}}'><b>Options: <td>{{ form.options }} {{form.options.errors}} {{form.options.helptext}}
+ </table></center>
+ </div>
+ </div>
+ {% endfor %}
+</table></center>
+{% for i in data %}
+ <input type=hidden name='questions' value="{{ i }}" />
+{% endfor %}
+
+ <center><button class="btn" type="submit" name="savequestion">Save</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Cancel</button> </center>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/edit_quiz.html b/testapp/templates/exam/edit_quiz.html
new file mode 100644
index 0000000..0ea4aae
--- /dev/null
+++ b/testapp/templates/exam/edit_quiz.html
@@ -0,0 +1,40 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Edit Quiz(zes){% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+{% endblock %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/edit_quiz.js"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+{% endblock %}
+
+{% block onload %} onload = 'javascript:form_load();' {% endblock %}
+
+{% block manage %}
+<form name=frm action="{{URL_ROOT}}/exam/manage/editquiz/" method="post">
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {% for form in forms %}
+ <tr><td><b>Start Date: <td>{{ form.start_date}}
+ <tr><td><b>Duration: <td> {{ form.duration }}
+ <tr><td><b>Active: <td> {{ form.active }}
+ <tr><td><b>Tags: <td> {{ form.tags }}
+ <tr><td><b>Description: <td> {{ form.description }}
+ <hr>
+ {% endfor %}
+ </table>
+ </center>
+{% for i in data %}
+ <input type=hidden name='quizzes' value="{{ i }}" />
+{% endfor %}
+ <center><button class="btn" type="submit" name="save">Save</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/showquiz/");'>Cancel</button> </center>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/editquestionpaper.html b/testapp/templates/exam/editquestionpaper.html
new file mode 100644
index 0000000..819ff06
--- /dev/null
+++ b/testapp/templates/exam/editquestionpaper.html
@@ -0,0 +1,21 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Questions in "{{ papers.quiz.description }}"{% endblock %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script>
+{% endblock %}
+
+{% block manage %}
+<form name=frm action="" method="post">
+{% csrf_token %}
+
+{% for i in papers.questions %}
+<input type="checkbox" name="papers" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ i.id }}">{{ i.summary}}</a><br>
+{% endfor %}
+<br>
+<button class="btn" type="submit" name='add' value=add>Add Question</button>&nbsp;&nbsp;
+<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html
index 75ed2e0..ae9274e 100644
--- a/testapp/templates/exam/grade_user.html
+++ b/testapp/templates/exam/grade_user.html
@@ -1,10 +1,17 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
{% block title %} Grading papers for {{ data.user.get_full_name.title }} {% endblock title %}
-{% block content %}
+{% block subtitle %}Grading papers for {{ data.user.get_full_name.title }}{% endblock %}
+
+{% block css %}
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/gradeuser.css" type="text/css" />
+{% endblock %}
-<h1> Grading papers for {{ data.user.get_full_name.title }} </h1>
+{% block script %}
+<script src= "{{ URL_ROOT }}/static/exam/js/edit_question.js"></script>
+{% endblock %}
+{% block manage %}
<p>
Name: {{ data.user.get_full_name.title }}
@@ -30,16 +37,26 @@ Start time: {{ paper.start_time }} <br/>
</p>
{% if paper.answers.count %}
-<h3> Answers </h3>
-<form id="q{{ paper.quiz.id }}_form"
- action="{{URL_ROOT}}/exam/grade_user/{{data.user.username}}/" method="post">
+<h3> Answers </h3><br>
+<form name=frm id="q{{ paper.quiz.id }}_form"
+ action="{{URL_ROOT}}/exam/manage/gradeuser/{{data.user.username}}/" method="post">
{% csrf_token %}
{% for question, answers in paper.get_question_answers.items %}
+<div class="for-question">
<p><strong>
- <a href="{{URL_ROOT}}/admin/exam/question/{{question.id}}">
- Question: {{ question.id }}. {{ question.summary }} </a>
- (Points: {{ question.points }})</strong> </p>
+ Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})
+</strong>
+<strong><a href="" onClick="grade_data('myContent{{question.id}}'); return false;" style="cursor:pointer;" />Details</strong></p></a>
+<div id="contentDiv">
+ <div id="myContent{{question.id}}" style="padding:5px; display:none;">
+ <p> Description : {{ question.description }} </p>
+ <p> Test : {{ question.test }} </p>
+ </div>
+</div>
+<div class="question-form">
+
{% if question.type == "mcq" %}
+<br>
<p> Choices:
{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %}
</p>
@@ -54,14 +71,19 @@ Start time: {{ paper.start_time }} <br/>
{% with answers|last as answer %}
Marks: <input id="q{{ question.id }}" type="text"
name="q{{ question.id }}_marks" size="4"
- value="{{ answer.marks }}" />
+ value="{{ answer.marks }}"><br><br>
{% endwith %}
+</div>
+</div>
{% endfor %} {# for question, answers ... #}
+
+
<h3>Teacher comments: </h3>
-<textarea id="comments_{{paper.quiz.id}}" rows="10" cols="80"
- name="comments_{{ paper.quiz.id }}">{{ paper.comments }}</textarea>
-<br/>
-<input type="submit" name="submit_{{paper.quiz.id}}" value="Save marks" />
+<textarea id="comments_{{paper.question_paper.id}}" rows="10" cols="80"
+ name="comments_{{ paper.question_paper.id }}">{{ paper.comments }}</textarea>
+<br>
+<br><button class="btn" type="submit" name="submit_{{paper.quiz.id}}">Save Marks</button>
+
</form>
{% endif %} {# if paper.answers.count #}
@@ -69,15 +91,4 @@ Marks: <input id="q{{ question.id }}" type="text"
{% endif %} {# if data.papers #}
-{% if data.papers.count > 1 %}
-<a href="{{URL_ROOT}}/exam/monitor/">
- Monitor quiz</a>
-{% else %}
-{% with data.papers.0 as paper %}
-<a href="{{URL_ROOT}}/exam/monitor/{{paper.quiz.id}}/">
- Monitor quiz</a>
-{% endwith %}
-{% endif %}
-<br />
-<a href="{{URL_ROOT}}/admin/">Admin</a>
-{% endblock content %}
+{% endblock%}
diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html
index 1d3e5de..ec1888a 100644
--- a/testapp/templates/exam/intro.html
+++ b/testapp/templates/exam/intro.html
@@ -1,53 +1,34 @@
{% extends "base.html" %}
{% block title %}Instructions and Rules {% endblock %}
-
+{% block pagetitle %}Online Test {% endblock %}
+{% block formtitle %}Important instructions & rules {% endblock %}
{% block content %}
-<h2>Important rules and instructions</h2>
-
-<p> Welcome <strong>{{user.first_name.title}} {{user.last_name.title}}</strong>,
-to the programming quiz! </p>
-
-<p>
-This examination system has been developed with the intention of making you
-learn programming and be assessed in an interactive and fun manner.
-You will be presented with a series of programming questions and problems that
-you will answer online and get immediate feedback for.
-</p>
-
-<p> Here are some important instructions and rules that you should understand
-carefully.
-</p>
-
-<ul>
-
- <li>For any programming questions, you can submit solutions as many times as
- you want without a penalty. You may skip questions and solve them later.
- </li>
-
- <li> You <strong>may</strong> use your computer's Python/IPython shell or
- an editor to solve
- the problem and cut/paste the solution to the web interface.
- </li>
-
- <li> <strong>You are <strong>not allowed</strong> to use any internet
- resources, i.e. no google etc.</strong> </li>
-
- <li> Do not copy or share the questions or answers with anyone until the
- exam is complete <strong>for everyone</strong>.</li>
-
- <li> <strong>All</strong> your attempts at the questions are logged.
- Do not try to outsmart and break the testing system. If you do, we know
- who you are and we will expell you from the course. You have been warned.
- </li>
-
-</ul>
-<p> We hope you enjoy taking this exam.</p>
-<form action="{{URL_ROOT}}/exam/start/" method="post" align="center">
-{% csrf_token %}
-<input type="submit" name="start" value="Start Exam!">
-</form>
-{% endblock content %} \ No newline at end of file
+ <p> Welcome <strong>{{user.first_name.title}} {{user.last_name.title}}</strong>, to the programming quiz! </p>
+ <p>
+ This examination system has been developed with the intention of making you
+ learn programming and be assessed in an interactive and fun manner.
+ You will be presented with a series of programming questions and problems that
+ you will answer online and get immediate feedback for.
+ </p>
+ <p> Here are some important instructions and rules that you should understand carefully.</p>
+ <ul>
+ <li>For any programming questions, you can submit solutions as many times as you want without a penalty. You may skip questions and solve them later.
+ </li>
+ <li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.
+ </li>
+ <li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>
+ <li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>
+ <li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system. If you do, we know who you are and we will expell you from the course. You have been warned.
+ </li>
+ </ul>
+ <p> We hope you enjoy taking this exam !!!</p>
+
+ <form action="{{URL_ROOT}}/exam/start/{{ paper_id }}/" method="post" align="center">
+ {% csrf_token %}
+ <center><button class="btn" type="submit" name="start">Start Exam!</button></center>
+ </form>
+{% endblock content %}
diff --git a/testapp/templates/exam/login.html b/testapp/templates/exam/login.html
index 8e6352e..078e7a7 100644
--- a/testapp/templates/exam/login.html
+++ b/testapp/templates/exam/login.html
@@ -1,20 +1,22 @@
{% extends "base.html" %}
{% block title %}Login{% endblock title %}
-
+{% block pagetitle %} Online Test {% endblock %}
+{% block formtitle %}Login{% endblock %}
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/login.css" type="text/css" />
+{% endblock %}
{% block content %}
-<p> Welcome to the Examination.
-Please login to proceed.</p>
-
-<form action="" method="post">
-{% csrf_token %}
-
-<table>
-{{ form.as_table }}
-</table>
-<input type="submit" value="Login" />
-</form>
-<!-- <a href="{{URL_ROOT}}/exam/forgotpassword/">Forgot Password</a> <br /> -->
-<a href="{{URL_ROOT}}/exam/register/">New User Registration</a>
-{% endblock content %} \ No newline at end of file
+ <form action="" method="post">
+ {% csrf_token %}
+
+ <center><table class=span1>
+ {{ form.as_table }}
+ </table></center>
+ <center><button class="btn" type="submit">Login</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="btn" type="reset">Cancel</button></center>
+ <br><center><a href="{{URL_ROOT}}/exam/forgotpassword/">Forgot Password?</a></center><br>
+ <center><a href="{{URL_ROOT}}/exam/register/">New User? Sign-Up </a></center>
+ </form>
+
+{% endblock content %}
diff --git a/testapp/templates/exam/manual_questionpaper.html b/testapp/templates/exam/manual_questionpaper.html
new file mode 100644
index 0000000..1a1f95c
--- /dev/null
+++ b/testapp/templates/exam/manual_questionpaper.html
@@ -0,0 +1,81 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}Design Question Paper{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+<style>
+select
+{
+ width:auto;
+}
+</style>
+{% endblock %}
+{% block script %}
+<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
+<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script>
+
+<script src="{{ URL_ROOT }}/static/exam/js/add_questionpaper.js"></script>
+{% endblock %}
+
+{% block manage %}
+<input type=hidden id="url_root" value={{ URL_ROOT }}>
+<center><b>Manual mode to design the Question Paper</center><br>
+
+<form action="" method="post" name=frm>
+ {% csrf_token %}
+ <center>
+ Tag Conditions:
+ <select name='first_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ <select name='first_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+ <select name='second_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ <select name='second_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+ <select name='third_tag'>
+ <option value="null">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ </center>
+ <br>
+ <center><button class=btn type=submit name='fetch' value='fetch'>Fetch Questions</button>
+ <br><br><b>Below is the list of Questions fetched according to the given tag conditions</b></center>
+ <hr>
+ <center><table class=span10>
+ <th> &nbsp;
+ <th>Summary
+ <th>Type
+ <th>Points
+ <th>Tags
+ {% for question in data.questions %}
+ <tr><td><input type=checkbox name=questions value={{question.id}}> <td> {{ question.summary }} <td>{{ question.type }} <td>{{ question.points }} <td>
+ {% for tag in question.tags.all %}
+ {{ tag }}
+ {% endfor %}
+ </tr>
+ <br>
+ {% endfor %}
+ </table>
+ {% if data.msg %}<div class="alert alert-error">{{ data.msg }}</div>{% endif %}
+ <center><button class=btn type=submit name='save' value='save'>Save Question Paper</button></center>
+</form>
+
+{% endblock %}
diff --git a/testapp/templates/exam/monitor.html b/testapp/templates/exam/monitor.html
index fb6cb58..aa8b678 100644
--- a/testapp/templates/exam/monitor.html
+++ b/testapp/templates/exam/monitor.html
@@ -1,26 +1,34 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
{% block title %} Quiz results {% endblock title %}
{% block meta %} <meta http-equiv="refresh" content="30"/> {% endblock meta %}
-{% block content %}
-
-{% if not quizzes and not quiz %}
-<h1> Quiz results </h1>
-
-<p> No quizzes available. </p>
-
-{% endif %}
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+{% 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 manage %}
+ {% 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 %}
-<h1> Available quizzes </h1>
-
<ul>
-{% for quiz in quizzes %}
-<li><a href="{{URL_ROOT}}/exam/monitor/{{quiz.id}}/">{{ quiz.description }}</a></li>
+{% for q in quizzes %}
+<li><a href="{{URL_ROOT}}/exam/manage/monitor/{{q.id}}/">{{ q.quiz.description }}</a></li>
{% endfor %}
</ul>
{% endif %}
@@ -28,27 +36,24 @@
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor/quiz_num #}
{% if quiz %}
-<h1> {{ quiz.description }} results </h1>
+
{% if papers %}
{# <p> Quiz: {{ quiz_name }}</p> #}
<p>Number of papers: {{ papers|length }} </p>
-
<table border="1" cellpadding="3">
<tr>
- <th> Name </th>
- <th> Username </th>
- <th> Roll number </th>
- <th> Institute </th>
- <th> Questions answered </th>
- <th> Total marks </th>
- <th> Attempts </th>
+ <th> Name </th>
+ <th> Username </th>
+ <th> Roll number </th>
+ <th> Institute </th>
+ <th> Questions answered </th>
+ <th> Total marks </th>
+ <th> Attempts </th>
</tr>
{% for paper in papers %}
<tr>
- <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.user.username}}">
- {{ paper.user.get_full_name.title }}</a> </td>
- <td> <a href="{{URL_ROOT}}/exam/user_data/{{paper.user.username}}">
- {{ paper.user.username }}</a> </td>
+ <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.username}}">{{ paper.user.get_full_name.title }}</a> </td>
+ <td> <a href="{{URL_ROOT}}/exam/manage/user_data/{{paper.user.username}}">{{ paper.user.username }}</a> </td>
<td> {{ paper.profile.roll_number }} </td>
<td> {{ paper.profile.institute }} </td>
<td> {{ paper.get_answered_str }} </td>
@@ -61,7 +66,4 @@
<p> No answer papers so far. </p>
{% endif %} {# if papers #}
{% endif %}
-
-<a href="{{URL_ROOT}}/admin/">Admin</a>
-
-{% endblock content %}
+{% endblock %}
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 8b589b6..4f65b64 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -1,23 +1,19 @@
{% extends "base.html" %}
+<!DOCTYPE html>
+
{% block title %} Answer question {% endblock %}
-{% block script %}
-<script type="text/javascript">
-<!--
-var time_left = {{ time_left }};
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question.css" type="text/css" />
-function submitCode()
-{
- document.forms["code"].submit();
- var x = document.getElementById("status");
- x.innerHTML = "<strong>Checking answer ...</strong>";
- x = document.getElementById("check");
- x.disabled = true;
- x.value = "Checking Answer ...";
- document.getElementById("skip").disabled = true;
-}
+{% endblock %}
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/question.js"></script>
+
+<script>
+var time_left = {{ time_left }}
function secs_to_time(secs)
{
var h = Math.floor(secs/3600);
@@ -31,61 +27,81 @@ function secs_to_time(secs)
function update_time()
{
time_left -= 1;
- if (time_left) {
- var elem = document.getElementById("time_left");
- var t_str = secs_to_time(time_left);
- elem.innerHTML = "<strong> Time left: " + t_str + "</strong>";
- setTimeout("update_time()", 1000);
- }
- else {
- document.forms["code"].submit();
+ if (time_left)
+ {
+ var elem = document.getElementById("time_left");
+ var t_str = secs_to_time(time_left);
+ elem.innerHTML = "<strong>" + t_str + "</strong>";
+ setTimeout("update_time()", 1000);
}
+ else
+ {
+ document.forms["code"].submit();
+ }
}
-//-->
</script>
{% endblock script %}
+
+
{% block onload %} onload="update_time()" {% endblock %}
+{% block pagetitle %}
+
+<table><h6><div>
+ <tr><td class=td1-class><h5>You have {{ paper.questions_left }} question(s) left in {{ quiz_name }} </h5>
+ <td class=td2-class><div class=time-div id="time_left">
+ </div>
+</div></h6></table>
+
+{% endblock %}
+
{% block content %}
-<h3> {{ question.summary }} </h3>
-
-<p>{{ question.description|safe }}
-<br/>
-(Marks: {{ question.points }}) </p>
-
-{% if error_message %}<p><strong>ERROR:</strong></p><pre>{{ error_message }}</pre>{% endif %}
-
-<p id="status"></p>
-
-<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/" method="post">
-{% csrf_token %}
-{% if question.type == "mcq" %}
-{% for option in question.options.strip.splitlines %}
-<input name="answer" type="radio" value="{{option}}" />{{option}} <br/>
-{% endfor %}
-{% else %}
-<textarea rows="20" cols="100" name="answer">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %}#!/bin/bash{% else %}# Enter your answer here.{% endif %}{% endif %}</textarea>
-{% endif %}
-<br/>
-{% if question.type == "mcq" %}
-<input id="check" type="submit" name="check" value="Submit answer"/>
-{% else %}
-<input id="check" type="submit" name="check" value="Check Answer"
-onclick="submitCode();"/>
-{% endif %}
-<input id="skip" type="submit" name="skip" value="Skip question" />
-</form>
-
-<p> {{ user.first_name.title }} {{ user.last_name.title }},
-you have {{ paper.questions_left }} question(s) left in {{ quiz_name }}.</p>
-
-<p id="time_left"> <strong> Time left: </strong> </p>
-
-<hr/>
-<form id="logout" action="{{URL_ROOT}}/exam/quit/" method="post">
-{% csrf_token %}
-<input type="submit" name="quit" value="Quit exam and logout" />
-</form>
+<div class="topbar">
+ <div class="fill">
+ <div class="container">
+ <h3 class="brand"><strong>Online Test</h3></strong>
+ <ul>
+ <li> <h5><a> Hi {{user.first_name.title}} {{user.last_name.title}} </a></h5>
+ </ul>
+ <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.question_paper.id }}/" method="post" class="pull-right">
+ {% csrf_token %}
+ <button class="btn" type="submit" name="quit">Quit Exam</button> </li>
+
+ </form>
+ </div>
+ </div>
+</div>
+
+
+ <h4><u> {{ question.summary }} </u><font class=pull-right>(Marks : {{ question.points }}) </font></h4><br>
+ <font size=3 face=arial> {{ question.description|safe }} </font>
+
+ {% if error_message %}<h5>ERROR:</h5><div class="alert alert-error">{{ error_message }}</div>{% endif %}
+ <p id="status"></p>
+ <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.question_paper.id }}/" method="post">
+ {% csrf_token %}
+ {% if question.type == "mcq" %}
+ {% for option in question.options.strip.splitlines %}
+ <input name="answer" type="radio" value="{{option}}" />{{option}} <br/>
+ {% endfor %}
+ {% else %}
+
+ <textarea tabindex=1 rows="15" style="width:750px;margin-bottom:10px;" name="answer" id="answer" wrap="off" onkeydown="return catchTab(this,event)">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %} #!/bin/bash{% else %}{{ question.snippet }}{% endif %}{% endif %}</textarea>
+<br>
+
+ <script type="text/javascript">
+ createTextAreaWithLines('answer');
+ </script>
+ {% endif %}
+ {% if question.type == "mcq" %}
+ <br><button class="btn" type="submit" name="check" id="check">Submit Answer</button>&nbsp;&nbsp;
+ {% else %}
+ <button class="btn" type="submit" name="check" id="check" onClick="submitCode();">Check Answer</button>&nbsp;&nbsp;
+ {% endif %}
+ <button class="btn" type="submit" name="skip" id="skip">Skip Question</button>
+ </form>
+
+
{% endblock content %}
diff --git a/testapp/templates/exam/quit.html b/testapp/templates/exam/quit.html
index 37b5c08..fee11ed 100644
--- a/testapp/templates/exam/quit.html
+++ b/testapp/templates/exam/quit.html
@@ -1,14 +1,14 @@
{% extends "base.html" %}
{% block title %}Quit exam {% endblock %}
-
+{% block pagetitle %}Online Test {% endblock %}
{% block content %}
-<p>Your current answers are saved.</p>
-<p> Are you sure you wish to quit the exam?</p>
-<form action="{{URL_ROOT}}/exam/complete/" method="post">
-{% csrf_token %}
-<input type="submit" name="yes" value="Yes!" />
-<input type="submit" name="no" value="No!" />
-</form>
-{% endblock content %} \ No newline at end of file
+ <center><h4>Your current answers are saved.</h4></center>
+ <center><h4> Are you sure you wish to quit the exam?</h4></center>
+ <center><h4> Be sure, as you won't be able to restart this exam.</h4></center>
+ <form action="{{URL_ROOT}}/exam/complete/{{ id }}/" method="post">
+ {% csrf_token %}
+ <center><button class="btn" type="submit" name="yes">Yes!</button>&nbsp;<button class="btn" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ id }}/'">No!</button></center>
+ </form>
+{% endblock content %}
diff --git a/testapp/templates/exam/quizlist.html b/testapp/templates/exam/quizlist.html
new file mode 100644
index 0000000..9b1fd73
--- /dev/null
+++ b/testapp/templates/exam/quizlist.html
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+
+{% block title %} Quiz List {% endblock title %}
+
+{% block formtitle %} Quiz List {% endblock %}
+
+{% block pagetitle %} Online Test {% endblock %}
+
+{% block content %}
+{% if not quizzes and not quiz %}
+<center><h5> No quizzes available. </h5></center>
+{% endif %}
+
+{% if quizzes %}
+<form method="post" action="" name='frm'>
+{% csrf_token %}
+
+{% for quiz in quizzes %}
+<a href="{{URL_ROOT}}/exam/start/{{quiz.id}}/">{{ quiz.description }}</a><br>
+{% endfor %}
+</form>
+{% endif %}
+
+{% endblock %}
diff --git a/testapp/templates/exam/quizzes_user.html b/testapp/templates/exam/quizzes_user.html
new file mode 100644
index 0000000..af2d98a
--- /dev/null
+++ b/testapp/templates/exam/quizzes_user.html
@@ -0,0 +1,18 @@
+{% extends "user.html" %}
+
+
+{% block subtitle %}Available Quizzes{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+{% endblock %}
+
+{% block manage %}
+ {% if not quizzes %}
+ <center><h4>No active quizzes for you</h4></center>
+ {% endif %}
+ {% for paper in quizzes %}
+ <a href="{{ URL_ROOT }}/exam/start/{{paper.id}}">{{ paper.quiz.description }}</a><br>
+ {% endfor %}
+{% endblock %}
+
diff --git a/testapp/templates/exam/register.html b/testapp/templates/exam/register.html
index 921e7b5..5ff79cc 100644
--- a/testapp/templates/exam/register.html
+++ b/testapp/templates/exam/register.html
@@ -2,16 +2,19 @@
{% block title %}Registration form {% endblock %}
+{% block pagetitle %}Online Test {% endblock %}
+{% block formtitle %}Please fill in the following details {% endblock %}
+
{% block content %}
-Please provide the following details.
-<form action="" method="post">
-{% csrf_token %}
-<table>
-{{ form.as_table }}
-</table>
-<input type="submit" value="Register" />
+
+<form action="" method="post">
+ {% csrf_token %}
+ <center><table class=span1>
+ {{ form.as_table }}
+ </table></center>
+ <center><button class="btn" type="submit">Register</button>&nbsp;&nbsp;<button class="btn" type="reset">Cancel</button></center>
</form>
-{% endblock content %} \ No newline at end of file
+{% endblock content %}
diff --git a/testapp/templates/exam/results_user.html b/testapp/templates/exam/results_user.html
new file mode 100644
index 0000000..bf847c0
--- /dev/null
+++ b/testapp/templates/exam/results_user.html
@@ -0,0 +1,26 @@
+{% extends "user.html" %}
+
+
+{% block subtitle %}Results{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+{% endblock %}
+
+{% block manage %}
+<form action="" method="post" name=frm>
+ {% csrf_token %}
+ <center><table class="span6">
+ <th>Quiz Description
+ <th>Obtained Marks
+ {% for paper in papers %}
+ <tr>
+ {% for i in paper %}
+ <td>{{ i }}
+ {% endfor %}
+ <br>
+ {% endfor %}
+ </table></center>
+</form>
+{% endblock %}
+
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html
new file mode 100644
index 0000000..886a696
--- /dev/null
+++ b/testapp/templates/exam/show_quiz.html
@@ -0,0 +1,32 @@
+{% extends "manage.html" %}
+
+{% block title %} Quiz List {% endblock title %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/show_quiz.js"></script>
+{% endblock %}
+
+{% block subtitle %} Quiz List {% endblock %}
+{% block manage %}
+{% 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 %}
+<form method="post" action="" name='frm'>
+{% csrf_token %}
+
+{% for quiz in quizzes %}
+<input type=checkbox name='quiz' value={{quiz.id}} />&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquiz/{{quiz.id}}/">{{ quiz.description }}</a><br>
+{% endfor %}
+
+<br><br>
+<button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz");'>Add New Quiz</button>&nbsp;&nbsp;
+<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);" >Edit Selected</button>&nbsp;&nbsp;
+<button class="btn" type="submit" name="delete" value='delete' onClick="return confirm_delete(frm);">Delete Selected</button>
+</form>
+{% endif %}
+
+{% endblock %}
diff --git a/testapp/templates/exam/showquestionpapers.html b/testapp/templates/exam/showquestionpapers.html
new file mode 100644
index 0000000..26b756d
--- /dev/null
+++ b/testapp/templates/exam/showquestionpapers.html
@@ -0,0 +1,19 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}List of Question Papers {% endblock %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script>
+{% endblock %}
+
+{% block manage %}
+<form name=frm action="" method="post">
+{% csrf_token %}
+{% for i in papers %}
+<input type="checkbox" name="papers" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/showquestionpapers/{{ i.id }}">{{ i.quiz.description }}</a><br>
+{% endfor %}
+<br>
+<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/showquestions.html b/testapp/templates/exam/showquestions.html
new file mode 100644
index 0000000..62b40e4
--- /dev/null
+++ b/testapp/templates/exam/showquestions.html
@@ -0,0 +1,21 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}List of Questions {% endblock %}
+
+{% block script %}
+<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script>
+{% endblock %}
+
+{% block manage %}
+<form name=frm action="" method="post">
+{% csrf_token %}
+{% for i in questions %}
+<input type="checkbox" name="question" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ i.id }}">{{ i }}</a><br>
+{% endfor %}
+<br>
+<button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button>&nbsp;&nbsp;
+<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button>&nbsp;&nbsp;
+<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
+</form>
+{% endblock %}
diff --git a/testapp/templates/exam/showusers.html b/testapp/templates/exam/showusers.html
new file mode 100644
index 0000000..01ecc37
--- /dev/null
+++ b/testapp/templates/exam/showusers.html
@@ -0,0 +1,26 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}
+List of Users
+{% endblock %}
+
+{% block css %}
+<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/showusers.css" type="text/css" />
+{% endblock css %}
+
+
+{% block manage %}
+<center><table style="text-align:left;" class=table-class border=3>
+<th>Username
+<th>First Name
+<th>Last Name
+<th>Quiz Description
+{% for papers in question %}
+<tr><td><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ papers.user.username }}">{{ papers.user.username }}</a><br>
+ <td >{{ papers.user.first_name.title }}
+ <td>{{ papers.user.last_name.title }}
+ <td>{{ papers.question_paper.quiz.description }}
+{% endfor %}
+</table></center>
+{% endblock %}
diff --git a/testapp/templates/exam/user_data.html b/testapp/templates/exam/user_data.html
index 9fb442a..61a3a97 100644
--- a/testapp/templates/exam/user_data.html
+++ b/testapp/templates/exam/user_data.html
@@ -1,11 +1,11 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
{% block title %} Data for user {{ data.user.get_full_name.title }} {% endblock title %}
-{% block content %}
-
-<h1> Data for user {{ data.user.get_full_name.title }} </h1>
+{% block manage %}
+{% block subtitle %}Data for user {{ data.user.get_full_name.title }}{% endblock %}
+<form action="" method="post">
<p>
Name: {{ data.user.get_full_name.title }} <br/>
Username: {{ data.user.username }} <br/>
@@ -21,7 +21,7 @@ Last login: {{ data.user.last_login }}
</p>
{% if data.papers %}
-<p><a href="{{URL_ROOT}}/exam/grade_user/{{ data.user.username }}/">
+<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}/">
Grade/correct paper</a>
</p>
@@ -66,19 +66,15 @@ User IP address: {{ paper.user_ip }}
{% endif %} {# if data.papers #}
<br />
<hr />
-<a href="{{URL_ROOT}}/exam/grade_user/{{ data.user.username }}/">
+<a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}/">
Grade/correct paper</a>
<br/>
{% if data.papers.count > 1 %}
-<a href="{{URL_ROOT}}/exam/monitor/">
- Monitor quiz</a>
+<a href="{{URL_ROOT}}/exam/manage/monitor/">Monitor quiz</a>
{% else %}
{% with data.papers.0 as paper %}
-<a href="{{URL_ROOT}}/exam/monitor/{{paper.quiz.id}}/">
- Monitor quiz</a>
+<a href="{{URL_ROOT}}/exam/manage/monitor/{{paper.quiz.id}}/">Monitor quiz</a>
{% endwith %}
{% endif %}
-<br />
-<a href="{{URL_ROOT}}/admin/">Admin</a>
-{% endblock content %}
+{% endblock %}