diff options
author | adityacp | 2017-01-04 11:42:32 +0530 |
---|---|---|
committer | adityacp | 2017-01-04 11:42:32 +0530 |
commit | 58481cdcba38e8e602b8e2d3e5172f9e653f93a9 (patch) | |
tree | 21312113c078b6b22f24d5bab052a52bd185a3c9 /yaksh/cpp_stdio_evaluator.py | |
parent | b271e3b33f673c70114893bf461d2a6116dd7cf7 (diff) | |
parent | ef6a61b1938ec399efb6d66b914f245afa3ed5ff (diff) | |
download | online_test-58481cdcba38e8e602b8e2d3e5172f9e653f93a9.tar.gz online_test-58481cdcba38e8e602b8e2d3e5172f9e653f93a9.tar.bz2 online_test-58481cdcba38e8e602b8e2d3e5172f9e653f93a9.zip |
Merge https://github.com/fossee/online_test into fix_management_commands
Diffstat (limited to 'yaksh/cpp_stdio_evaluator.py')
-rw-r--r-- | yaksh/cpp_stdio_evaluator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/cpp_stdio_evaluator.py b/yaksh/cpp_stdio_evaluator.py index c318a82..b302fa4 100644 --- a/yaksh/cpp_stdio_evaluator.py +++ b/yaksh/cpp_stdio_evaluator.py @@ -13,7 +13,6 @@ class CppStdIOEvaluator(StdIOEvaluator): """Evaluates C StdIO based code""" def __init__(self, metadata, test_case_data): self.files = [] - self.submit_code_path = self.create_submit_code_file('submit.c') # Set metadata values self.user_answer = metadata.get('user_answer') @@ -43,6 +42,7 @@ class CppStdIOEvaluator(StdIOEvaluator): return compile_command, compile_main def compile_code(self): + self.submit_code_path = self.create_submit_code_file('submit.c') if self.file_paths: self.files = copy_files(file_paths) if not isfile(self.submit_code_path): @@ -112,5 +112,5 @@ class CppStdIOEvaluator(StdIOEvaluator): err = err + "\n" + e except: err = err + "\n" + stdnt_stderr - mark_fraction = float(self.weight) if self.partial_grading and success else 0.0 + mark_fraction = 1.0 if self.partial_grading and success else 0.0 return success, err, mark_fraction |