summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorprathamesh2016-04-01 18:03:57 +0530
committerprathamesh2016-04-01 18:03:57 +0530
commitc390fcc28c4499e0594b8ff49df283efc4043b26 (patch)
treee5df540af6cc44022a097ded249e671b04f7b1ba /yaksh/views.py
parent561168145ef75c0182ab0ee7d54779973b739e6c (diff)
downloadonline_test-c390fcc28c4499e0594b8ff49df283efc4043b26.tar.gz
online_test-c390fcc28c4499e0594b8ff49df283efc4043b26.tar.bz2
online_test-c390fcc28c4499e0594b8ff49df283efc4043b26.zip
Resolved minor issues after rebase
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index d06785f..314814d 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -689,7 +689,10 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
else:
# Display the same question if user_answer is None
if not user_answer:
+ ci = RequestContext(request)
msg = "Please submit a valid option or code"
+ context = {'question': question, 'error_message': msg,
+ 'paper': paper}
elif question.type == 'code' and user_answer:
msg = "Correct Output"
success = "True"
@@ -698,9 +701,6 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
'error_message': msg, 'success': success}
ci = RequestContext(request)
- context = {'question': question, 'error_message': msg,
- 'paper': paper}
- ci = RequestContext(request)
return my_render_to_response('yaksh/question.html', context,
context_instance=ci)
else: