Changeset 1881
- Timestamp:
- 12 Jun 2007, 08:03:32 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/ti_229_resolve.py
r1879 r1881 38 38 logger.info('ti_229 started') 39 39 40 query = In('level',( '0',''))40 query = In('level',(0,'')) 41 41 brains = aq_students(query) 42 42 total = len(brains) … … 50 50 logger.info('study_course of %s not found' % brain.id) 51 51 continue 52 count += 153 52 s_results = context.results_import(matric_no = brain.matric_no) 54 53 if s_results: 55 lnr = self.getLevelFromResultsCosCode(s_results)54 lnr = context.getLevelFromResultsCosCode(s_results) 56 55 level = "%d00" % lnr 57 verdict,eligible = self.getVerdict(s_results[0].Verdict)56 verdict,eligible = context.getVerdict(s_results[0].Verdict) 58 57 if eligible: 59 58 level = "%d00" % (lnr + 1) … … 61 60 logger.info('matric_no %s not found in results_import' % brain.matric_no) 62 61 continue 62 count += 1 63 63 64 study_course.getContent().edit(mapping={'current_level': level, 64 65 'current_verdict': verdict, 65 66 } 66 67 ) 67 try: 68 study_course = getattr(getattr(students,brain.id),'study_course') 69 except: 70 logger.info('study_course of %s not found' % brain.id) 71 continue 72 study_course.getContent().edit(mapping={'current_mode': '%s_ft' % brain.entry_mode.lower()}) 73 logger.info('%d of %d changed level,verdict of %s to %s,%s' % (count, 68 logger.info('%d of %d changed level/verdict of %s to %s/%s' % (count, 74 69 total, 75 70 brain.id, … … 81 76 logger.info("committed %d transactions" % commit_after) 82 77 logger.info('ti_229 finished for %d of %d' % (count,total)) 78 return
Note: See TracChangeset for help on using the changeset viewer.