diff options
author | ankitjavalkar | 2015-03-18 12:16:20 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-04-26 19:46:00 +0530 |
commit | 28ba37e907553aeac3841e221853683b9171f0db (patch) | |
tree | 9926315f93ac82fb21ae1f98450cfa031da8f996 /testapp/exam/static | |
parent | a88e59fa419d7ab31aa430e7424ff0a25169713f (diff) | |
download | online_test-28ba37e907553aeac3841e221853683b9171f0db.tar.gz online_test-28ba37e907553aeac3841e221853683b9171f0db.tar.bz2 online_test-28ba37e907553aeac3841e221853683b9171f0db.zip |
Changes to Question model, Views, Add-Question UI
- ref_code_path is now part of Question model
- MCQ/MCC answers checked using solution field in question model
- Formset should reload even after errors
- add_question page chould display solution field only in MCQ/MCC
Diffstat (limited to 'testapp/exam/static')
-rw-r--r-- | testapp/exam/static/exam/js/add_question.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/testapp/exam/static/exam/js/add_question.js b/testapp/exam/static/exam/js/add_question.js index 267cdb2..5a94f4c 100644 --- a/testapp/exam/static/exam/js/add_question.js +++ b/testapp/exam/static/exam/js/add_question.js @@ -153,13 +153,17 @@ function textareaformat() if(value == 'mcq' || value == 'mcc') { document.getElementById('id_options').style.visibility='visible'; - document.getElementById('label_option').innerHTML="Options :" + document.getElementById('label_option').innerHTML="Options :"; + document.getElementById('id_solution').style.visibility='visible'; + document.getElementById('label_solution').innerHTML="Solutions :"; } else { document.getElementById('id_options').style.visibility='hidden'; document.getElementById('label_option').innerHTML = ""; + document.getElementById('id_solution').style.visibility='hidden'; + document.getElementById('label_solution').innerHTML="" } }); document.getElementById('my').innerHTML = document.getElementById('id_description').value ; @@ -168,12 +172,16 @@ function textareaformat() { document.getElementById('id_options').style.visibility='visible'; document.getElementById('label_option').innerHTML="Options :" + document.getElementById('id_solution').style.visibility='visible'; + document.getElementById('label_solution').innerHTML="Solutions :"; } else { document.getElementById('id_options').style.visibility='hidden'; document.getElementById('label_option').innerHTML = ""; + document.getElementById('id_solution').style.visibility='hidden'; + document.getElementById('label_solution').innerHTML="" } } @@ -189,8 +197,9 @@ function autosubmit() if(type.value == 'select') { type.style.border = 'solid red'; - return false; - } + return false; + } + if (type.value == 'mcq' || type.value == 'mcc') { |