Changeset 1714
- Timestamp:
- 26 Apr 2007, 13:39:35 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/setNewEntryMode.py
r1713 r1714 17 17 def set_trace(): 18 18 pass 19 from Products.AdvancedQuery import Eq, Between, Le,In 20 aq_students = context.students_catalog.evalAdvancedQuery 19 21 20 22 request = context.REQUEST … … 22 24 response = request.RESPONSE 23 25 setheader = request.RESPONSE.setHeader 24 students = context.portal_url.getPortalObject().campus.students26 #students = context.portal_url.getPortalObject().campus.students 25 27 import logging 26 28 logger = logging.getLogger('Skins.setNewEntryMode') … … 35 37 #set_trace() 36 38 logger.info('setNewEntryMode start') 39 #progress_log = context.waeup_tool.openLog('test') 40 #context.waeup_tool.writeLog(progress_log,"Start \n") 41 umede = aq_students(In('entry_mode',('DE','UME'))) 42 umede_ids = [r.getId for r in umede] 37 43 for brain in brains: 38 if not brain.entry_mode in ('UME','DE'):44 if brain.getId not in umede_ids: 39 45 continue 40 46 stud_obj = brain.getObject() … … 43 49 except: 44 50 continue 51 em = getattr(app_doc,'entry_mode',None) 52 if em not in ('UME','DE'): 53 continue 45 54 try: 46 55 sc_doc = stud_obj.study_course.getContent() 47 56 except: 48 57 sc_doc = None 49 em = getattr(app_doc,'entry_mode',None)50 58 if em in ('ume_ft','de_ft'): 51 59 new_em = em
Note: See TracChangeset for help on using the changeset viewer.