summaryrefslogtreecommitdiff
path: root/testapp/templates
diff options
context:
space:
mode:
authorhardythe12012-04-18 01:56:51 +0530
committerhardythe12012-04-18 01:56:51 +0530
commit6c0d75e784b87ed05e4c138110f987e88a37701b (patch)
tree6673608e0513a37b1766dedbad109fc4f73530ff /testapp/templates
parent9d0a737afdb23a50b28237055c87bfa72197d99b (diff)
downloadonline_test-6c0d75e784b87ed05e4c138110f987e88a37701b.tar.gz
online_test-6c0d75e784b87ed05e4c138110f987e88a37701b.tar.bz2
online_test-6c0d75e784b87ed05e4c138110f987e88a37701b.zip
changes for student interface
Diffstat (limited to 'testapp/templates')
-rw-r--r--testapp/templates/exam/add_quiz.html8
-rw-r--r--testapp/templates/exam/automatic_questionpaper.html2
-rw-r--r--testapp/templates/exam/complete.html2
-rw-r--r--testapp/templates/exam/intro.html2
-rw-r--r--testapp/templates/exam/question.html6
-rw-r--r--testapp/templates/exam/quit.html3
-rw-r--r--testapp/templates/exam/quizzes_user.html18
-rw-r--r--testapp/templates/exam/results_user.html23
-rw-r--r--testapp/templates/user.html58
9 files changed, 113 insertions, 9 deletions
diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html
index c8e1ac3..2667c0c 100644
--- a/testapp/templates/exam/add_quiz.html
+++ b/testapp/templates/exam/add_quiz.html
@@ -13,7 +13,11 @@
<script type='text/javascript'>
function test()
{
- document.getElementById('id_description').onFocus="javascript:test2()";
+
+ if (document.getElementById("id_description").value != "")
+ {
+ document.getElementById("submit").innerHTML = "Save";
+ }
}
</script>
@@ -28,7 +32,7 @@
</table>
</center>
- <center><button class="btn" type="submit" name="questionpaper">Design Question Paper</button>
+ <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
index b961711..b8f76b4 100644
--- a/testapp/templates/exam/automatic_questionpaper.html
+++ b/testapp/templates/exam/automatic_questionpaper.html
@@ -34,7 +34,7 @@ function load_data()
{% endblock %}
{% block manage %}
-<center><b>Automotic mode to design the Question Paper</center><br>
+<center><b>Automatic mode to design the Question Paper</center><br>
<form action="" method="post" name=frm>
{% csrf_token %}
diff --git a/testapp/templates/exam/complete.html b/testapp/templates/exam/complete.html
index a2e673b..1d5df3c 100644
--- a/testapp/templates/exam/complete.html
+++ b/testapp/templates/exam/complete.html
@@ -4,7 +4,7 @@
{% block pagetitle %}Online Test{% endblock %}
{% block content %}
-
+{% csrf_token %}
<center><h2> Good bye! </h2></center>
<center><h4> {{message}} </h4></center>
<center><h4>You may now close the browser.</h4></center><br>
diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html
index afa596b..ec1888a 100644
--- a/testapp/templates/exam/intro.html
+++ b/testapp/templates/exam/intro.html
@@ -27,7 +27,7 @@
</ul>
<p> We hope you enjoy taking this exam !!!</p>
- <form action="{{URL_ROOT}}/exam/start/" method="post" align="center">
+ <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>
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 87ed40d..584ab72 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -70,9 +70,9 @@
<ul>
<li> <h5><a> Hi {{user.first_name.title}} {{user.last_name.title}} </a></h5>
</ul>
- <form id="logout" action="{{URL_ROOT}}/exam/quit/" method="post" class="pull-right">
+ <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 and Logout</button> </li>
+ <button class="btn" type="submit" name="quit">Quit Exam</button> </li>
</form>
</div>
@@ -85,7 +85,7 @@
{% 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/" method="post">
+ <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 %}
diff --git a/testapp/templates/exam/quit.html b/testapp/templates/exam/quit.html
index 40a0a92..3f7630d 100644
--- a/testapp/templates/exam/quit.html
+++ b/testapp/templates/exam/quit.html
@@ -6,7 +6,8 @@
<center><h4>Your current answers are saved.</h4></center>
<center><h4> Are you sure you wish to quit the exam?</h4></center>
- <form action="{{URL_ROOT}}/exam/complete/" method="post">
+ <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="submit" name="no">No!</button></center>
</form>
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/results_user.html b/testapp/templates/exam/results_user.html
new file mode 100644
index 0000000..75d168d
--- /dev/null
+++ b/testapp/templates/exam/results_user.html
@@ -0,0 +1,23 @@
+{% extends "user.html" %}
+
+
+{% block subtitle %}Results for {{ papers.user.first_name }}{% 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>
+ {% for paper in papers %}
+ {% for i in paper %}
+ {{ i }}
+ {% endfor %}
+ <br>
+ {% endfor %}
+ </center>
+</form>
+{% endblock %}
+
diff --git a/testapp/templates/user.html b/testapp/templates/user.html
new file mode 100644
index 0000000..22a9fac
--- /dev/null
+++ b/testapp/templates/user.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>
+ {% block title %}
+ {% endblock %}
+ </title>
+
+ {% block meta %}
+ <meta charset="utf-8">
+ <meta name="description" content="">
+ <meta name="author" content="">
+ {% endblock %}
+
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/base.css" type="text/css" />
+ {% block css %}
+ {% endblock %}
+
+ {% block script %}
+ {% endblock %}
+ </head>
+
+<body {% block onload %}{% endblock %}>
+<div class="topbar">
+ <div class="fill">
+ <div class="container">
+ <h3 class="brand"><strong>Online Test</h3></strong>
+ <ul>
+ <li><a href="{{ URL_ROOT }}/exam/quizzes">Quizzes</a></li>
+ <li><a href="{{ URL_ROOT }}/exam/results">Results</a></li>
+ </ul>
+ <ul style="float:right;">
+ <li><strong><a style='cursor:pointer' onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</a></strong></li>
+ </ul>
+ </div>
+ </div>
+</div>
+ <div class="container">
+ <div class="content">
+ <div class="page-header">
+ <h3><center>{% block subtitle %}Welcome {{ user.first_name.title }} {{user.last_name.title}} {% endblock %}</center></h3><br>
+ </div>
+ <div class=row>
+ <div class=span14>
+ {% block manage %}
+ {% endblock %}
+ </div>
+ </div>
+ </div>
+ <footer>
+ <p>&copy; FOSSEE group, IIT Bombay</p>
+ </footer>
+ </div>
+
+</body>
+</html>