summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authormaheshgudi2018-02-05 17:06:09 +0530
committermaheshgudi2018-03-16 15:15:50 +0530
commit453a5d8f191b62af45426d5c98a99552c34ba396 (patch)
tree41246a51a60d0b0f0d18859d2f63ecd3a76d6e9c /yaksh/views.py
parent9c9e505e79abce0cae6b341880ed9f8a4e31a8be (diff)
downloadonline_test-453a5d8f191b62af45426d5c98a99552c34ba396.tar.gz
online_test-453a5d8f191b62af45426d5c98a99552c34ba396.tar.bz2
online_test-453a5d8f191b62af45426d5c98a99552c34ba396.zip
Include Rebase changes from shuffle testcases
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 5c88391..9a66f09 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -242,6 +242,8 @@ def add_question(request, question_id=None):
if qform.is_valid():
question = qform.save(commit=False)
question.user = user
+ if question.type == "arrange":
+ question.shuffle_testcases = True
question.save()
# many-to-many field save function used to save the tags
qform.save_m2m()
@@ -616,7 +618,7 @@ def show_question(request, question, paper, error_message=None, notification=Non
if question.type == "code" else
'You have already attempted this question'
)
- if question.type in ['mcc', 'mcq']:
+ if question.type in ['mcc', 'mcq', 'arrange']:
test_cases = question.get_ordered_test_cases(paper)
else:
test_cases = question.get_test_cases()