Changeset 2253
- Timestamp:
- 17 Sep 2007, 11:14:24 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_layout/layout_search_edit.pt
r2243 r2253 7 7 faculties options/faculties|nothing; 8 8 departments options/departments|nothing; 9 certificate_levels options/certificate_levels|nothing; 9 10 " 10 11 > … … 17 18 <input type="hidden" name="departments" tal:condition="departments" 18 19 tal:attributes="value departments"> 20 <input type="hidden" name="certificate_levels" tal:condition="certificate_levels" 21 tal:attributes="value certificate_levels"> 19 22 <div class=''> 20 23 <div class='documentFields'> -
WAeUP_SRP/base/skins/waeup_student/search_students.py
r2250 r2253 64 64 faculties = fget('faculties') 65 65 departments = fget('departments') 66 certificate_level = fget('certificate_level')67 dep_str = fac_str = certificate_level _str = ''66 certificate_levels = fget('certificate_levels') 67 dep_str = fac_str = certificate_levels_str = '' 68 68 69 69 if "ClearanceOfficers" in member.getGroups(): … … 101 101 only_review = False 102 102 ca_view = True 103 if certificate_level :103 if certificate_levels: 104 104 #from Products.zdb import set_trace;set_trace() 105 certificate_level _str = certificate_level106 certificate_level = certificate_level.split()105 certificate_levels_str = certificate_levels 106 certificate_levels = certificate_levels.split() 107 107 else: 108 108 query = In('portal_type',('StudyLevel',)) &\ 109 109 In('localUsersWithRoles', ("user:%s" % member,)) 110 110 res = aq_portal(query) 111 111 112 112 logger.info('CourseAdviser %s initiated student_search' % member) 113 certificate_level = []114 if res: 115 certificate_level = ['/'.join(f.getPath().split('/')[-2:]) for f in res]116 user_info['certificate_level '] = certificate_level117 certificate_level _str = " ".join(certificate_level)118 113 certificate_levels = [] 114 if res: 115 certificate_levels = ['/'.join(f.getPath().split('/')[-2:]) for f in res] 116 user_info['certificate_levels'] = certificate_levels 117 certificate_levels_str = " ".join(certificate_levels) 118 119 119 default = {'search_mode': 'student_id', 120 120 'review_state': state, … … 130 130 faculties = fac_str, 131 131 departments = dep_str, 132 certificate_level = certificate_level_str,132 certificate_levels = certificate_levels_str, 133 133 commit = False, 134 134 ) … … 212 212 review_res = aq_students(query) 213 213 logger.info('%s searches for students in review_state %s' % (member,state)) 214 214 215 215 if co_view: 216 216 only_review = False … … 222 222 only_review = False 223 223 with_review = True 224 courses = [cl.split('/')[0] for cl in certificate_level ]225 levels = [cl.split('/')[1] for cl in certificate_level ]224 courses = [cl.split('/')[0] for cl in certificate_levels] 225 levels = [cl.split('/')[1] for cl in certificate_levels] 226 226 query = In('course',courses) & In('level',levels) 227 227 res = aq_students(query) … … 230 230 review_set = [r.id for r in review_res] 231 231 232 #from Products.zdb import set_trace;set_trace() 232 #from Products.zdb import set_trace;set_trace() 233 233 234 234 if only_review: … … 241 241 else: 242 242 all = search_set 243 243 244 244 items = all[:500] 245 245 students = []
Note: See TracChangeset for help on using the changeset viewer.