Changeset 1012 for WAeUP_SRP/trunk/ScratchCards.py
- Timestamp:
- 8 Dec 2006, 12:34:33 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r1002 r1012 147 147 return unused 148 148 149 security.declareProtected(View,"getNumberOfUsedPins") 150 def getNumberOfUsedPins(self): 151 """return the number of used Pins""" 152 #import pdb;pdb.set_trace() 153 pins_cat = self.portal_pins 154 doc = self.getContent() 155 used = [{'pin': p.pin, 156 'serial': p.serial, 157 'student': p.student, 158 } for p in pins_cat.searchResults(prefix_batch = "%s%d" 159 % (doc.prefix,doc.batch_no), 160 ) if p.student] 161 return len(used) 162 149 163 InitializeClass(ScratchCardBatch) 150 164
Note: See TracChangeset for help on using the changeset viewer.