Changeset 3084 for WAeUP_SRP/base
- Timestamp:
- 1 Feb 2008, 12:15:11 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/ti_71fc_resolve.py
r3082 r3084 28 28 from Products.AdvancedQuery import Eq, Between, Le,In 29 29 aq_students = context.students_catalog.evalAdvancedQuery 30 aq_portal = context.portal_catalog_real.evalAdvancedQuery 30 31 students_folder = context.portal_url.getPortalObject().campus.students 31 32 … … 37 38 response.setHeader('Content-type','text/html; charset=ISO-8859-15') 38 39 response.write("%s<br>\n\r" % s) 39 levels = ("110","210") 40 query = In('level',levels) 41 student_records = aq_students(query) 42 logger.info('found %d students with levels %s' % (len(student_records), " ".join(levels))) 40 levels_to_look_for = ("110","210") 41 # query = In('level',levels_to_look_for) 42 # student_records = aq_students(query) 43 # logger.info('found %d students with levels %s' % (len(student_records), " ".join(levels_to_look_for))) 44 # students = {} 45 # for student_record in student_records: 46 # students[student_record.id] = student_record.level 47 query = In('id',levels_to_look_for) & Eq('portal_type','StudentStudyLevel') 48 levels= aq_portal(query) 49 logger.info('found %d students with levels %s' % (len(levels), " ".join(levels_to_look_for))) 43 50 students = {} 44 for student_record in student_records: 45 students[student_record.id] = student_record.level 51 for level in levels: 52 student_id = level.getPath().split('/')[-3] 53 students[student_id] = level.getId 46 54 47 55 for student_id,level in students.items():
Note: See TracChangeset for help on using the changeset viewer.