Changeset 2407 for WAeUP_SRP/base/skins
- Timestamp:
- 21 Oct 2007, 06:21:25 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 4 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/cps_custom/logged_in.py
r2217 r2407 45 45 student_app = getattr(student,'application',None) 46 46 student_per = getattr(student,'personal',None) 47 48 ######################################################### 49 50 # perform makeStudentData for returning students who login for the first time 51 # the returning key comes from set_access_data 52 47 53 if request.has_key('returning') and student_app is None: 48 54 email=request.get("email") … … 60 66 context.waeup_tool.makeStudentData(str(member)) 61 67 student_app = getattr(student,'application',None) 68 69 ######################################################### 70 71 # add missing payments folders 72 62 73 if 'payments' not in student.objectIds(): 63 74 student.invokeFactory('PaymentsFolder','payments') … … 67 78 d['Title'] = 'Online Payments' 68 79 payments.getContent().edit(mapping=d) 69 student_pume = getattr(student,'pume',None) 80 81 ######################################################### 82 83 #student_pume = getattr(student,'pume',None) 70 84 s_review_state = context.getStudentReviewState(student.id) 71 85 a_review_state = wftool.getInfoFor(student_app,'review_state',None) … … 74 88 logger.info('%s logged in, review_state %s' % (member,s_review_state)) 75 89 app_doc = student_app.getContent() 90 91 ######################################################### 92 93 # save email and phone of returning students after all objects have been created 76 94 77 95 if request.has_key('returning'): … … 88 106 per_doc.edit(mapping = {'email' : email, 'phone' : phone}) 89 107 wftool.doActionFor(student_app,'close') 90 91 #from Products.zdb import set_trace;set_trace() 108 109 ######################################################### 110 111 # look for passport pictures of returning students 112 92 113 if s_review_state == 'returning' and 'passport' not in app_doc.objectIds(): 93 114 folder = 'pictures_returning' … … 96 117 msg = context.waeup_tool.loadStudentFoto(student,filename,folder) 97 118 logger.info('%s (%s), %s' % (member,s_review_state,msg)) 119 120 121 ######################################################### 122 123 # look for passport pictures of new students 124 98 125 if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested') and 'passport' not in app_doc.objectIds(): 99 126 folder = 'pictures_admitted_latest' … … 101 128 msg = context.waeup_tool.loadStudentFoto(student,filename,folder) 102 129 logger.info('%s (%s), %s' % (member,s_review_state,msg)) 130 131 132 ######################################################### 133 134 # perform necessary updates for new students 135 136 # 1. add pin and application date to app_doc 137 103 138 if s_review_state in ("student_created","admitted") and\ 104 139 a_review_state == 'created' : 105 140 wftool.doActionFor(student_app,'open') 106 if student_pume is not None:107 wftool.doActionFor(student_pume,'close')141 #if student_pume is not None: 142 # wftool.doActionFor(student_pume,'close') 108 143 da = {} 109 144 pin = request.get('pin') 145 146 # if the student comes directly, add missing pin (fix) 110 147 if not pin: 111 148 jamb_reg_no = app_doc.jamb_reg_no … … 123 160 da['app_ac_date'] = current 124 161 app_doc.edit(mapping = da) 162 163 # 2. same as 1 but without opening app_doc 164 125 165 elif s_review_state in ("admitted") and a_review_state == 'opened' and\ 126 166 not app_doc.app_ac_pin: … … 139 179 da['app_ac_pin'] = pin 140 180 app_doc.edit(mapping = da) 181 182 # 2. open personal object. This should be done in clearance_edit. 183 141 184 elif s_review_state in ("cleared_and_validated",) and\ 142 185 p_review_state == 'created' : 143 186 wftool.doActionFor(student_per,'open') 187 188 ######################################################### 189 144 190 res = context.students_catalog(id = str(member)) 145 191 matric_no = res[0].matric_no 146 192 verdict = res[0].verdict 193 194 ######################################################### 195 196 # fetch current verdict via getVerdict 197 147 198 if s_review_state in ('returning','school_fee_paid') and not verdict: 148 199 results = context.results_import(matric_no = matric_no) … … 157 208 study_course_doc.edit(mapping = dsc) 158 209 wftool.doActionFor(study_course,'close_for_edit') 210 211 ######################################################### 212 159 213 has_results = context.results_import(matric_no = matric_no) 214 215 ######################################################### 216 217 # determine appropriate redirect url 218 160 219 if s_review_state == "application_pin_entered": 161 220 redirect_url = "%s/application_edit_form" % student.absolute_url() … … 172 231 else: 173 232 redirect_url = "%s/student_index" % student.absolute_url() 233 234 174 235 else: 175 236 logger.info('%s logged in' % (member)) -
WAeUP_SRP/base/skins/waeup_layout/portlet_student_workflow_display.pt
r2243 r2407 11 11 12 12 <table class="registration" tal:condition="not:info/cr"> 13 <span tal:condition="python:path('info/review_state')=='application_pin_entered'">14 <tr><td class="active">15 <a href="" tal:attributes="href string:${info/url}/application_edit_form">16 Admission started17 </a>18 </td></tr>19 </span>20 <span tal:condition="python:path('info/review_state')!='application_pin_entered'">21 <tr><td>22 Admission started23 </td></tr>24 </span>25 <span tal:condition="python:path('info/review_state')=='admission_applied'">26 <tr><td class="active">27 <a href="" tal:attributes="href string:${info/url}/application_view">28 Admission requested29 </a>30 </td></tr>31 </span>32 <span tal:condition="python:path('info/review_state')!='admission_applied'">33 <tr><td>34 Admission requested35 </td></tr>36 </span>37 <span tal:condition="python:path('info/review_state')=='pume_passed'">38 <tr><td class="active">PUME passed</td></tr>39 </span>40 <span tal:condition="python:path('info/review_state')=='pume_failed'">41 <tr><td class="stopped">PUME failed</td></tr>42 </span>43 <span tal:condition="python:not path('info/review_state') in ('pume_passed', 'pume_failed',)">44 <tr><td>PUME passed</td></tr>45 </span>46 13 <span tal:condition="python:path('info/review_state')=='admitted'"> 47 14 <tr> -
WAeUP_SRP/base/skins/waeup_student/check_admission.py
r2002 r2407 69 69 student = getattr(context.campus.students, s_id) 70 70 review_state = wf.getInfoFor(student,'review_state',None) 71 if review_state == "admission_rejected":72 url = "%s/campus/students/%s/pume/admission_rejected_view" % (context.portal_url(),s_id)73 return redirect(url)71 #if review_state == "admission_rejected": 72 # url = "%s/campus/students/%s/pume/admission_rejected_view" % (context.portal_url(),s_id) 73 # return redirect(url) 74 74 pw = str(ds.get('app_ac_pin_n')) 75 75 args = {} -
WAeUP_SRP/base/skins/waeup_student/getStudentFolderInfo.py
r1871 r2407 80 80 'StudentStudyCourse': 'study_course_view', 81 81 'PaymentsFolder': 'payments_view', 82 'StudentPume': 'pume_view',83 82 } 84 83 sos = context.portal_catalog(container_path=student_path_root) -
WAeUP_SRP/base/skins/waeup_student/getStudentInfo.py
r2043 r2407 57 57 if student is None or student.portal_type != "Student": 58 58 return None 59 ##res = context.portal_catalog(id = student_id,portal_type='Student')60 ##if not res:# or len(res) > 1:61 ## return None62 ##brain = res[-1]63 ##student = brain.getObject()64 59 65 60 info['review_state'] = context.getStudentReviewState() … … 70 65 info['app'] = student.application 71 66 info['app_doc'] = student.application.getContent() 72 #info['per'] = getattr(student,'personal',None) 73 #info['sex'] = 'male' 74 #if info['per'] is not None: 75 # info['per_doc'] = student.personal.getContent() 76 # if info['per_doc'].sex: 77 # info['sex'] = 'female' 78 #else: 79 # if info['app_doc'].jamb_sex == "F": 80 # info['sex'] = 'female' 67 81 68 course = getattr(student,'study_course',None) 82 69 if course: … … 95 82 else: 96 83 info['course'] = None 97 #98 99 #clear = getattr(student,'clearance',None)100 #info['clear'] = clear101 #if clear is not None:102 # info['clear_doc'] = clear.getContent()103 # info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)104 #105 #pume = getattr(student,'pume',None)106 #info['pume'] = pume107 #if pume is not None:108 # info['pume_doc'] = pume.getContent()109 # info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)110 #else:111 # info['pume'] = None112 84 113 85 if not with_items:
Note: See TracChangeset for help on using the changeset viewer.