- Timestamp:
- 21 Jun 2016, 06:30:07 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13946 r13963 649 649 code=(self.context.code, self.context.code) 650 650 ) 651 header = [[_('Matric No.'), 651 header = [[_(''), 652 _('Matric No.'), 652 653 _('Reg. No.'), 653 654 _('Fullname'), 654 655 _('Status'), 655 _('Course of 656 _('Course of\nStudies'), 656 657 _('Level'), 657 _('Score'), 658 _('CA') ],] 658 _('Exam\nScore'), 659 _('CA'), 660 _('Total'), 661 _('Grade'), 662 ],] 659 663 tickets = [] 664 no = 1 660 665 for ticket in list(coursetickets): 661 row = [ticket.student.matric_number, 666 if None in (ticket.score, ticket.ca): 667 total = 'n/a' 668 else: 669 total = ticket.score + ticket.ca 670 row = [no, 671 ticket.student.matric_number, 662 672 ticket.student.reg_number, 663 673 ticket.student.display_fullname, … … 665 675 ticket.student.certcode, 666 676 ticket.level, 677 ticket.ca, 667 678 ticket.score, 668 ticket.ca] 679 total, 680 ticket.grade, 681 ] 669 682 tickets.append(row) 683 no += 1 670 684 return header + sorted(tickets, key=lambda value: value[0]) 671 685
Note: See TracChangeset for help on using the changeset viewer.