diff options
author | mahesh | 2018-02-16 19:55:47 +0530 |
---|---|---|
committer | maheshgudi | 2018-03-16 15:15:50 +0530 |
commit | 2feec77152518f5f60ddfc46bb22857278c1d7ba (patch) | |
tree | 8c966555c8b0249082704d20e6d7ce9382d438f2 /yaksh/models.py | |
parent | 07be6be0e805e17e45290b0e8137c044b2094edc (diff) | |
download | online_test-2feec77152518f5f60ddfc46bb22857278c1d7ba.tar.gz online_test-2feec77152518f5f60ddfc46bb22857278c1d7ba.tar.bz2 online_test-2feec77152518f5f60ddfc46bb22857278c1d7ba.zip |
Change question type name to Arrange in correct order
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index ffc3c56..b267641 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -54,7 +54,7 @@ question_types = ( ("integer", "Answer in Integer"), ("string", "Answer in String"), ("float", "Answer in Float"), - ("arrange", "Arrange Options in Correct Order"), + ("arrange", "Arrange in Correct Order"), ) @@ -1795,8 +1795,10 @@ class AnswerPaper(models.Model): result['error'] = ['Correct answer'] elif question.type == 'arrange': - tc_list = sorted([tc.id for tc in question.get_test_cases()]) - if user_answer == tc_list: + testcase_ids = sorted( + [tc.id for tc in question.get_test_cases()] + ) + if user_answer == testcase_ids: result['success'] = True result['error'] = ['Correct answer'] |