Changeset 3361 for WAeUP_SRP/base/skins/waeup_utilities
- Timestamp:
- 20 Mar 2008, 09:19:20 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/ti_507_resolve.py
r3353 r3361 38 38 count = 0 39 39 found = 0 40 commit_after = 10000 40 commit_after = 100000 41 41 certificates = context.getCertificatesDict() 42 42 students = context.students_catalog() 43 43 wrong = [] 44 44 missing_courses = [] 45 wrong_modes = []45 wrong_modes = {} 46 46 for student in students: 47 47 count += 1 … … 53 53 logger.info('missing course %s' % student.course) 54 54 continue 55 entry_mode = student.entry_mode 56 if entry_mode != certificate.get('study_mode','xxx'): 55 entry_mode = student.entry_mode 56 study_mode = certificate.get('study_mode','xxx') 57 if entry_mode != study_mode: 58 w_count = wrong_modes.get((entry_mode,study_mode),0) 59 if w_count == 0: 60 logger.info('%s != %s' % (student.entry_mode, 61 study_mode)) 62 w_count += 1 63 wrong_modes[(entry_mode,study_mode)] = w_count 57 64 wrong += student.id, 58 if student.entry_mode not in wrong_modes:59 wrong_modes += student.entry_mode,60 logger.info('%s != %s' % (student.entry_mode,61 certificates[student.course]['study_mode']))62 65 if wrong and not (len(wrong) % commit_after): 63 66 logger.info('found %d wrong of %d' % (len(wrong),count)) 64 65 logger.info('wrong modes %s' % (', '.join(wrong_modes)))67 for k,v in wrong_modes.items(): 68 logger.info('wrong mode %s counted %d' % (k,v)) 66 69 logger.info('missing courses %s' % (', '.join(missing_courses))) 67 70 logger.info('found %d wrong of %d' % (len(wrong),count))
Note: See TracChangeset for help on using the changeset viewer.