diff options
author | adityacp | 2017-01-02 15:30:48 +0530 |
---|---|---|
committer | adityacp | 2017-01-02 15:30:48 +0530 |
commit | 9235e68b3a41a5f5327a162662864d0f9a9b66b4 (patch) | |
tree | 9706debcf708b1d6f75f9d8b58e289843a9b6c17 /yaksh | |
parent | e1f467bd5e366ed8b16bd71b66338a7b42fda72a (diff) | |
download | online_test-9235e68b3a41a5f5327a162662864d0f9a9b66b4.tar.gz online_test-9235e68b3a41a5f5327a162662864d0f9a9b66b4.tar.bz2 online_test-9235e68b3a41a5f5327a162662864d0f9a9b66b4.zip |
Remove test_case_type field from Questions model
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 2bf4a85..5d072fd 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -234,9 +234,6 @@ class Question(models.Model): # The type of question. type = models.CharField(max_length=24, choices=question_types) - # The type of evaluator - test_case_type = models.CharField(max_length=24, choices=test_case_types) - # Is this question active or not. If it is inactive it will not be used # when creating a QuestionPaper. active = models.BooleanField(default=True) @@ -289,7 +286,6 @@ class Question(models.Model): 'description': question.description, 'points': question.points, 'language': question.language, 'type': question.type, 'active': question.active, - 'test_case_type': question.test_case_type, 'snippet': question.snippet, 'testcase': [case.get_field_value() for case in test_case], 'files': file_names} @@ -1084,8 +1080,7 @@ class AnswerPaper(models.Model): correct = True elif question.type == 'code': user_dir = self.user.profile.get_user_dir() - json_result = code_server.run_code(question.language, - question.test_case_type, json_data, user_dir) + json_result = code_server.run_code(question.language, json_data, user_dir) result = json.loads(json_result) if result.get('success'): correct = True @@ -1151,8 +1146,7 @@ class TestCase(models.Model): class StandardTestCase(TestCase): test_case = models.TextField() weight = models.FloatField(default=1.0) - test_case_args = models.TextField(help_text="<b>Command Line arguments for bash only</b>", - blank=True) + test_case_args = models.TextField(blank=True) def get_field_value(self): return {"test_case_type": "standardtestcase", |