diff options
Diffstat (limited to 'testapp')
-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 ; } |