summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authoradityacp2017-02-22 14:58:12 +0530
committeradityacp2017-03-10 15:41:07 +0530
commit344b6441017f72225a0d89f41c6cde38f4bbe187 (patch)
tree147e8f10c44ab1edafeec35c34b3e488e9d395e8 /yaksh/static
parentce7238aef6d5080d8f7ea79b96c9569bf191f0b8 (diff)
downloadonline_test-344b6441017f72225a0d89f41c6cde38f4bbe187.tar.gz
online_test-344b6441017f72225a0d89f41c6cde38f4bbe187.tar.bz2
online_test-344b6441017f72225a0d89f41c6cde38f4bbe187.zip
Allow moderator to select questions in any order required
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/question_paper_creation.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/question_paper_creation.js b/yaksh/static/yaksh/js/question_paper_creation.js
index 898e491..430ec4b 100644
--- a/yaksh/static/yaksh/js/question_paper_creation.js
+++ b/yaksh/static/yaksh/js/question_paper_creation.js
@@ -46,4 +46,18 @@ $(document).ready(function(){
$("#random").click();
});
+ var checked_vals = [];
+ $('input:checkbox[name="questions"]').click(function() {
+ if($(this).prop("checked") == true){
+ checked_vals.push(parseInt($(this).val()));
+ }
+ else{
+ checked_vals.pop(parseInt($(this).val()));
+ }
+ });
+ $('#design_q').submit(function(eventObj) {
+ $(this).append('<input type="hidden" name="checked_ques" value='+checked_vals+'>');
+ return true;
+});
+
});//document