Commit 56568e5b authored by Joan Denise Nocos's avatar Joan Denise Nocos

fix: repopulated max_points fields of Assignment objects to reflect changes to passing_score

parent 987a17dc
...@@ -25,6 +25,6 @@ class Assignment(models.Model): ...@@ -25,6 +25,6 @@ class Assignment(models.Model):
value = os.path.basename(self.image.name) value = os.path.basename(self.image.name)
return value return value
def save(self, *args, **kwargs): def save(self):
self.passing_score = self.max_points*0.6 self.passing_score = self.max_points*0.6
super(Assignment, self).save(*args, **kwargs) super(Assignment, self).save()
...@@ -20,8 +20,6 @@ def details(request, assignment_id): ...@@ -20,8 +20,6 @@ def details(request, assignment_id):
assignment = Assignment.objects.get(pk=assignment_id) assignment = Assignment.objects.get(pk=assignment_id)
except Assignment.DoesNotExist: except Assignment.DoesNotExist:
raise Http404("Assignment does not exist.") raise Http404("Assignment does not exist.")
score = assignment.max_points
context = { context = {
"assignment" : assignment, "assignment" : assignment,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment