Changeset 10017 for main/waeup.kofa/trunk
- Timestamp:
- 12 Mar 2013, 09:24:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r9984 r10017 62 62 """Get course tickets of `students`. 63 63 64 If code is passed through filter course tickets 65 which belong to this course code. 64 If code is passed through, filter course tickets 65 which belong to this course code and meets level 66 and level_session. 66 67 """ 67 68 tickets = [] 68 69 code = kw.get('code', None) 70 level = kw.get('level', None) 71 level_session = kw.get('level_session', None) 69 72 if code is None: 70 for level in get_levels(students):71 for ticket in level .values():73 for level_obj in get_levels(students): 74 for ticket in level_obj.values(): 72 75 tickets.append(ticket) 73 76 else: 74 for level in get_levels(students): 75 for ticket in level.values(): 76 if ticket.code == code: 77 tickets.append(ticket) 77 for level_obj in get_levels(students): 78 for ticket in level_obj.values(): 79 if ticket.code != code: 80 continue 81 if level is not None and int(level) != level_obj.level: 82 continue 83 if level_session is not None and \ 84 int(level_session) != level_obj.level_session: 85 continue 86 tickets.append(ticket) 78 87 return tickets 79 88
Note: See TracChangeset for help on using the changeset viewer.