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

Last change on this file since 1290 was 1283, checked in by joachim, 18 years ago

pay_by_sc ready for testing

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
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 1283 2007-01-12 13:14:45Z 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 = []
26#from Products.zdb import set_trace;set_trace()
27for o_id in context.objectIds():
28    d = {}
29    d['id'] = o_id
30    res = context.portal_catalog(id=o_id)
31    if res:
32        title = res[0].Title
33        d['title'] = title or o_id
34    else:
35        d['title'] = "no Title"
36    payments.append(d)
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.