Changeset 961
- Timestamp:
- 28 Nov 2006, 15:19:13 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r959 r961 285 285 csv_fields = [f[1] for f in csv_d.items()] 286 286 tr_count = 0 287 total = 0 287 288 #name = 'pume_results' 288 289 name = 'pup' … … 337 338 sid = self.generateStudentId(letter) 338 339 tr_count += 1 339 logger.info('%(t r_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars())340 logger.info('%(total)s+%(tr_count)s: Creating Student with ID %(sid)s REG-NO %(jamb_reg_no)s ' % vars()) 340 341 student = getattr(self,sid) 341 342 student.manage_setLocalRoles(sid, ['Owner',]) … … 370 371 'pume_tot_score', 371 372 ) 372 for f in dp_fields: 373 try: 374 dp[f] = float(jamb.get(csv_d[f])) 375 except ValueError: 376 dp[f] = 0.0 373 dp['pume_tot_score'] = jamb.get(csv_d[f]) or "No Option Shaded" 377 374 pume = student.pume 378 375 pume.getContent().edit(mapping=dp) … … 411 408 student.getContent().createSubObjects() 412 409 if tr_count > MAX_TRANS: 410 em = '%d transactions commited\n' % tr_count 413 411 transaction.commit() 414 em = '%d transactions commited\n' % tr_count415 412 logger.info(em) 413 total += tr_count 416 414 tr_count = 0 417 415 if len(no_import) > 1:
Note: See TracChangeset for help on using the changeset viewer.