Changeset 1988 for WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCertificatesInfo.py
- Timestamp:
- 5 Jul 2007, 11:14:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCertificatesInfo.py
r913 r1988 12 12 return Info about the Faculties 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 request = context.REQUEST 15 20 … … 19 24 20 25 info = {} 21 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2]22 dep_id = context.aq_parent.getId()26 dep_id = path_info[-2] 27 #set_trace() 23 28 info['action'] = "%s" % context.absolute_url() 24 29 info['choosen_ids'] = request.get('ids',[]) 25 30 info['doc'] = context.getContent() 26 res = context.portal_catalog(meta_type="Department",id = dep_id)31 #res = context.portal_catalog(meta_type="Department",id = dep_id) 27 32 info['courses'] = [] 28 if not res: 29 return info 30 brain = res[-1] 31 cp = brain.getPath() 33 # if not res: 34 # return info 35 # brain = res[-1] 36 # cp = brain.getPath() 37 cp = '/'.join(path_info[:-2]) 32 38 info['container_path'] = cp 33 39 info['dep_id'] = dep_id
Note: See TracChangeset for help on using the changeset viewer.