Ignore:
Timestamp:
18 Dec 2006, 19:44:57 (18 years ago)
Author:
joachim
Message:

files for custom

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentName.py

    r1071 r1077  
    1212return Info about the current Student
    1313"""
    14 import logging
    15 logger = logging.getLogger('getApplicationInfo')
    16 
    17 request = context.REQUEST
    1814mtool = context.portal_membership
    19 wf = context.portal_workflow
    2015member = mtool.getAuthenticatedMember()
    21 member_id = str(member)
    22 path_info = request.get('PATH_INFO').split('/')
    23 
    2416if mtool.isAnonymousUser():
    2517    return None
    26 
    2718info = {}
    2819#from Products.zdb import set_trace
    2920#set_trace()
    30 student_id = context.getStudentId()
    31 if not student_id:
     21if context.isStaff():
     22    return member.getProperty('fullname',None)
     23if not context.isStudent():
    3224    return None
    33 res = context.students_catalog(id = student_id)
     25res = context.students_catalog(id = str(member))
    3426if len(res) != 1:
    3527    return None
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentWorkflowInfo.py

    r1072 r1077  
    1212return Info about the current Student
    1313"""
    14 import logging
    15 logger = logging.getLogger('getApplicationInfo')
    16 
    17 request = context.REQUEST
    1814mtool = context.portal_membership
    1915wf = context.portal_workflow
    2016member = mtool.getAuthenticatedMember()
    2117member_id = str(member)
    22 path_info = request.get('PATH_INFO').split('/')
    23 
    2418if mtool.isAnonymousUser():
    2519    return None
    2620info = {}
    27 #from Products.zdb import set_trace
    28 #set_trace()
    29 requested_id = context.getStudentId()
    30 if member_id != requested_id:
    31     logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     21if not context.isStudent():
    3222    return None
    3323student_id = member_id
    34 
    35 
    3624students_object = context.portal_url.getPortalObject().campus.students
    3725student = getattr(students_object, student_id)
  • WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py

    r1001 r1077  
    1313"""
    1414import DateTime
     15import logging
     16logger = logging.getLogger('raise_objection')
     17
     18wf = context.portal_workflow
     19info = context.getStudentInfo()
     20if not info:
     21    logger.info('"%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),requested_id))
     22    return context.admission_form()
    1523current = DateTime.DateTime()
    16 request = context.REQUEST
    17 wf = context.portal_workflow
    18 mtool = context.portal_membership
    19 member = mtool.getAuthenticatedMember()
    20 roles = member.getRoles()
    21 
    22 info = context.getStudentInfo()
    23 
    2424info['app_doc'].edit(mapping={'objection_date':current,})
    2525if info['review_state'] == "admitted":
Note: See TracChangeset for help on using the changeset viewer.