summaryrefslogtreecommitdiff
path: root/testapp/templates/exam
diff options
context:
space:
mode:
authorjayparikh1112012-03-13 18:44:01 +0530
committerjayparikh1112012-03-13 18:44:01 +0530
commita7c84a478789e9e835dcbb3ea41b1d519ba69b4d (patch)
treefc879bdd0b0eb58817275c0837126a06be81f96e /testapp/templates/exam
parent87862b8c8d7822a4578b5cb5f413bedb37454bd2 (diff)
downloadonline_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.tar.gz
online_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.tar.bz2
online_test-a7c84a478789e9e835dcbb3ea41b1d519ba69b4d.zip
minor changes for UI
Diffstat (limited to 'testapp/templates/exam')
-rw-r--r--testapp/templates/exam/add_quiz.html14
-rw-r--r--testapp/templates/exam/edit_question.html40
-rw-r--r--testapp/templates/exam/edit_quiz.html21
-rw-r--r--testapp/templates/exam/grade_user.html29
-rw-r--r--testapp/templates/exam/monitor.html18
-rw-r--r--testapp/templates/exam/show_quiz.html5
-rw-r--r--testapp/templates/exam/user_data.html4
7 files changed, 98 insertions, 33 deletions
diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html
index dedc627..fe99ce6 100644
--- a/testapp/templates/exam/add_quiz.html
+++ b/testapp/templates/exam/add_quiz.html
@@ -6,9 +6,18 @@
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
{% endblock %}
+{% block script %}
+<script type='text/javascript'>
+ function test()
+ {
+ document.getElementById('id_description').onFocus="javascript:test2()";
+ }
+</script>
+{% endblock %}
+{% block onload %} onload="javascript:test();" {% endblock %}
{% block manage %}
-<form name=frm action="" method="post">
+<form name=frm id=frm action="" method="post" >
{% csrf_token %}
<center>
<table class=span1>
@@ -16,6 +25,7 @@
</table>
</center>
<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>
+ <button class="btn" type="button" name="button" onClick="javascript:test()">Cancel</button> </center>
+ <!--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/edit_question.html b/testapp/templates/exam/edit_question.html
index a189ac5..b1395e9 100644
--- a/testapp/templates/exam/edit_question.html
+++ b/testapp/templates/exam/edit_question.html
@@ -15,15 +15,49 @@ function my_render(frm)
}
}
+function load_form()
+{
+
+}
+
+function data(showContent,showHideDiv)
+{
+ var con = document.getElementById(showContent);
+ var ele=document.getElementById(showHideDiv);
+ if (ele.style.display=="block")
+ {
+ con.style.display = "none"
+ ele.style.display = "none";
+ }
+ else
+ {
+ con.style.display = "block";
+ ele.style.display = "block";
+ }
+}
</script>
{% endblock %}
+{% block onload %} onload='javascript:load_form();' {% endblock %}
{% block manage %}
<form name='frm' action="{{URL_ROOT}}/exam/manage/editquestion/" method="post" onKeyPress='javascript:my_render(frm);'>
{% csrf_token %}
- {% for form in forms %}
-<b>Look of Question in HTML Format :</b>
+ {% for form in forms %}
+
+ {{ form.summary.value }}<a onClick="data('contentDiv{{forloop.counter}}','myContent{{forloop.counter}}');" style='cursor:pointer;'>Show</a> <br>
+ <b>Look of Question in HTML Format :</b>
<p id='{{forloop.counter}}'></p>
+ <div id="contentDiv{{forloop.counter}}">
+ <div id="myContent{{forloop.counter}}" style="display: none;">
+ <table> {{ form.as_table }} </table>
+
+ </div>
+ </div>
+ <hr>
+ {% endfor %}
+
+ {% for form in forms %}
+
<table class=span1>
{{ form.as_table }}
</table>
@@ -32,5 +66,7 @@ function my_render(frm)
<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
index 56eb0c0..d513e7a 100644
--- a/testapp/templates/exam/edit_quiz.html
+++ b/testapp/templates/exam/edit_quiz.html
@@ -5,19 +5,30 @@
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
+<style type='text/css'>
+table th, table td
+ {
+ text-align: center;
+ }
+</style>
{% endblock %}
{% block manage %}
<form name=frm action="{{URL_ROOT}}/exam/manage/editquiz/" method="post">
{% csrf_token %}
- {% for form in forms %}
<center>
- <table class=span1>
- {{ form.as_table }}
+ <table>
+ <tr>
+ <td><strong> Start Date <td><strong> Duration <td> <strong>Active <td> <strong>Description </strong>
+ </tr>
+ {% for form in forms %}
+
+ <tr>
+ <td> {{ form.start_date}} <td> {{ form.duration }} <td> {{ form.active }} <td> {{ form.description }}
+ </tr>
+ {% endfor %}
</table>
</center>
- <hr>
- {% 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>
diff --git a/testapp/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html
index b7970e8..c6f6343 100644
--- a/testapp/templates/exam/grade_user.html
+++ b/testapp/templates/exam/grade_user.html
@@ -10,17 +10,20 @@
{% block script %}
<script type='text/javascript'>
-function hidedata(showHideDiv) {
- var ele = document.getElementById(showHideDiv);
- ele.style.display = "none";
-
-
-}
-function showdata(showHideDiv)
+function data(showContent,showHideDiv)
{
- var ele = document.getElementById(showHideDiv);
- ele.style.display = "block";
-
+ var con = document.getElementById(showContent);
+ var ele=document.getElementById(showHideDiv);
+ if (ele.style.display=="block")
+ {
+ con.style.display = "none"
+ ele.style.display = "none";
+ }
+ else
+ {
+ con.style.display = "block";
+ ele.style.display = "block";
+ }
}
</script>
{% endblock %}
@@ -56,9 +59,9 @@ Start time: {{ paper.start_time }} <br/>
{% csrf_token %}
{% for question, answers in paper.get_question_answers.items %}
<p><strong>
- <a id='myHeader' href="{{URL_ROOT}}/admin/exam/question/{{question.id}}" onMouseOver="javascript:showdata('myContent{{question.id}}','myHeader');" onMouseOut="javascript:hidedata('myContent{{question.id}}','myHeader');"> Question: {{ question.id }}. {{ question.summary }} </a> (Points: {{ question.points }})</strong> </p>
-<div style="clear:both;"></div>
-<div id="contentDiv">
+ Question: {{ question.id }}. {{ question.summary }} <font color='red'><img style="cursor: pointer" alt='...' onClick="data('contentDiv{{question.id}}','myContent{{question.id}}');"></font>
+ (Points: {{ question.points }})</strong> </p>
+<div id="contentDiv{{question.id}}" style="display:none;">
<div id="myContent{{question.id}}" style="display: none;">
<p> Description : {{ question.description }} </p>
<p> Points : {{ question.points }} </p>
diff --git a/testapp/templates/exam/monitor.html b/testapp/templates/exam/monitor.html
index 9385e73..29cb6e9 100644
--- a/testapp/templates/exam/monitor.html
+++ b/testapp/templates/exam/monitor.html
@@ -7,17 +7,25 @@
{% 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 %}
- <h1><center> Quiz results </center></h1>
- <center><h5> No quizzes available. </h5></center>
+ <center><h5> No quizzes available. </h5></center>
{% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor #}
{% if quizzes %}
-<center><h1> Available quizzes </h1></center>
<ul>
{% for quiz in quizzes %}
<li><a href="{{URL_ROOT}}/exam/manage/monitor/{{quiz.id}}/">{{ quiz.description }}</a></li>
@@ -28,7 +36,6 @@
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor/quiz_num #}
{% if quiz %}
-<center><h1> {{ quiz.description }} results </h1></center>
{% if papers %}
{# <p> Quiz: {{ quiz_name }}</p> #}
@@ -59,5 +66,4 @@
<p> No answer papers so far. </p>
{% endif %} {# if papers #}
{% endif %}
-<a href="{{URL_ROOT}}/admin/">Admin</a>
{% endblock %}
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html
index e6aecd6..684cfd2 100644
--- a/testapp/templates/exam/show_quiz.html
+++ b/testapp/templates/exam/show_quiz.html
@@ -27,19 +27,18 @@
if(n == frm.quiz.length)
location.replace("{{URL_ROOT}}/exam/manage/showquiz");
}
+
</script>
{% endblock %}
-
+{% block subtitle %} Quiz List {% endblock %}
{% block manage %}
{% if not quizzes and not quiz %}
-<h5><center> Available Quiz </center></h5>
<center><h5> No quizzes available. </h5></center>
{% endif %}
{# ############################################################### #}
{# This is rendered when we are just viewing exam/monitor #}
{% if quizzes %}
-<center><h3>Quiz List</h3></center>
<form method="post" action="" name='frm'>
{% csrf_token %}
diff --git a/testapp/templates/exam/user_data.html b/testapp/templates/exam/user_data.html
index fad0310..61a3a97 100644
--- a/testapp/templates/exam/user_data.html
+++ b/testapp/templates/exam/user_data.html
@@ -21,7 +21,7 @@ Last login: {{ data.user.last_login }}
</p>
{% if data.papers %}
-<p><a href="{{URL_ROOT}}/exam/manage/grade_user/{{ data.user.username }}/">
+<p><a href="{{URL_ROOT}}/exam/manage/gradeuser/{{ data.user.username }}/">
Grade/correct paper</a>
</p>
@@ -66,7 +66,7 @@ User IP address: {{ paper.user_ip }}
{% endif %} {# if data.papers #}
<br />
<hr />
-<a href="{{URL_ROOT}}/exam/manage/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 %}