summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/showquestions.html
diff options
context:
space:
mode:
authorhardythe12012-02-20 19:51:32 +0530
committerhardythe12012-02-20 19:51:32 +0530
commite8ba4ba5301a805194a555f52275407f045b91ab (patch)
treebbd692afcea096f3aea4026152bce5ff33db245a /testapp/templates/exam/showquestions.html
parent24e5101972e846ac800932a4721f7e93bf5bdb1b (diff)
downloadonline_test-e8ba4ba5301a805194a555f52275407f045b91ab.tar.gz
online_test-e8ba4ba5301a805194a555f52275407f045b91ab.tar.bz2
online_test-e8ba4ba5301a805194a555f52275407f045b91ab.zip
New file to manage questions
Diffstat (limited to 'testapp/templates/exam/showquestions.html')
-rw-r--r--testapp/templates/exam/showquestions.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/testapp/templates/exam/showquestions.html b/testapp/templates/exam/showquestions.html
new file mode 100644
index 0000000..38d4bcc
--- /dev/null
+++ b/testapp/templates/exam/showquestions.html
@@ -0,0 +1,35 @@
+{% extends "manage.html" %}
+
+
+{% block subtitle %}
+List of Questions
+{% endblock %}
+
+{% block script %}
+<script type='text/javascript'>
+function my_confirm(frm)
+{
+ var r = confirm("Are you Sure ?");
+ if(r==false)
+ {
+ for(i=0;i<frm.question.length;i++)
+ {
+ frm.question[i].checked=false;
+ }
+ location.replace("{{URL_ROOT}}/exam/manage/showquestion");
+ }
+}
+</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/showquestions/{{ 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" onClick="my_confirm(frm);">Delete</button>
+</form>
+{% endblock %}