source: WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py @ 1257

Last change on this file since 1257 was 1238, checked in by joachim, 18 years ago

more payments things

  • Property svn:keywords set to Id
File size: 1.1 KB
RevLine 
[1238]1## Script (Python) "getPaymentsInfo"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: getPaymentsFolderInfo.py 1238 2007-01-08 13:45:24Z joachim $
11"""
12Info for the PaymentsFolder
13"""
14import logging
15logger = logging.getLogger('EPayment.')
16import DateTime
17request = context.REQUEST
18students = context.portal_url.getPortalObject().campus.students
19
20student_id = context.getStudentId()
21if student_id is None:
22    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
23#student = getattr(students,student_id)
24s_brain = context.students_catalog(id = student_id)[0]
25payments = []
26for o_id in context.objectIds():
27    d = {}
28    d['id'] = o_id
29    res = context.portal_catalog(id=o_id)
30    if res:
31        title = res[0].Title
32        d['title'] = title or o_id
33    else:
34        d['title'] = "no Title"
35    payments.append(d)
36#from Products.zdb import set_trace;set_trace()
37info = {}
38is_so = info['is_so'] = context.isSectionOfficer()
39info['student_name'] = s_brain.name
40info['payments'] = payments
41return info
Note: See TracBrowser for help on using the repository browser.