Changeset 16520 for main


Ignore:
Timestamp:
29 Jun 2021, 07:35:39 (3 years ago)
Author:
Henrik Bettermann
Message:

Insert serial number after sorting.

File:
1 edited

Legend:

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

    r16518 r16520  
    41144114                   _('Score') ],]
    41154115        tickets = []
    4116         sn = 1
    41174116        for ticket in list(coursetickets):
    4118             row = [sn,
    4119                   ticket.student.matric_number,
     4117            row = [ticket.student.matric_number,
    41204118                  ticket.student.reg_number,
    41214119                  ticket.student.display_fullname,
     
    41274125                  ]
    41284126            tickets.append(row)
     4127        data = sorted(tickets, key=lambda value: value[7])
     4128        sn = 1
     4129        for d in data:
     4130            d.pop(7)
     4131            d.insert(0, sn)
    41294132            sn += 1
    4130         data = sorted(tickets, key=lambda value: value[8])
    4131         for d in data: d.pop(8)
    41324133        return header + data, None
    41334134
Note: See TracChangeset for help on using the changeset viewer.