diff options
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index d909627..4c3b4a6 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -3710,9 +3710,10 @@ def add_marker_quiz(request, content_type, course_id, lesson_id, context['message'] = 'Saved question successfully' context['content_type'] = content_type else: - status_code = 400 + status_code = 200 context['success'] = False - context['message'] = "Error in saving form" + context['message'] = "Error in saving."\ + " Please check the question test cases" else: status_code = 400 context['success'] = False @@ -3880,14 +3881,14 @@ def submit_marker_quiz(request, course_id, toc_id): # call check answer only for graded quiz and exercise if toc.content == 3 or toc.content == 2: result = lesson_ans.check_answer(user_answer) - # if exercise then show custom message - if toc.content == 3: - if result.get("success"): - msg = "You answered the question correctly" - else: - success = False - msg = "You have answered the question incorrectly. "\ - "Please refer the lesson again" + # if exercise then show custom message + if toc.content == 3: + if result.get("success"): + msg = "You answered the question correctly" + else: + success = False + msg = "You have answered the question incorrectly. "\ + "Please refer the lesson again" else: msg = "You have already submitted the answer" else: |