Changeset 961


Ignore:
Timestamp:
28 Nov 2006, 15:19:13 (18 years ago)
Author:
joachim
Message:

string type for pume result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r959 r961  
    285285        csv_fields = [f[1] for f in csv_d.items()]
    286286        tr_count = 0
     287        total = 0
    287288        #name = 'pume_results'
    288289        name = 'pup'
     
    337338                    sid = self.generateStudentId(letter)
    338339            tr_count += 1
    339             logger.info('%(tr_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())
    340341            student = getattr(self,sid)
    341342            student.manage_setLocalRoles(sid, ['Owner',])
     
    370371                         'pume_tot_score',
    371372                         )
    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"
    377374            pume = student.pume
    378375            pume.getContent().edit(mapping=dp)
     
    411408            student.getContent().createSubObjects()
    412409            if tr_count > MAX_TRANS:
     410                em = '%d transactions commited\n' % tr_count
    413411                transaction.commit()
    414                 em = '%d transactions commited\n' % tr_count
    415412                logger.info(em)
     413                total += tr_count
    416414                tr_count = 0
    417415        if len(no_import) > 1:
Note: See TracChangeset for help on using the changeset viewer.