summaryrefslogtreecommitdiff
path: root/testapp/exam/models.py
diff options
context:
space:
mode:
authorankitjavalkar2015-04-23 19:32:37 +0530
committerankitjavalkar2015-04-26 19:46:01 +0530
commit17752a69114e7dbad266337e768013920aec8c0c (patch)
tree7f88fe72bda2dfca49e0032888fb0cb01cc73d1a /testapp/exam/models.py
parent0580f99fecc0bb495beb5706e18246834174710b (diff)
downloadonline_test-17752a69114e7dbad266337e768013920aec8c0c.tar.gz
online_test-17752a69114e7dbad266337e768013920aec8c0c.tar.bz2
online_test-17752a69114e7dbad266337e768013920aec8c0c.zip
Code Review: Code refactoring
- Add from_json classmethod - Question language is passed directly to the code server - Fix errors in evaluation of code - Fix test cases
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r--testapp/exam/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py
index 874c81c..d0c9cc2 100644
--- a/testapp/exam/models.py
+++ b/testapp/exam/models.py
@@ -87,7 +87,7 @@ class Question(models.Model):
# Tags for the Question.
tags = TaggableManager()
- def consolidate_answer_data(self, test_cases, user_answer): #test
+ def consolidate_answer_data(self, test_cases, user_answer):
test_case_parameter = []
info_parameter = {}
@@ -113,7 +113,7 @@ class Question(models.Model):
parameter_dict['pos_args'] = pos_args_list
test_case_parameter.append(parameter_dict)
- info_parameter['language'] = self.language
+ # info_parameter['language'] = self.language
info_parameter['id'] = self.id
info_parameter['user_answer'] = user_answer
info_parameter['test_parameter'] = test_case_parameter