Changeset 16865 for main/waeup.aaue/trunk/src
- Timestamp:
- 8 Mar 2022, 08:32:56 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/export.py
r16859 r16865 19 19 """ 20 20 import grok 21 from copy import deepcopy 21 22 from zope.component import getUtility, createObject 22 23 from waeup.kofa.utils.batching import ExporterBase … … 40 41 """ 41 42 """ 42 tickets = []43 tickets = list() 43 44 #code = kw.get('code', None) 44 45 level = kw.get('level', None) … … 49 50 allticketcodes = list() 50 51 for level_obj in get_levels(students, previous, **kw): 51 52 53 52 for ticket in level_obj.values(): 54 53 if ct_level not in ('all', None): … … 89 88 ticket.stdnt = level_obj.student 90 89 tickets.append(ticket) 90 # Remove failed or missed tickets if they have been passed later 91 obsolete = list() 92 passed_tickets = [i for i in tickets if i.remark == 'passed'] 93 for passed_ticket in passed_tickets: 94 for ticket in tickets: 95 student = ticket.student 96 if not student: 97 student = ticket.stdnt # missed ticket 98 if student == passed_ticket.student \ 99 and ticket.code == passed_ticket.code \ 100 and ticket.remark != 'passed': 101 obsolete.append(ticket) 102 for ticket in obsolete: 103 tickets.remove(ticket) 91 104 return tickets 92 105
Note: See TracChangeset for help on using the changeset viewer.