Changeset 1034 for WAeUP_SRP/trunk
- Timestamp:
- 12 Dec 2006, 12:33:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r1033 r1034 57 57 'search_string': '' 58 58 } 59 #from Products.zdb import set_trace60 #set_trace()61 59 rend,psm,ds = lt.renderLayout(layout_id= 'student_search', 62 60 schema_id= 'student_search', … … 75 73 allowed = True, 76 74 ) 77 #set_trace()78 75 what = ds.get('search_mode') 79 76 state = ds.get('review_state') … … 103 100 review_res = None 104 101 query = None 102 review_set = [] 105 103 if len(term) > 0: 106 104 if what == "student_id": … … 113 111 allowed = True, 114 112 ) 113 elif what == "department": 114 res = context.students_catalog(department=term.strip()) 115 search_set = [r.id for r in res] 115 116 elif what in st_queries: 116 117 if what == "jamb_reg_no": … … 128 129 query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip()) 129 130 res = evalAdvancedQuery(query) 130 if with_review:131 query_step += 10132 review_res = evalAdvancedQuery(In('portal_type',student_objects) & Eq('review_state',state))133 131 search_set = [] 134 132 if res: … … 136 134 pl = r.getPath().split('/') 137 135 search_set.append(pl[pl.index('students') + 1]) 138 review_set = [] 139 if review_res:140 for r in review_res:141 pl = r.getPath().split('/') 142 review_set.append(pl[pl.index('students') + 1]) 143 elif what == "department":144 res = context.students_catalog(department=term.strip())145 search_set = [r.id for r in res]136 if with_review: 137 query_step += 10 138 review_res = evalAdvancedQuery(In('portal_type',student_objects) & Eq('review_state',state)) 139 review_set = [] 140 if review_res: 141 for r in review_res: 142 pl = r.getPath().split('/') 143 review_set.append(pl[pl.index('students') + 1]) 146 144 all = [] 147 145 if only_review: … … 153 151 else: 154 152 all = search_set 155 for a in all[: 1000]:153 for a in all[:500]: 156 154 if a in items: 157 155 continue
Note: See TracChangeset for help on using the changeset viewer.