summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index aca89ef..c3d743b 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -517,15 +517,15 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None):
if question.type == 'code' else None
correct, result = paper.validate_answer(user_answer, question, json_data)
if correct:
- new_answer.marks = (question.points * result['weightage'] /
- question.get_maximum_test_case_weightage()) \
+ new_answer.marks = (question.points * result['weight'] /
+ question.get_maximum_test_case_weight()) \
if question.partial_grading and question.type == 'code' else question.points
new_answer.correct = correct
new_answer.error = result.get('error')
else:
new_answer.error = result.get('error')
- new_answer.marks = (question.points * result['weightage'] /
- question.get_maximum_test_case_weightage()) \
+ new_answer.marks = (question.points * result['weight'] /
+ question.get_maximum_test_case_weight()) \
if question.partial_grading and question.type == 'code' else 0
new_answer.save()
paper.update_marks('inprogress')