Changeset 785 for WAeUP_SRP/trunk/skins
- Timestamp:
- 6 Nov 2006, 14:22:15 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 6 added
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r770 r785 60 60 da['app_ac_date'] = current 61 61 app_doc.edit(mapping = da) 62 dc = {}63 dc['clr_ac_pin'] = pin64 dc['entry_date'] = current65 dc['session'] = "%s" % current.year()66 dc['lga'] = app_doc.jamb_lga67 info['clear_doc'].edit(mapping = dc)62 ## dc = {} 63 ## dc['clr_ac_pin'] = pin 64 ## dc['entry_date'] = current 65 ## dc['session'] = "%s" % current.year() 66 ## dc['lga'] = app_doc.jamb_lga 67 ## info['clear_doc'].edit(mapping = dc) 68 68 elif "Manager" in member.getRoles(): 69 69 pass -
WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt
r774 r785 6 6 <tal:block condition="context/isStudent"> 7 7 <strong> 8 <span tal:condition="info/is_student " tal:content="python:info['student_doc'].Title()" />8 <span tal:condition="info/is_student|nothing" tal:content="python:info['student_doc'].Title()" /> 9 9 </strong> 10 10 </tal:block> -
WAeUP_SRP/trunk/skins/waeup_student/check_admission.py
r782 r785 12 12 ti = context.portal_types[type_name] 13 13 REQUEST.set('type_name',type_name) 14 14 redirect = REQUEST.RESPONSE.redirect 15 wf = context.portal_workflow 15 16 validate = REQUEST.has_key("cpsdocument_create_button") 16 17 … … 24 25 ob={}, 25 26 layout_mode='create', 26 formaction = " request_clearance",27 button = " Request Clearance",27 formaction = "check_admission", 28 button = "Check Admission", 28 29 ) 29 30 if psm == 'invalid': 30 return context.c learance_pin_form(rendered = res,31 return context.check_admission_pin_form(rendered = res, 31 32 psm = "Please correct your input.", 32 33 #psm = "%s, %s" % (psm,ds), … … 36 37 ) 37 38 elif psm == '': 38 return context.c learance_pin_form(rendered = res,39 return context.check_admission_pin_form(rendered = res, 39 40 psm = None, 40 41 firstlayout = True, … … 44 45 elif psm == 'valid': 45 46 s_id = ds.get('s_id') 47 student = getattr(context.campus.students, s_id) 48 review_state = wf.getInfoFor(student,'review_state',None) 49 if review_state == "finally_rejected": 50 url = "%s/campus/students/%s/pume/finally_rejected_view" % (context.portal_url(),s_id) 51 return redirect(url) 46 52 pin = str(ds.get('app_ac_pin')) 47 return context.REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s"53 return redirect("%s/logged_in?__ac_name=%s&__ac_password=%s&pin=%s" 48 54 % (context.absolute_url(),s_id,pin.split('-')[2],pin)) 49 55 return 50 51 -
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r770 r785 28 28 if context.isManager() and 'students' in path_info: 29 29 student_id = path_info[path_info.index('students')+1] 30 elif member_id == "Anonymous User": 31 return None 30 32 else: 31 33 student_id = member_id 32 34 else: 33 35 student_id = student.getId() 34 res = context.portal_catalog(id = student_id,portal_type='Student') 35 if not res:# or len(res) > 1: 36 student_path = "/srp/campus/students/%s" % student_id 37 student = context.restrictedTraverse(student_path,default=None) 38 if student is None or student.portal_type != 'Student': 36 39 return None 37 brain = res[-1] 38 student = brain.getObject() 39 student_path = brain.getPath() 40 ##res = context.portal_catalog(id = student_id,portal_type='Student') 41 ##if not res:# or len(res) > 1: 42 ## return None 43 ##brain = res[-1] 44 ##student = brain.getObject() 40 45 info['review_state'] = wf.getInfoFor(student,'review_state',None) 41 46 info['student'] = student … … 47 52 info['per'] = student.personal 48 53 info['per_doc'] = student.personal.getContent() 54 course = getattr(student,'study_course',None) 55 info['course'] = course 56 if course: 57 info['course_doc'] = student.study_course.getContent() 49 58 info['sex'] = 'male' 50 59 if info['per_doc'].sex: 51 60 info['sex'] = 'female' 52 res = context.portal_catalog(container_path=student_path, 53 portal_type='StudentAccommodation') 54 if res: 55 acco = res[0].getObject() 56 info['acco'] = acco 61 ##res = context.portal_catalog(container_path=student_path, 62 ## portal_type='StudentAccommodation') 63 ##if res: 64 ## acco = res[0].getObject() 65 acco = getattr(student,'accommodation',None) 66 if acco.portal_type != "StudentAccomodation": 67 acco = None 68 info['acco'] = acco 69 if acco is not None: 57 70 info['acco_doc'] = acco.getContent() 58 71 info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None) 59 else: 60 info['acco'] = None 61 res = context.portal_catalog(container_path=student_path, 62 portal_type='StudentClearance') 63 if res: 64 clear = res[0].getObject() 65 info['clear'] = clear 72 ##res = context.portal_catalog(container_path=student_path, 73 ## portal_type='StudentClearance') 74 ##if res: 75 ## clear = res[0].getObject() 76 ## info['clear'] = clear 77 clear = getattr(student,'clearance',None) 78 info['clear'] = clear 79 if clear is not None: 66 80 info['clear_doc'] = clear.getContent() 67 81 info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None) 68 else:69 info['clear'] = None70 82 71 res = context.portal_catalog(container_path=student_path, 72 portal_type='StudentPume') 73 if res: 74 pume = res[0].getObject() 75 info['pume'] = clear 83 ##res = context.portal_catalog(container_path=student_path, 84 ## portal_type='StudentPume') 85 ##if res: 86 ## pume = res[0].getObject() 87 ## info['pume'] = clear 88 pume = getattr(student,'pume',None) 89 info['pume'] = pume 90 if pume is not None: 76 91 info['pume_doc'] = pume.getContent() 77 92 info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None) -
WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt
r684 r785 11 11 12 12 13 <table class="registration" >13 <table class="registration" tal:condition="info|nothing"> 14 14 15 15 <span tal:condition="python:path('info/review_state')=='application_pin_entered'"> -
WAeUP_SRP/trunk/skins/waeup_student/student_index.py
r770 r785 32 32 if state == 'admission_applied': 33 33 return redirect("%s/application_view" % student.absolute_url()) 34 elif state in ('application_pin_entered', 'admitted'):34 elif state in ('application_pin_entered',): 35 35 return redirect("%s/application_edit" % student.absolute_url()) 36 elif state in ('admitted',): 37 return redirect("%s/defer_view" % student.absolute_url()) 36 38 elif state == 'clearance_pin_entered': 37 39 return redirect("%s/student_view" % info['clear'].absolute_url())
Note: See TracChangeset for help on using the changeset viewer.