## 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 the Faculties """ request = context.REQUEST wf = context.portal_workflow mtool = context.portal_membership member = mtool.getAuthenticatedMember() path_info = request.get('PATH_INFO').split('/') info = {} member_id = str(member) roles = member.getRoles() info['is_manager'] = context.isManager() info['is_student'] = context.isStudent() info['action'] = "%s" % context.campus.absolute_url() info['choosen_ids'] = request.get('ids',[]) items = [] facs = context.portal_catalog(portal_type='Faculty') for f in facs: row = {} fo = f.getObject() fd = fo.getContent() row['id'] = fo.getId() row['title'] = fd.LongTitle() row['url'] = fo.absolute_url() items.append(row) info['items'] = items return info