summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/show_quiz.html
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/templates/exam/show_quiz.html')
-rw-r--r--testapp/templates/exam/show_quiz.html15
1 files changed, 14 insertions, 1 deletions
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 %}