diff options
author | Prabhu Ramachandran | 2017-03-20 18:51:47 +0530 |
---|---|---|
committer | GitHub | 2017-03-20 18:51:47 +0530 |
commit | 6a09816d66f9f24c0dba275d0dd3aaf7289eb73b (patch) | |
tree | ca1bbe5db8a96c7444a11f26400612601cde4757 /yaksh/static | |
parent | 23ecd8fa33e7fa2e953aa9715ae45a2869a044a0 (diff) | |
parent | 81a70c486823149b009627eb0194618ceeeb2369 (diff) | |
download | online_test-6a09816d66f9f24c0dba275d0dd3aaf7289eb73b.tar.gz online_test-6a09816d66f9f24c0dba275d0dd3aaf7289eb73b.tar.bz2 online_test-6a09816d66f9f24c0dba275d0dd3aaf7289eb73b.zip |
Merge pull request #228 from adityacp/fixes
Ordering Questions while creating Question Paper
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/question_paper_creation.js | 14 |
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 |