diff options
author | Prabhu Ramachandran | 2014-06-27 22:36:02 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2014-06-27 22:36:02 +0530 |
commit | 3c1880ffc5edc2d58f890cc32d36f1717082395a (patch) | |
tree | 15ad3a81f86e5c362262b0744e70ae7a6d4d058b /testapp/static/exam | |
parent | 6f27cd40d63300e3294e170daee8c058788c5fa0 (diff) | |
parent | c7a2f3c83f0d53741e53e0e21276aefaea8a5c28 (diff) | |
download | online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.tar.gz online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.tar.bz2 online_test-3c1880ffc5edc2d58f890cc32d36f1717082395a.zip |
Merge pull request #28 from prathamesh920/multiple_correct_type
Multiple correct type
Diffstat (limited to 'testapp/static/exam')
-rw-r--r-- | testapp/static/exam/js/add_question.js | 6 | ||||
-rw-r--r-- | testapp/static/exam/js/edit_question.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/testapp/static/exam/js/add_question.js b/testapp/static/exam/js/add_question.js index 56fdd1f..267cdb2 100644 --- a/testapp/static/exam/js/add_question.js +++ b/testapp/static/exam/js/add_question.js @@ -150,7 +150,7 @@ function textareaformat() $('#id_type').bind('change',function(event){ var value = document.getElementById('id_type').value; - if(value == 'mcq') + if(value == 'mcq' || value == 'mcc') { document.getElementById('id_options').style.visibility='visible'; document.getElementById('label_option').innerHTML="Options :" @@ -164,7 +164,7 @@ function textareaformat() }); document.getElementById('my').innerHTML = document.getElementById('id_description').value ; var value = document.getElementById('id_type').value; - if(value == 'mcq') + if(value == 'mcq' || value == 'mcc') { document.getElementById('id_options').style.visibility='visible'; document.getElementById('label_option').innerHTML="Options :" @@ -192,7 +192,7 @@ function autosubmit() return false; } - if (type.value == 'mcq') + if (type.value == 'mcq' || type.value == 'mcc') { var value = document.getElementById('id_options').value; if(value.split('\n').length < 4) diff --git a/testapp/static/exam/js/edit_question.js b/testapp/static/exam/js/edit_question.js index c5df631..7a0f56d 100644 --- a/testapp/static/exam/js/edit_question.js +++ b/testapp/static/exam/js/edit_question.js @@ -171,7 +171,7 @@ function textareaformat() var option_id = document.getElementById('id_options' + i); option_id.onfocus = gainfocus; option_id.onblur = lostfocus; - if(value != 'mcq') + if(value == 'code' ) { document.getElementById('id_options'+i).style.visibility='hidden'; document.getElementById('label_option'+(i+1)).innerHTML = ""; @@ -206,7 +206,7 @@ function showOptions(e) { var value = this.value; var no = parseInt(this.id.substring(this.id.length-1)); - if( value == 'mcq') + if( value == 'mcq' || value == 'mcc') { document.getElementById('id_options'+no).style.visibility = 'visible'; document.getElementById('label_option'+ (no+1)).innerHTML = "Options : " @@ -256,7 +256,7 @@ function autosubmit() return false; } - if (document.getElementById('id_type' + i).value != 'mcq') + if (document.getElementById('id_type' + i).value == 'code') { continue; } |