Ignore:
Timestamp:
10 Jun 2016, 07:59:13 (9 years ago)
Author:
Henrik Bettermann
Message:

Sort table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r13900 r13907  
    619619            code=(self.context.code, self.context.code)
    620620            )
    621         result = [[_('Matric No.'),
     621        header = [[_('Matric No.'),
    622622                   _('Reg. No.'),
    623623                   _('Fullname'),
     
    627627                   _('Score'),
    628628                   _('CA') ],]
     629        tickets = []
    629630        for ticket in list(coursetickets):
    630631            row = [ticket.student.matric_number,
     
    636637                  ticket.score,
    637638                  ticket.ca]
    638             result.append(row)
    639         return result
     639            tickets.append(row)
     640        return header + sorted(tickets, key=lambda value: value[0])
     641
Note: See TracChangeset for help on using the changeset viewer.