Changeset 998 for WAeUP_SRP/trunk/skins
- Timestamp:
- 6 Dec 2006, 08:07:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r990 r998 49 49 if "Student" in member.getRoles(): 50 50 to_waeup_student_home = True 51 info = context.getStudentInfo() 52 student = info['student'] 53 if info['review_state'] in ("student_created","admitted") and\ 54 wftool.getInfoFor(info['app'],'review_state',None) == 'created' : 51 #info = context.getStudentInfo() 52 #student = info['student'] 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 #if info['review_state'] in ("student_created","admitted") and\ 60 #wftool.getInfoFor(info['app'],'review_state',None) == 'created' : 61 if s_review_state in ("student_created","admitted") and\ 62 a_review_state == 'created' : 55 63 #student.content_status_modify(workflow_action="enter_clearance_pin") 56 wftool.doActionFor(info['app'],'open') 64 #wftool.doActionFor(info['app'],'open') 65 wftool.doActionFor(student_app,'open') 57 66 #wftool.doActionFor(info['pume'],'close') 58 if info['pume'] is not None: 59 wftool.doActionFor(info['pume'],'close') 67 #if info['pume'] is not None: 68 if student_pume is not None: 69 #wftool.doActionFor(info['pume'],'close') 70 wftool.doActionFor(student_pume,'close') 60 71 da = {} 61 72 pin = request.get('pin') 73 app_doc = student_app.getContent() 62 74 if not pin: 63 jamb_reg_no = info['app_doc'].jamb_reg_no 75 app_doc = student_app.getContent() 76 jamb_reg_no = app_doc.jamb_reg_no 64 77 res = context.portal_pins(student=jamb_reg_no) 65 78 if len(res) == 1: 66 79 p = res[0].pin 67 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 80 if len(p) > 10: 81 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 82 else: 83 pin = p 68 84 ## email = request.get('email') 69 app_doc = info['app_doc']85 #app_doc = info['app_doc'] 70 86 da['app_ac_pin'] = pin 71 87 ## da['app_email'] = email … … 98 114 if to_waeup_student_home: 99 115 #member.setProperties(last_login_time=current,login_time=current) 100 if info['review_state'] == "application_pin_entered": 116 #if info['review_state'] == "application_pin_entered": 117 if s_review_state == "application_pin_entered": 101 118 return response.redirect("%s/application_edit" % student.absolute_url()) 102 elif info['review_state'] == "admitted": 119 #elif info['review_state'] == "admitted": 120 elif s_review_state == "admitted": 103 121 return response.redirect("%s/admission_form" % student.absolute_url()) 104 elif info['review_state'] == "clearance_pin_entered": 122 #elif info['review_state'] == "clearance_pin_entered": 123 elif s_review_state == "clearance_pin_entered": 105 124 return response.redirect("%s/clearance_edit" % student.absolute_url()) 106 return response.redirect("%s/student_index" % info['url'])125 return response.redirect("%s/student_index" % student.absolute_url()) 107 126 108 127 elif to_member_home:
Note: See TracChangeset for help on using the changeset viewer.