Changeset 10480 for main/waeup.aaue/trunk/src
- Timestamp:
- 12 Aug 2013, 09:08:35 (11 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po
r10299 r10480 33 33 msgstr "Total Units" 34 34 35 #: manually included 36 msgid "Sessional GPA (rectified)" 37 msgstr "Sessional GPA" 38 35 39 #: waeup/kofa/students/interfaces.py:531 36 40 #: waeup/kofa/university/interfaces.py:152 -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r10442 r10480 68 68 """ 69 69 grok.context(ICustomStudentStudyLevel) 70 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit('total_credits') 70 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit( 71 'total_credits', 'gpa') 71 72 form_fields[ 72 73 'validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') … … 79 80 form_fields = grok.AutoFields(ICustomStudentStudyLevel).omit( 80 81 'level_session', 'level_verdict', 81 'validated_by', 'validation_date' )82 'validated_by', 'validation_date', 'gpa') 82 83 83 84 omit_fields = ('password', 'suspended', 'suspended_comment', -
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r10443 r10480 56 56 57 57 @property 58 def gpa_params(self): 59 weighted_credits = 0.0 60 credits_counted = 0 61 level_gpa = 0.0 62 for ticket in self.values(): 63 if ticket.score: 64 credits_counted += ticket.credits 65 weighted_credits += ticket.credits * ticket.weight 66 if credits_counted: 67 level_gpa = round(weighted_credits/credits_counted, 2) 68 return level_gpa, credits_counted, weighted_credits 58 def gpa_params_rectified(self): 59 return self.gpa_params 69 60 70 61 CustomStudentStudyLevel = attrs_to_fields( 71 62 CustomStudentStudyLevel, omit=[ 72 'total_credits', 'total_credits_s1', 'total_credits_s2' ])63 'total_credits', 'total_credits_s1', 'total_credits_s2', 'gpa']) 73 64 74 65 class CustomStudentStudyLevelFactory(StudentStudyLevelFactory):
Note: See TracChangeset for help on using the changeset viewer.