Changeset 686 for WAeUP_SRP/trunk/ScratchCards.py
- Timestamp:
- 13 Oct 2006, 11:27:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r682 r686 91 91 pins_cat = self.portal_pins 92 92 doc = self.getContent() 93 l= [{'pin': p.pin,93 unused = [{'pin': p.pin, 94 94 'serial': p.serial, 95 95 } for p in pins_cat.searchResults(prefix_batch = "%s%d" 96 96 % (doc.prefix,doc.batch_no), 97 ) if p.student == ''] 98 if len (l) <= max_pins: 99 return l 100 return l[:max_pins] 97 ) if not p.student] 98 used = [{'pin': p.pin, 99 'serial': p.serial, 100 'student': p.student, 101 } for p in pins_cat.searchResults(prefix_batch = "%s%d" 102 % (doc.prefix,doc.batch_no), 103 ) if p.student] 104 if len (unused) <= max_pins: 105 return unused,used 106 return unused[:max_pins],used 101 107 102 108 InitializeClass(ScratchCardBatch)
Note: See TracChangeset for help on using the changeset viewer.