source: WAeUP_SRP/branches/uli/skins/waeup_academics/getCertificateInfo.py @ 11156

Last change on this file since 11156 was 1653, checked in by uli, 18 years ago

Incorporated changeset 1593:1652 of trunk into uli-branch.

  • Property svn:keywords set to Id
File size: 826 bytes
Line 
1## Script (Python) "getCertificateInfo"
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: getCertificateInfo.py 1653 2007-03-28 02:35:25Z uli $
11"""
12return Info about a Certificate
13"""
14request = context.REQUEST
15
16wf = context.portal_workflow
17path_info = request.get('PATH_INFO').split('/')
18
19info = {}
20info['action'] = "%s" % context.absolute_url()
21info['choosen_ids'] = request.get('ids',[])
22info['doc'] = context.getContent()
23items = []
24levels = context.objectValues()
25for l in levels:
26    row = {}
27    ld = l.getContent()
28    row['id'] = l.getId()
29    if hasattr(ld,'Title'):
30        row['title'] = ld.Title()
31    else:
32        row['title'] = getattr(ld,'title','no title')
33    row['url'] = l.absolute_url()
34    items.append(row)
35info['items'] = items
36return info
Note: See TracBrowser for help on using the repository browser.