Commit 4b26c8d3 authored by Caryn Lopez-Go's avatar Caryn Lopez-Go Committed by Ysabella Panghulan

edited passing_score

parent fb220c08
...@@ -15,9 +15,9 @@ class Assignment(models.Model): ...@@ -15,9 +15,9 @@ class Assignment(models.Model):
course = models.ForeignKey(Course, on_delete=models.CASCADE) course = models.ForeignKey(Course, on_delete=models.CASCADE)
perfect_score = models.IntegerField(default=0) perfect_score = models.IntegerField(default=0)
@property def save(self,*args,**kwargs):
def passing_score(self): self.passing_score = int(self.perfect_score*0.6)
return round(self.perfect_score*0.6) super(Assignment, self).save(*args,**kwargs)
def __str__(self): def __str__(self):
return self.name return self.name
\ No newline at end of file
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