Changeset 14461 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 26 Jan 2017, 07:42:39 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r14410 r14461 821 821 (5, '1st Class')) 822 822 823 def getClassFromCGPA(self, gpa): 823 def getClassFromCGPA(self, gpa, student): 824 """Determine the class of degree. In some custom packages 825 this class depends on e.g. the entry session of the student. In the 826 base package, it does not. 827 """ 824 828 if gpa < self.gpa_boundaries[0][0]: 825 829 return 0, self.gpa_boundaries[0][1] … … 843 847 # No credits weighted 844 848 return 6 845 return self.getClassFromCGPA(level_obj.cumulative_params[0])[0] 849 return self.getClassFromCGPA( 850 level_obj.cumulative_params[0], level_obj.student)[0] 846 851 847 852 def renderPDFTranscript(self, view, filename='transcript.pdf', … … 924 929 f_label = Paragraph(f_label, ENTRY1_STYLE) 925 930 f_text = formatted_text('%.3f (%s)' % ( 926 transcript_data[1], self.getClassFromCGPA(transcript_data[1])[1])) 931 transcript_data[1], self.getClassFromCGPA( 932 transcript_data[1], student)[1])) 927 933 f_text = Paragraph(f_text, ENTRY1_STYLE) 928 934 contextdata.append([f_label,f_text])
Note: See TracChangeset for help on using the changeset viewer.