summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
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