Max score fixed
This commit is contained in:
parent
b10aec8fc5
commit
553686e2ae
@ -55,8 +55,10 @@ class Test(models.Model):
|
||||
]
|
||||
"""
|
||||
points = 0
|
||||
for answer in answers:
|
||||
question = self.questions.get(id=answer["question"])
|
||||
# for answer in answers:
|
||||
# question = self.questions.get(id=answer["question"])
|
||||
# points += question.points
|
||||
for question in self.questions.all():
|
||||
points += question.points
|
||||
return points
|
||||
|
||||
|
@ -89,6 +89,7 @@ def solvedTests(request):
|
||||
"name": solved_test.test.name_and_passing_score()["name"],
|
||||
"passing_score": solved_test.test.name_and_passing_score()["passing_score"],
|
||||
"score": solved_test.score,
|
||||
"max": solved_test.max,
|
||||
"percentage": solved_test.percentage
|
||||
})
|
||||
context['tests'] = formatted_tests
|
||||
|
Loading…
Reference in New Issue
Block a user