Changeset 1340


Ignore:
Timestamp:
21 Jan 2007, 23:20:00 (18 years ago)
Author:
Henrik Bettermann
Message:

make transfer work

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/actions.xml

    r1338 r1340  
    4444     visible="True"/>
    4545  <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"/>
    4848 </action-provider>
    4949 <action-provider name="portal_actions">
  • WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py

    r1339 r1340  
    1414import logging
    1515from urllib import urlencode
    16 logger = logging.getLogger('EPayment.')
     16logger = logging.getLogger('Student.Transfer.Request')
    1717import DateTime
    1818lt = context.portal_layouts
     
    2020students = context.portal_url.getPortalObject().campus.students
    2121
    22 student_id = context.getStudentId()
     22mtool = context.portal_membership
     23member = mtool.getAuthenticatedMember()
     24member_id = str(member)
     25requested_id = context.getStudentId()
     26if 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
     29elif context.isStaff():
     30    student_id = requested_id
     31else:
     32    student_id = member_id
    2333if student_id is None:
    2434    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     
    2737sbrain = context.students_catalog(id=student_id)[0]
    2838payments = getattr(student,'payments').objectIds()
    29 payed = False
     39paid = False
    3040for payment in payments:
    3141    if payment.startswith('transfer'):
    32         payed = True
     42        paid = True
    3343        break
    3444
    3545# for testing of transfer forms
    36 #payed = True
     46#paid = True
    3747
    38 if payed:
     48if paid:
     49    logger.info('"%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id))
    3950    return context.request_transfer_form(rendered = None,
    4051                                 psm = None,
    41                                  payed = True,
     52                                 paid = True,
    4253                                 )
    4354
     
    94105return context.request_transfer_form(rendered = None,
    95106                                 psm = None,
    96                                  payed = True,
     107                                 paid = True,
    97108                                 )
    98109
  • WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt

    r1338 r1340  
    11<metal:block use-macro="here/waeup_content_master/macros/master">
     2    <metal:main fill-slot="header" />
    23    <metal:main fill-slot="main"
    34                    tal:define="rendered_main options/rendered;
Note: See TracChangeset for help on using the changeset viewer.