Changeset 971 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 30 Nov 2006, 19:31:01 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r966 r971 34 34 student_path = "%s/campus/students/%s" % (context.portal_url.getPortalPath(),student_id) 35 35 student = context.restrictedTraverse(student_path,default=None) 36 #from Products.zdb import set_trace 37 #set_trace() 38 36 39 if student is None or student.portal_type != 'Student': 37 40 return None -
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r966 r971 62 62 ob=default, 63 63 layout_mode='edit', 64 formaction="search_students" 64 formaction="search_students", 65 commit = False, 65 66 ) 66 67 if psm == '': … … 68 69 psm = psm, 69 70 #psm = "%s, %s" % (psm,ds), 70 students = items,71 students = [], 71 72 allowed = True, 72 73 ) … … 127 128 if res: 128 129 for r in res: 129 if r.portal_type in ("StudentStudyLevel",): 130 student = r.getObject().aq_parent.aq_parent 131 elif r.portal_type in student_subobjects: 132 student = r.getObject().aq_parent 133 else: 134 student = r.getObject() 135 search_set.append(student) 130 pl = r.getPath().split('/') 131 search_set.append(pl[pl.index('students') + 1]) 136 132 review_set = [] 137 133 if review_res: 138 134 for r in review_res: 139 if r.portal_type in ("StudentStudyLevel",): 140 student = r.getObject().aq_parent.aq_parent 141 elif r.portal_type in student_subobjects: 142 student = r.getObject().aq_parent 143 else: 144 student = r.getObject() 145 review_set.append(student) 135 pl = r.getPath().split('/') 136 review_set.append(pl[pl.index('students') + 1]) 146 137 all = [] 147 138 if only_review: … … 158 149 items.append(a) 159 150 students = [] 160 items.sort( cmp_id)151 items.sort() 161 152 co_view = False 162 153 if items: 163 154 for item in items: 164 155 #if context.isClearanceOfficer(info): 156 info = {} 165 157 if "ClearanceOfficers" in member.getGroups(): 166 158 co_view = True 167 droles = member.getRolesInContext(item)168 if "ClearanceOfficer" in droles:169 info = context.getStudentInfo(item)170 students.append(info)159 ## droles = member.getRolesInContext(item) 160 ## if "ClearanceOfficer" in droles: 161 ## info = context.getStudentInfo(item) 162 ## students.append(info) 171 163 else: 172 info = context.getStudentInfo(item) 173 students.append(info) 164 #info = context.getStudentInfo(item) 165 info = context.students_catalog(id = item) 166 if len(info) == 1: 167 students.append(info[0]) 174 168 175 169 return context.search_students_form(rendered = rend, -
WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
r966 r971 55 55 <tr tal:condition="student" 56 56 tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')"> 57 <td><a href="id" tal:attributes="href string:${ student/student/absolute_url}"57 <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}" 58 58 tal:content="student/id"></a></td> 59 59 <td> 60 60 <span tal:replace="student/name" /> 61 61 </td> 62 <td><span tal:replace=" python: student['app_doc'].jamb_reg_no" /></td>62 <td><span tal:replace="student/jamb_reg_no" /></td> 63 63 <td tal:condition="options/co_view|nothing"> 64 64 <a href="id" … … 67 67 onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')" 68 68 >[change state]</a></td> 69 <td tal:condition=" not:options/co_view|nothing"><span tal:replace="student/review_state" /></td>69 <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state" /></td> 70 70 </tr> 71 71 </span>
Note: See TracChangeset for help on using the changeset viewer.