Changeset 886 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 17 Nov 2006, 16:27:37 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
r885 r886 1 ## Script (Python) " searchStudents"1 ## Script (Python) "co_searchStudents" 2 2 ##bind container=container 3 3 ##bind context=context … … 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters= 7 ##parameters=REQUEST 8 8 ##title= 9 9 ## 10 10 # $Id$ 11 11 """ 12 return Info about the current Student 12 list Students for ClearanceOfficers 13 13 """ 14 request = REQUEST 15 wftool = context.portal_workflow 16 mtool = context.portal_membership 17 member = mtool.getAuthenticatedMember() 18 roles = member.getRolesInContext(context) 14 19 try: 15 20 from Products.AdvancedQuery import Eq, Between, Le,In … … 44 49 pr = context.portal_registration 45 50 path_info = request.get('PATH_INFO').split('/') 46 is_manager = context.isManager 51 is_manager = context.isManager() 47 52 validate = request.has_key("cpsdocument_edit_button") 48 53 default = {'search_mode': 'name', 49 'review_state': ' all',54 'review_state': 'clearance_requested', 50 55 'search_string': '' 51 56 } … … 155 160 if items: 156 161 for item in items: 157 info = context.getStudentInfo(item) 158 students.append(info) 162 #if context.isClearanceOfficer(info): 163 if "ClearanceOfficers" in member.getGroups(): 164 droles = member.getRolesInContext(item) 165 if "ClearanceOfficer" in droles: 166 info = context.getStudentInfo(item) 167 students.append(info) 168 else: 169 info = context.getStudentInfo(item) 170 students.append(info) 171 159 172 return context.students_manager_view(rendered = rend, 160 psm = "%d,%d matching Students found QS = %s" %\ 161 (len(review_set),len(search_set),query_step), 173 psm = "", 174 #psm = "%d,%d matching Students found QS = %s" %\ 175 # (len(review_set),len(search_set),query_step), 162 176 #psm = "%d found QS = %s items: %s" % (len(items),query_step,items), 163 177 students = students, … … 169 183 allowed = True, 170 184 ) 185 186 -
WAeUP_SRP/trunk/skins/waeup_student/students_index.py
r881 r886 24 24 25 25 if "ClearanceOfficers" in member.getGroups(): 26 return redirect("%s/ co_searchStudents" % students_url)26 return redirect("%s/searchStudents" % students_url) 27 27 if context.isManager(): 28 28 return redirect("%s/searchStudents" % students_url)
Note: See TracChangeset for help on using the changeset viewer.