summaryrefslogtreecommitdiff
path: root/testapp/templates
diff options
context:
space:
mode:
authorhardythe12012-02-23 18:49:36 +0530
committerhardythe12012-02-23 18:49:36 +0530
commitdd3fd7b8c58d836baba24441e7d55c6d51858eab (patch)
tree7500dd2e40934f311a5f2cf505ad442946afee71 /testapp/templates
parent9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0 (diff)
downloadonline_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.tar.gz
online_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.tar.bz2
online_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.zip
View for Editing Quiz
Diffstat (limited to 'testapp/templates')
-rw-r--r--testapp/templates/exam/edit_quiz.html31
-rw-r--r--testapp/templates/exam/show_quiz.html15
-rw-r--r--testapp/templates/exam/user_data.html28
3 files changed, 49 insertions, 25 deletions
diff --git a/testapp/templates/exam/edit_quiz.html b/testapp/templates/exam/edit_quiz.html
new file mode 100644
index 0000000..7744623
--- /dev/null
+++ b/testapp/templates/exam/edit_quiz.html
@@ -0,0 +1,31 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}
+Edit Quiz(zes)
+{% endblock %}
+
+{% block manage %}
+
+<style type='text/css'>
+
+table th, table td {
+ padding: 10px 10px 9px;
+ line-height: 18px;
+ text-align: left;
+}
+</style>
+<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>
+</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>
+{% endblock %}
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html
index 001b2fe..d546b06 100644
--- a/testapp/templates/exam/show_quiz.html
+++ b/testapp/templates/exam/show_quiz.html
@@ -17,6 +17,17 @@ function my_confirm(frm)
}
}
+function confirm_edit(frm)
+{
+ var n = 0;
+ for (var i =0;i<frm.quiz.length;i++)
+ {
+ if (frm.quiz[i].checked == false)
+ n = n + 1 ;
+ }
+ if(n == frm.quiz.length)
+ location.replace("{{URL_ROOT}}/exam/manage/showquiz");
+}
</script>
{% endblock %}
@@ -39,7 +50,9 @@ function my_confirm(frm)
<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="delete" onClick="my_confirm(frm);">Delete</button>
+<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="confirm_edit(frm);" >Edit Selected</button>&nbsp;&nbsp;
+<button class="btn" type="submit" name="delete" value='delete' onClick="my_confirm(frm);">Delete Selected</button>
</form>
{% endif %}
{% endblock %}
diff --git a/testapp/templates/exam/user_data.html b/testapp/templates/exam/user_data.html
index c835f61..943dfe8 100644
--- a/testapp/templates/exam/user_data.html
+++ b/testapp/templates/exam/user_data.html
@@ -1,20 +1,11 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
{% block title %} Data for user {{ data.user.get_full_name.title }} {% endblock title %}
-{% block content %}
+{% block manage %}
- <div class="container">
- <div class="content">
-<div class="page-header">
-<h1><Strong><center>Online Test</center></strong></h1>
-</div>
- <div class=row>
- <div class=span14>
-<h3><center>Data for user {{ data.user.get_full_name.title }}</center></h3><br>
+{% 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/>
@@ -87,16 +78,5 @@ User IP address: {{ paper.user_ip }}
Monitor quiz</a>
{% endwith %}
{% endif %}
-<br />
-<a href="{{URL_ROOT}}/admin/">Admin</a>
-
-</div>
- </div>
- </div>
-<footer>
- <p>&copy; FOSSEE group, IIT Bombay</p>
- </footer>
-
- </div> <!-- /container -->
-{% endblock content %}
+{% endblock %}