diff options
author | hardythe1 | 2012-02-20 19:51:32 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-20 19:51:32 +0530 |
commit | e8ba4ba5301a805194a555f52275407f045b91ab (patch) | |
tree | bbd692afcea096f3aea4026152bce5ff33db245a /testapp | |
parent | 24e5101972e846ac800932a4721f7e93bf5bdb1b (diff) | |
download | online_test-e8ba4ba5301a805194a555f52275407f045b91ab.tar.gz online_test-e8ba4ba5301a805194a555f52275407f045b91ab.tar.bz2 online_test-e8ba4ba5301a805194a555f52275407f045b91ab.zip |
New file to manage questions
Diffstat (limited to 'testapp')
-rw-r--r-- | testapp/templates/exam/showquestions.html | 35 |
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 }}"> <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> +<button class="btn" type="submit" onClick="my_confirm(frm);">Delete</button> +</form> +{% endblock %} |