summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorprathamesh2017-08-31 16:28:57 +0530
committerprathamesh2017-09-01 15:45:06 +0530
commit3d9bce5471d04bf50e03155d3cd67bdae44a4fcc (patch)
tree8e4eb5f574754b28bf2fcb441f085155c3eaa0af /yaksh/views.py
parent055d0d1c51f90b4496a096a13bab5e4978fe9b92 (diff)
downloadonline_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.tar.gz
online_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.tar.bz2
online_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.zip
updated travis config and added print to debug on travis
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index fc550ed..dd50d24 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -475,6 +475,7 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
current_question = get_object_or_404(Question, pk=q_id)
if request.method == 'POST':
+ print("check post")
# Add the answer submitted, regardless of it being correct or not.
if current_question.type == 'mcq':
user_answer = request.POST.get('answer')
@@ -558,6 +559,8 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
result)
return show_question(request, next_question, paper, error_message)
else:
+ print("post response")
+ print(result)
return JsonResponse(result)
else:
next_question, error_message, paper = _update_paper(request, uid, result)
@@ -576,6 +579,7 @@ def get_results(request, uid):
result = json.loads(result_state.get('result'))
next_question, error_message, paper = _update_paper(request, uid, result)
return show_question(request, next_question, paper, error_message)
+ print("get result")
return JsonResponse(result)