## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None ##title= ## # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ """ return Info about a Certificate """ request = context.REQUEST wf = context.portal_workflow path_info = request.get('PATH_INFO').split('/') info = {} info['is_manager'] = context.isManager() info['is_student'] = context.isStudent() info['action'] = "%s" % context.campus.absolute_url() info['choosen_ids'] = request.get('ids',[]) info['doc'] = context.getContent() items = [] levels = context.objectValues() for l in levels: row = {} ld = l.getContent() row['id'] = l.getId() if hasattr(ld,'Title'): row['title'] = ld.Title() else: row['title'] = getattr(ld,'title','no title') row['url'] = l.absolute_url() items.append(row) info['items'] = items return info