- Timestamp:
- 21 Jan 2007, 23:20:00 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/actions.xml
r1338 r1340 44 44 visible="True"/> 45 45 <action title="Request Transfer" action_id="request_transfer" category="student" 46 condition_expr="python: here.getStudentWorkflowInfo()['cr']" url_expr="string:${portal_url}/request_transfer"47 visible="True"/> 46 condition_expr="python: member and here.getStudentWorkflowInfo()['cr']" url_expr="string:${portal_url}/request_transfer" 47 visible="True"/> 48 48 </action-provider> 49 49 <action-provider name="portal_actions"> -
WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
r1339 r1340 14 14 import logging 15 15 from urllib import urlencode 16 logger = logging.getLogger(' EPayment.')16 logger = logging.getLogger('Student.Transfer.Request') 17 17 import DateTime 18 18 lt = context.portal_layouts … … 20 20 students = context.portal_url.getPortalObject().campus.students 21 21 22 student_id = context.getStudentId() 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 23 33 if student_id is None: 24 34 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) … … 27 37 sbrain = context.students_catalog(id=student_id)[0] 28 38 payments = getattr(student,'payments').objectIds() 29 pa yed = False39 paid = False 30 40 for payment in payments: 31 41 if payment.startswith('transfer'): 32 pa yed = True42 paid = True 33 43 break 34 44 35 45 # for testing of transfer forms 36 #pa yed = True46 #paid = True 37 47 38 if payed: 48 if paid: 49 logger.info('"%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id)) 39 50 return context.request_transfer_form(rendered = None, 40 51 psm = None, 41 pa yed = True,52 paid = True, 42 53 ) 43 54 … … 94 105 return context.request_transfer_form(rendered = None, 95 106 psm = None, 96 pa yed = True,107 paid = True, 97 108 ) 98 109 -
WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt
r1338 r1340 1 1 <metal:block use-macro="here/waeup_content_master/macros/master"> 2 <metal:main fill-slot="header" /> 2 3 <metal:main fill-slot="main" 3 4 tal:define="rendered_main options/rendered;
Note: See TracChangeset for help on using the changeset viewer.