summaryrefslogtreecommitdiff
path: root/yaksh/code_evaluator.py
diff options
context:
space:
mode:
authorankitjavalkar2016-11-10 12:36:13 +0530
committerankitjavalkar2016-11-10 12:43:14 +0530
commita09df642d4f3623ee517aaed2eac1372ebacc0e0 (patch)
tree7bfb5c55066bf7bda56dfeb02eeb4dbc2f0a2bef /yaksh/code_evaluator.py
parent4904a8305e7e83a00cef718a42bbbf8e7d5f8740 (diff)
downloadonline_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.tar.gz
online_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.tar.bz2
online_test-a09df642d4f3623ee517aaed2eac1372ebacc0e0.zip
Add point based weightage for partial grading instead of percentage based partial grading
Diffstat (limited to 'yaksh/code_evaluator.py')
-rw-r--r--yaksh/code_evaluator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/code_evaluator.py b/yaksh/code_evaluator.py
index 1672efa..fda0a8d 100644
--- a/yaksh/code_evaluator.py
+++ b/yaksh/code_evaluator.py
@@ -82,7 +82,7 @@ class CodeEvaluator(object):
Returns
-------
- A tuple: (success, error message, marks).
+ A tuple: (success, error message, weightage).
"""
self.setup()
@@ -109,20 +109,20 @@ class CodeEvaluator(object):
prev_handler = create_signal_handler()
success = False
error = ""
- marks = 0.0
+ weightage = 0
# Do whatever testing needed.
try:
for test_case in test_case_data:
success = False
self.compile_code(user_answer, file_paths, **test_case)
- success, err, test_case_marks = self.check_code(user_answer,
+ success, err, test_case_weightage = self.check_code(user_answer,
file_paths,
partial_grading,
**test_case
)
if success:
- marks += test_case_marks
+ weightage += test_case_weightage
error = err
else:
error += err + "\n"
@@ -142,7 +142,7 @@ class CodeEvaluator(object):
# Set back any original signal handler.
set_original_signal_handler(prev_handler)
- return success, error, marks
+ return success, error, weightage
def teardown(self):
# Cancel the signal