summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2020-09-23 18:01:04 +0530
committeradityacp2020-09-23 18:01:04 +0530
commit7589f9838ac5080a5f2fb5f9c92522bc722ab80b (patch)
tree8f7739f823914a77bce0bfebeeb9e2a8af1a0c98 /yaksh/views.py
parent3130680c9a405cbaa77108a48d3923790920b2e3 (diff)
downloadonline_test-7589f9838ac5080a5f2fb5f9c92522bc722ab80b.tar.gz
online_test-7589f9838ac5080a5f2fb5f9c92522bc722ab80b.tar.bz2
online_test-7589f9838ac5080a5f2fb5f9c92522bc722ab80b.zip
Add more tests
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py21
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: