Changeset 1077 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 18 Dec 2006, 19:44:57 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getStudentName.py
r1071 r1077 12 12 return Info about the current Student 13 13 """ 14 import logging15 logger = logging.getLogger('getApplicationInfo')16 17 request = context.REQUEST18 14 mtool = context.portal_membership 19 wf = context.portal_workflow20 15 member = mtool.getAuthenticatedMember() 21 member_id = str(member)22 path_info = request.get('PATH_INFO').split('/')23 24 16 if mtool.isAnonymousUser(): 25 17 return None 26 27 18 info = {} 28 19 #from Products.zdb import set_trace 29 20 #set_trace() 30 student_id = context.getStudentId() 31 if not student_id: 21 if context.isStaff(): 22 return member.getProperty('fullname',None) 23 if not context.isStudent(): 32 24 return None 33 res = context.students_catalog(id = st udent_id)25 res = context.students_catalog(id = str(member)) 34 26 if len(res) != 1: 35 27 return None -
WAeUP_SRP/trunk/skins/waeup_student/getStudentWorkflowInfo.py
r1072 r1077 12 12 return Info about the current Student 13 13 """ 14 import logging15 logger = logging.getLogger('getApplicationInfo')16 17 request = context.REQUEST18 14 mtool = context.portal_membership 19 15 wf = context.portal_workflow 20 16 member = mtool.getAuthenticatedMember() 21 17 member_id = str(member) 22 path_info = request.get('PATH_INFO').split('/')23 24 18 if mtool.isAnonymousUser(): 25 19 return None 26 20 info = {} 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)) 21 if not context.isStudent(): 32 22 return None 33 23 student_id = member_id 34 35 36 24 students_object = context.portal_url.getPortalObject().campus.students 37 25 student = getattr(students_object, student_id) -
WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py
r1001 r1077 13 13 """ 14 14 import DateTime 15 import logging 16 logger = logging.getLogger('raise_objection') 17 18 wf = context.portal_workflow 19 info = context.getStudentInfo() 20 if not info: 21 logger.info('"%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),requested_id)) 22 return context.admission_form() 15 23 current = DateTime.DateTime() 16 request = context.REQUEST17 wf = context.portal_workflow18 mtool = context.portal_membership19 member = mtool.getAuthenticatedMember()20 roles = member.getRoles()21 22 info = context.getStudentInfo()23 24 24 info['app_doc'].edit(mapping={'objection_date':current,}) 25 25 if info['review_state'] == "admitted":
Note: See TracChangeset for help on using the changeset viewer.