Changeset 1339 for WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
- Timestamp:
- 21 Jan 2007, 22:55:34 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
r1338 r1339 14 14 import logging 15 15 from urllib import urlencode 16 logger = logging.getLogger(' Student.Transfer.Request')16 logger = logging.getLogger('EPayment.') 17 17 import DateTime 18 18 lt = context.portal_layouts … … 20 20 students = context.portal_url.getPortalObject().campus.students 21 21 22 mtool = context.portal_membership 23 member = mtool.getAuthenticatedMember() 24 member_id = str(member) 25 requested_id = context.getStudentId() 26 if requested_id and not context.isStaff() and member_id != requested_id: 27 logger.info('"%s", "accessed application object of", "%s"' % (member_id,requested_id)) 28 student_id = requested_id 29 elif context.isStaff(): 30 student_id = requested_id 31 else: 32 student_id = member_id 22 student_id = context.getStudentId() 33 23 if student_id is None: 34 24 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) … … 37 27 sbrain = context.students_catalog(id=student_id)[0] 38 28 payments = getattr(student,'payments').objectIds() 39 pa id = False29 payed = False 40 30 for payment in payments: 41 31 if payment.startswith('transfer'): 42 pa id = True32 payed = True 43 33 break 44 34 45 35 # for testing of transfer forms 46 paid = True36 #payed = True 47 37 48 if paid: 49 logger.info('"%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id)) 38 if payed: 50 39 return context.request_transfer_form(rendered = None, 51 40 psm = None, 52 pa id = True,41 payed = True, 53 42 ) 54 43 … … 105 94 return context.request_transfer_form(rendered = None, 106 95 psm = None, 107 pa id = True,96 payed = True, 108 97 ) 109 98
Note: See TracChangeset for help on using the changeset viewer.