summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authormahesh2018-01-16 01:13:49 +0530
committermaheshgudi2018-03-16 15:15:50 +0530
commit98775e565c99fd6486fb5908a5ca9be491db9b1c (patch)
treea9ba8019171ee6b2a030c55fc82da4d7527066ac /yaksh/views.py
parent6aeda97b5f37fc7ce50b7fd1f1e0465c42ba0969 (diff)
downloadonline_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.tar.gz
online_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.tar.bz2
online_test-98775e565c99fd6486fb5908a5ca9be491db9b1c.zip
Add test case order in view_answerpaper
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 17cfb13..27a07d2 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -616,7 +616,10 @@ def show_question(request, question, paper, error_message=None, notification=Non
if question.type == "code" else
'You have already attempted this question'
)
- test_cases = question.get_ordered_test_cases(paper)
+ if question.type in ['mcc', 'mcq']:
+ test_cases = question.get_ordered_test_cases(paper)
+ else:
+ test_cases = question.get_test_cases()
files = FileUpload.objects.filter(question_id=question.id, hide=False)
course = Course.objects.get(id=course_id)
module = course.learning_module.get(id=module_id)