summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/showquestions.html
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/templates/exam/showquestions.html')
-rw-r--r--testapp/templates/exam/showquestions.html18
1 files changed, 16 insertions, 2 deletions
diff --git a/testapp/templates/exam/showquestions.html b/testapp/templates/exam/showquestions.html
index 994ca26..edcba6f 100644
--- a/testapp/templates/exam/showquestions.html
+++ b/testapp/templates/exam/showquestions.html
@@ -7,7 +7,7 @@ List of Questions
{% block script %}
<script type='text/javascript'>
-function my_confirm(frm)
+function confirm_delete(frm)
{
var r = confirm("Are you Sure ?");
if(r==false)
@@ -19,6 +19,18 @@ function my_confirm(frm)
location.replace("{{URL_ROOT}}/exam/manage/showquestion");
}
}
+function confirm_edit(frm)
+{
+ var n = 0;
+ for(i=0;i<frm.question.length;i++)
+ {
+ if(frm.question[i].checked==true)
+ n = n+1;
+ }
+ if(n==0)
+ location.replace("{{URL_ROOT}}/exam/manage/showquestion");
+
+}
</script>
{% endblock %}
@@ -30,6 +42,8 @@ function my_confirm(frm)
{% 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>
+<button class="btn" type="submit" name='edit' value='edit' onClick="confirm_edit(frm);">Edit Selected</button>&nbsp;&nbsp;
+<button class="btn" type="submit" onClick="confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
+
</form>
{% endblock %}