Changeset 10445 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 2 Aug 2013, 05:51:20 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r10439 r10445 661 661 return pdf_stream 662 662 663 def getClassFromCGPA(self, gpa): 664 if gpa < 1: 665 return 'Fail' 666 if gpa < 1.5: 667 return 'Pass' 668 if gpa < 2.4: 669 return '3rd Class' 670 if gpa < 3.5: 671 return '2nd Class Lower' 672 if gpa < 4.5: 673 return '2nd Class Upper' 674 if gpa <= 5: 675 return '1st Class' 676 return 'N/A' 677 663 678 def renderPDFTranscript(self, view, filename='transcript.pdf', 664 679 student=None, … … 737 752 f_label = trans(_('Cumulative GPA:'), portal_language) 738 753 f_label = Paragraph(f_label, ENTRY1_STYLE) 739 f_text = formatted_text( gpa)754 f_text = formatted_text('%s (%s)' % (gpa, self.getClassFromCGPA(gpa))) 740 755 f_text = Paragraph(f_text, ENTRY1_STYLE) 741 756 contextdata.append([f_label,f_text])
Note: See TracChangeset for help on using the changeset viewer.