Changeset 1668
- Timestamp:
- 2 Apr 2007, 10:17:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/list_students.py
r1312 r1668 12 12 export student_list 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 19 from Products.AdvancedQuery import Eq, Between, Le,In,MatchRegexp 20 aq_portal = context.portal_catalog.evalAdvancedQuery 21 aq_students = context.students_catalog.evalAdvancedQuery 14 22 request = context.REQUEST 15 23 setheader = request.RESPONSE.setHeader … … 33 41 lines.append(','.join(fields)) 34 42 format = '"%(' + ')s","%('.join(fields) + ')s"' 35 cleared = context.portal_catalog(review_state = "cleared_and_validated") 43 #cleared = context.portal_catalog(review_state = "cleared_and_validated") 44 query = In('review_state',('cleared_and_validated', 45 'school_fee_paid', 46 'courses_registered', 47 'courses_validated')) 48 cleared = aq_portal(query) 49 newquery = Eq('portal_type','StudentApplication') & MatchRegexp('SearchableText',r'^6*') 50 #newquery = MatchRegexp('SearchableText','^5*') 51 new_students = aq_portal(newquery) 52 new_sids = [] 53 for ns in new_students: 54 new_sids.append(ns.getPath().split('/')[-2]) 36 55 for student in cleared: 56 if student.getId not in new_sids: 57 continue 37 58 erg = scat(id=student.getId) 38 59 if not erg:
Note: See TracChangeset for help on using the changeset viewer.