From 2feec77152518f5f60ddfc46bb22857278c1d7ba Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 16 Feb 2018 19:55:47 +0530 Subject: Change question type name to Arrange in correct order --- yaksh/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'yaksh/models.py') 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'] -- cgit