summaryrefslogtreecommitdiff
path: root/testapp
diff options
context:
space:
mode:
authorhardythe12012-02-20 20:28:51 +0530
committerhardythe12012-02-20 20:28:51 +0530
commitc61396a219efb3b078094d028e41fe51bc857fe3 (patch)
treeeb423424f5428a60e0448ea5993d06fab63891d0 /testapp
parentf6a90c1eb603c9f3b8178102e387025880c0a5ac (diff)
downloadonline_test-c61396a219efb3b078094d028e41fe51bc857fe3.tar.gz
online_test-c61396a219efb3b078094d028e41fe51bc857fe3.tar.bz2
online_test-c61396a219efb3b078094d028e41fe51bc857fe3.zip
new file to manage quiz
Diffstat (limited to 'testapp')
-rw-r--r--testapp/templates/exam/show_quiz.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html
new file mode 100644
index 0000000..a113953
--- /dev/null
+++ b/testapp/templates/exam/show_quiz.html
@@ -0,0 +1,46 @@
+{% extends "manage.html" %}
+
+{% block title %} Quiz List {% endblock title %}
+
+{% block script %}
+<script type='text/javascript'>
+function my_confirm(frm)
+{
+ var r = confirm("Are you Sure ?");
+ if(r==false)
+ {
+ for(i=0;i<frm.quiz.length;i++)
+ {
+ frm.quiz[i].checked=false;
+ }
+ location.replace("{{URL_ROOT}}/exam/manage/showquiz");
+ }
+
+}
+
+</script>
+{% endblock %}
+
+{% block manage %}
+{% if not quizzes and not quiz %}
+<h1><center> Available Quiz </center></h1>
+
+<center><h5> No quizzes available. </h5></center>
+
+{% endif %}
+
+{# ############################################################### #}
+{# This is rendered when we are just viewing exam/monitor #}
+{% if quizzes %}
+<center><h3> List of Quizzes</h3></center>
+<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/monitor/{{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>
+</form>
+{% endif %}
+{% endblock %}