Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
get_subjects method added to student
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunsephton committed Apr 2, 2012
1 parent 24fe4e7 commit 574823f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions motswadi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class Meta:
def __unicode__(self):
return "%s (Gr%s)" % (self.full_name, self.grade)

def get_subjects(self):
results = AssessmentResult.objects.filter(student=self)
return list(set([result.subject for result in results]))


class Subject(models.Model):
title = models.CharField(
Expand Down

0 comments on commit 574823f

Please sign in to comment.