Changeset 572 for WAeUP_SRP/trunk
- Timestamp:
- 27 Sep 2006, 17:03:31 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r565 r572 296 296 import transaction 297 297 tr_count = 0 298 name = 'SampleJAMBDataII _short'298 name = 'SampleJAMBDataII' 299 299 wftool = self.portal_workflow 300 300 no_import = False -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r537 r572 25 25 </permission-map> 26 26 <permission-map name="View" acquired="False"> 27 <permission-role>Owner</permission-role> 28 <permission-role>Manager</permission-role> 29 <permission-role>SectionManager</permission-role> 27 30 </permission-map> 28 31 </state> -
WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
r565 r572 15 15 form = request.form 16 16 fget = form.get 17 info = {} 17 18 wf = context.portal_workflow 19 catalog = context.portal_catalog 20 student_wf_states = wf.waeup_student_wf.states.keys() 21 info['wf_states'] = student_wf_states 22 info['wf_states'][0] = " ----- " 23 18 24 mtool = context.portal_membership 19 25 member = mtool.getAuthenticatedMember() 20 26 path_info = request.get('PATH_INFO').split('/') 21 27 roles = member.getRoles() 22 info = {}23 28 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles 24 29 student_id = fget('student_id') … … 26 31 matric_no = fget('matric_no') 27 32 name = fget('name') 28 info['students'] = [] 33 state = fget('state') 34 if state == " ----- ": 35 state = '' 36 onlyreview = state and not (student_id or jamb_id or matric_no or name) 37 items = [] 38 res = [] 39 portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']} 40 if onlyreview: 41 res = catalog(portal_type=portal_type_query, 42 review_state=state) 43 elif student_id: 44 res = catalog(portal_type='Student', 45 id = student_id.strip()) 46 elif jamb_id: 47 res = catalog(portal_type='StudentApplication', 48 SearchableText="%s*" % jamb_id.strip().lower()) 49 elif matric_no: 50 res = catalog(portal_type='StudentClearance', 51 SearchableText="%s*" % matric_no.strip().lower()) 52 elif name: 53 res = catalog(portal_type=portal_type_query, 54 SearchableText="%s*" % name.strip()) 55 if res: 56 for r in res: 57 row = {} 58 if r.portal_type in ("StudentApplication","StudentPersonal"): 59 items.append(r.getObject().aq_parent) 60 else: 61 items.append(r.getObject()) 62 info['state'] = state 63 info['student_id'] = student_id 64 info['jamb_id'] = jamb_id 65 info['matric_no'] = matric_no 66 info['name'] = name 67 68 info['students'] = items 29 69 return info -
WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt
r563 r572 12 12 <span tal:condition="isManager"> 13 13 <h3>Search Students by</h3> 14 <br /> 15 <form action="." method="post" tal:attributes="action context/absolute_url"> 16 <table> 17 <tr> 18 <td>StudentId</td><td><input type="text" name="student_id" /></td> 19 <td>JAMB Id</td><td><input type="text" name="jamb_id" /></td> 14 <br /> 15 <form action="." method="post" tal:attributes="action string: ${context/absolute_url}/students_manager_view"> 16 <table> 17 <tr> 18 <td>Status</td><td><div class="field"><span tal:condition="python:0" tal:content="info/wf_states"/> 19 <select name="state" tal:condition="python:1"> 20 <option value="state" 21 tal:repeat="state info/wf_states" 22 tal:attributes="value state;selected python: info['state'] == state" 23 tal:content="state"></option> 24 </select> 25 </div> 26 </td> 27 </tr> 28 <tr> 29 <td>StudentId</td><td><input type="text" name="student_id" 30 tal:attributes="value info/student_id"/></td> 31 <td>Student Name</td><td><input type="text" name="name" 32 tal:attributes="value info/name"/></td> 20 33 </tr> 21 34 <tr> 22 <td>Matric No</td><td><input type="text" name="matric_no" /></td> 23 <td>Student Name</td><td><input type="text" name="name" /></td> 35 <td>Matric No</td><td><input type="text" name="matric_no" 36 tal:attributes="value info/matric_no"/></td> 37 <td>JAMB Id</td><td><input type="text" name="jamb_id" 38 tal:attributes="value info/jamb_id"/></td> 24 39 </tr> 40 <tr><td><input type="submit" class="context" name="search" value="search" /></td></tr> 25 41 </table> 26 42 </form>
Note: See TracChangeset for help on using the changeset viewer.