- Timestamp:
- 25 Feb 2017, 17:59:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/studylevel.py
r14408 r14591 52 52 grok.provides(ICustomStudentStudyLevel) 53 53 54 @property 55 def total_credits_s1(self): 56 total = 0 57 for ticket in self.values(): 58 if ticket.semester == 1 and not ticket.outstanding: 59 total += ticket.credits 60 return total 61 62 @property 63 def total_credits_s2(self): 64 total = 0 65 for ticket in self.values(): 66 if ticket.semester == 2 and not ticket.outstanding: 67 total += ticket.credits 68 return total 69 54 70 CustomStudentStudyLevel = attrs_to_fields( 55 CustomStudentStudyLevel, omit=['total_credits', 'gpa']) 71 CustomStudentStudyLevel, omit=[ 72 'total_credits', 'total_credits_s1', 'total_credits_s2', 'gpa']) 56 73 57 74 class CustomStudentStudyLevelFactory(StudentStudyLevelFactory):
Note: See TracChangeset for help on using the changeset viewer.