diff options
author | Hardik Ghaghada | 2013-04-04 15:13:38 +0530 |
---|---|---|
committer | Hardik Ghaghada | 2013-04-04 15:13:38 +0530 |
commit | 0890351ba31dfe3904ff0f064ce9316405473cd3 (patch) | |
tree | de30c47972543b0d0c28afde8a1321c8a2a343af /testapp/static/exam/js | |
parent | c12f20984aa75751af89a0d6213bc35924bc593b (diff) | |
download | online_test-0890351ba31dfe3904ff0f064ce9316405473cd3.tar.gz online_test-0890351ba31dfe3904ff0f064ce9316405473cd3.tar.bz2 online_test-0890351ba31dfe3904ff0f064ce9316405473cd3.zip |
Edited JavaScript to resolve a small malfunction
Diffstat (limited to 'testapp/static/exam/js')
-rw-r--r-- | testapp/static/exam/js/add_question.js | 4 | ||||
-rw-r--r-- | testapp/static/exam/js/edit_question.js | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/testapp/static/exam/js/add_question.js b/testapp/static/exam/js/add_question.js index 1f08c79..24af127 100644 --- a/testapp/static/exam/js/add_question.js +++ b/testapp/static/exam/js/add_question.js @@ -98,9 +98,9 @@ function autosubmit() if (document.getElementById('id_type').value == 'mcq') { var value = document.getElementById('id_options').value; - if(value.split('\n').length != 4) + if(value.split('\n').length < 4) { - alert("Enter 4 options. One option per line."); + alert("Please Enter 4 options. One option per line."); return false; } return true; diff --git a/testapp/static/exam/js/edit_question.js b/testapp/static/exam/js/edit_question.js index 69e0d97..09cd842 100644 --- a/testapp/static/exam/js/edit_question.js +++ b/testapp/static/exam/js/edit_question.js @@ -156,9 +156,11 @@ function autosubmit() } else { + alert("hello") count_mcq = count_mcq + 1; var options = document.getElementById('id_options' + i).value; var total_words = options.split("\n").length ; + alert(total_words) if ( total_words < 4) empty_options = empty_options + 1 ; } |