Changeset 1006 for WAeUP_SRP/trunk/skins/waeup_custom
- Timestamp:
- 7 Dec 2006, 18:18:28 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_custom
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r1004 r1006 48 48 member = mtool.getAuthenticatedMember() 49 49 50 if not is_anon: 51 if "Student" in member.getRoles(): 52 to_waeup_student_home = True 53 students = context.portal_url.getPortalObject().campus.students 54 student = getattr(students,str(member)) 55 student_app = getattr(student,'application') 56 student_pume = getattr(student,'pume',None) 57 s_review_state = wftool.getInfoFor(student,'review_state',None) 58 a_review_state = wftool.getInfoFor(student_app,'review_state',None) 59 logger.info('%s review_state %s' % (member,s_review_state)) 60 app_doc = student_app.getContent() 61 #from Products.zdb import set_trace 62 #set_trace() 63 if s_review_state in ("student_created","admitted") and\ 64 a_review_state == 'created' : 65 wftool.doActionFor(student_app,'open') 66 if student_pume is not None: 67 wftool.doActionFor(student_pume,'close') 68 da = {} 69 pin = request.get('pin') 70 if not pin: 50 if redirect_url.endswith('/logged_out'): 51 redirect_to_portal = True 52 else: 53 if not is_anon: 54 if "Student" in member.getRoles(): 55 to_waeup_student_home = True 56 students = context.portal_url.getPortalObject().campus.students 57 student = getattr(students,str(member)) 58 student_app = getattr(student,'application') 59 student_pume = getattr(student,'pume',None) 60 s_review_state = wftool.getInfoFor(student,'review_state',None) 61 a_review_state = wftool.getInfoFor(student_app,'review_state',None) 62 logger.info('%s review_state %s' % (member,s_review_state)) 63 app_doc = student_app.getContent() 64 #from Products.zdb import set_trace 65 #set_trace() 66 if s_review_state in ("student_created","admitted") and\ 67 a_review_state == 'created' : 68 wftool.doActionFor(student_app,'open') 69 if student_pume is not None: 70 wftool.doActionFor(student_pume,'close') 71 da = {} 72 pin = request.get('pin') 73 if not pin: 74 jamb_reg_no = app_doc.jamb_reg_no 75 for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()): 76 res = context.portal_pins(student=reg_no) 77 if len(res) > 0: 78 break 79 if len(res) > 0: 80 p = res[0].pin 81 if len(p) > 10: 82 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 83 else: 84 pin = p 85 da['app_ac_pin'] = pin 86 da['app_ac_date'] = current 87 app_doc.edit(mapping = da) 88 elif s_review_state in ("admitted") and a_review_state == 'opened' and\ 89 not app_doc.app_ac_pin: 71 90 jamb_reg_no = app_doc.jamb_reg_no 72 91 for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()): … … 80 99 else: 81 100 pin = p 82 da['app_ac_pin'] = pin 83 da['app_ac_date'] = current 84 app_doc.edit(mapping = da) 85 elif s_review_state in ("admitted") and a_review_state == 'opened' and\ 86 not app_doc.app_ac_pin: 87 jamb_reg_no = app_doc.jamb_reg_no 88 for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()): 89 res = context.portal_pins(student=reg_no) 90 if len(res) > 0: 91 break 92 if len(res) > 0: 93 p = res[0].pin 94 if len(p) > 10: 95 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 96 else: 97 pin = p 98 da = {} 99 da['app_ac_pin'] = pin 100 app_doc.edit(mapping = da) 101 elif "Manager" in member.getRoles(): 102 pass 103 else: 104 to_member_home, to_workspaces = checkRedirect(portal, mtool) 101 da = {} 102 da['app_ac_pin'] = pin 103 app_doc.edit(mapping = da) 104 elif "Manager" in member.getRoles(): 105 pass 106 else: 107 to_member_home, to_workspaces = checkRedirect(portal, mtool) 105 108 if (not to_member_home) and (not to_workspaces): 106 109 redirect_to_portal = True -
WAeUP_SRP/trunk/skins/waeup_custom/standard_error_message.pt
r535 r1006 8 8 p_props here/portal_properties; 9 9 "> 10 <tal:Anauthorized condition="python:error_type == 'Unauthorized'"> 11 <metal:block use-macro="here/error_not_found/macros/not_found" /> 12 </tal:Anauthorized> 13 14 <tal:Anauthorized condition="python:error_type != 'Unauthorized'"> 10 15 <metal:body use-macro="here/main_template/macros/master"> 11 16 … … 53 58 </metal:main> 54 59 </metal:body> 60 </tal:Anauthorized> 55 61 </metal:html>
Note: See TracChangeset for help on using the changeset viewer.