diff options
author | ankitjavalkar | 2015-04-20 21:38:11 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-04-26 19:46:01 +0530 |
commit | cbeffec80d30fe2a9048644f5b0345f797479c92 (patch) | |
tree | c544330859e16293fcae0fb71fab238fc4257520 /testapp/exam/models.py | |
parent | 3d998f9d467ccfe795448dd12b33eac52f269ed4 (diff) | |
download | online_test-cbeffec80d30fe2a9048644f5b0345f797479c92.tar.gz online_test-cbeffec80d30fe2a9048644f5b0345f797479c92.tar.bz2 online_test-cbeffec80d30fe2a9048644f5b0345f797479c92.zip |
Code review - changes as per code review discussion
- Further commonify and simplify code_server, fix bugs
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r-- | testapp/exam/models.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py index 706d864..1e7db2b 100644 --- a/testapp/exam/models.py +++ b/testapp/exam/models.py @@ -64,6 +64,7 @@ class Question(models.Model): solution = models.TextField(blank=True) # Test cases file paths (comma seperated for reference code path and test case code path) + # Applicable for CPP, C, Java and Scilab ref_code_path = models.TextField(blank=True) # Any multiple choice options. Place one option per line. @@ -112,11 +113,11 @@ class Question(models.Model): parameter_dict['pos_args'] = pos_args_list test_case_parameter.append(parameter_dict) - info_parameter['language'] = self.language - info_parameter['id'] = self.id - info_parameter['user_answer'] = user_answer - info_parameter['test_parameter'] = test_case_parameter - info_parameter['ref_code_path'] = self.ref_code_path + info_parameter['language'] = self.language + info_parameter['id'] = self.id + info_parameter['user_answer'] = user_answer + info_parameter['test_parameter'] = test_case_parameter + info_parameter['ref_code_path'] = self.ref_code_path return json.dumps(info_parameter) @@ -451,6 +452,3 @@ class TestCase(models.Model): # Test case Expected answer in list form expected_answer = models.TextField(blank=True, null = True) - - # # Test case path to system test code applicable for CPP, C, Java and Scilab - # ref_code_path = models.TextField(blank=True, null = True) |