Changeset 5040
- Timestamp:
- 25 Feb 2010, 15:39:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r4253 r5040 33 33 return "Pin Batches" 34 34 35 # use importPinBatch to import original pin batch files 35 36 security.declareProtected(ModifyPortalContent,"importPinBatch") ###( 36 37 def importPinBatch(self): 37 38 """import PinBatch""" 38 name = "PinsToImport" 39 logger = logging.getLogger('Students.ScratchCardBatchesFolder.importPinBatch') 40 logger.info('Start loading from %s.csv' % name) 39 #name = "PinsToImport" 40 logger = logging.getLogger('ScratchCards.ScratchCardBatchesFolder.importPinBatch') 41 41 pins_section = self.portal_url.getPortalObject().campus.pins 42 42 p_pins = self.portal_pins 43 43 base_dir = "%s/import/pins" % (i_home) 44 logger.info('Start loading pin batch files from %s' % base_dir) 44 45 files = os.listdir(base_dir) 45 46 for fn in files: … … 129 130 security.declareProtected(ModifyPortalContent,"restorePins") ###( 130 131 def restorePins(self): 131 "restore Pins from file named pins_to_restore.csv"132 "restore Pins from file named PinsToRestore.csv" 132 133 pins = self.portal_pins 133 134 filename = "%s/import/PinsToRestore.csv" % (i_home) 134 logger = logging.getLogger('ScratchCards. restorePins')135 logger = logging.getLogger('ScratchCards.ScratchCardBatch.restorePins') 135 136 if not os.path.exists(filename): 136 137 logger.info('no file %s' % filename) … … 171 172 batch = self.getContent() 172 173 member = self.portal_membership.getAuthenticatedMember() 173 logger = logging.getLogger('ScratchCards. archiveBatch')174 logger = logging.getLogger('ScratchCards.ScratchCardBatch.archiveBatch') 174 175 nr = batch.no_of_pins 175 176 prefix = batch.prefix
Note: See TracChangeset for help on using the changeset viewer.