Changeset 1706 for WAeUP_SRP/trunk
- Timestamp:
- 25 Apr 2007, 07:22:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/setNewEntryMode.py
r1704 r1706 1 ## Script (Python) " reindex_entry_mode"1 ## Script (Python) "setNewEntryMode" 2 2 ##bind container=container 3 3 ##bind context=context … … 32 32 #set_trace() 33 33 for brain in brains: 34 student_path = brain.getPath() 35 sub_brains = context.portal_catalog(path = student_path) 36 app_doc = None 37 sc_doc = None 38 for sb in sub_brains: 39 if sb.getId == 'application': 40 app_doc = sb.getObject().getContent() 41 elif sb.getId == 'study_course': 42 sc_doc = sb.getObject().getContent() 43 if app_doc is None: 34 stud_obj = brain.getObject() 35 try: 36 app_doc = stud_obj.application.getContent() 37 try: 38 sc_doc = stud_obj.study_course.getContent() 39 except: 40 sc_doc = None 41 except: 44 42 continue 45 43 em = getattr(app_doc,'entry_mode',None) … … 52 50 rwrite(s) 53 51 rwrite('Done') 52 53
Note: See TracChangeset for help on using the changeset viewer.