- Timestamp:
- 9 Apr 2022, 17:50:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/export.py
r16904 r16914 72 72 remark = 'nottaken' 73 73 ticket.remark = remark 74 ticket.stdnt = level_obj.student 74 75 tickets.append(ticket) 75 76 allticketcodes.append(ticket.code) … … 90 91 # Remove failed or missed tickets if they have been passed later 91 92 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) 93 for student in students: 94 print student.student_id 95 all_tickets = [i for i in tickets if student == i.stdnt] 96 passed_tickets = [i for i in all_tickets if i.remark == 'passed'] 97 for passed_ticket in passed_tickets: 98 for ticket in all_tickets: 99 if ticket.code == passed_ticket.code \ 100 and ticket.remark != 'passed': 101 obsolete.append(ticket) 102 102 for ticket in set(obsolete): 103 103 tickets.remove(ticket)
Note: See TracChangeset for help on using the changeset viewer.