summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/show_quiz.html
diff options
context:
space:
mode:
authorhardythe12012-02-23 18:49:36 +0530
committerhardythe12012-02-23 18:49:36 +0530
commitdd3fd7b8c58d836baba24441e7d55c6d51858eab (patch)
tree7500dd2e40934f311a5f2cf505ad442946afee71 /testapp/templates/exam/show_quiz.html
parent9acff5f2cf9f9ae3d2fc097e1fcd84712d3199d0 (diff)
downloadonline_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.tar.gz
online_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.tar.bz2
online_test-dd3fd7b8c58d836baba24441e7d55c6d51858eab.zip
View for Editing Quiz
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 %}