source: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCoursesCertificatesInfo.py @ 4264

Last change on this file since 4264 was 1988, checked in by joachim, 17 years ago

merged r1979:r1987 from trunk

  • Property svn:keywords set to Id
File size: 931 bytes
Line 
1## Script (Python) "getCoursesCertificatesInfo"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=student=None
8##title=
9##
10# $Id: getCoursesCertificatesInfo.py 1988 2007-07-05 11:14:12Z joachim $
11"""
12return Info about the Faculties
13"""
14request = context.REQUEST
15
16wf = context.portal_workflow
17
18info = {}
19info['action'] = "%s/faculty_view" % context.absolute_url()
20info['choosen_ids'] = request.get('ids',[])
21info['doc'] = context.getContent()
22# brain = context.portal_catalog(meta_type="Department", id = context.getId())[-1]
23# cp = brain.getPath()
24cp = request.get('PATH_INFO')
25info['container_path'] = cp
26res = context.portal_catalog(container_path="%s/certificates" % cp)
27items = []
28for r in res:
29    row = {}
30    ro = r.getObject()
31    rd = ro.getContent()
32    row['id'] = r.getId
33    row['title'] = rd.Title()
34    row['url'] = ro.absolute_url()
35    items.append(row)
36info['certificates'] = items
37return info
38
Note: See TracBrowser for help on using the repository browser.