- Timestamp:
- 16 Dec 2006, 15:53:13 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchBasicWidgetsUnprepare.py
r1065 r1071 6 6 # unprepare may be called several times 7 7 pass 8 from Products.CPSSchemas import BasicWidgets9 BasicWidgets.unprepare = unprepare8 from Products.CPSSchemas.BasicWidgets import CPSFileWidget 9 CPSFileWidget.unprepare = unprepare -
WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt
r913 r1071 2 2 member mtool/getAuthenticatedMember; 3 3 isAnon mtool/isAnonymousUser; 4 info context/getStudentInfo;"4 name context/getStudentName;" 5 5 > 6 <tal:block condition=" context/isStudent">6 <tal:block condition="name"> 7 7 <strong> 8 <span tal:con dition="context/isStudent|nothing" tal:content="python:info['student_doc'].Title()" />8 <span tal:content="name" /> 9 9 </strong> 10 10 </tal:block> 11 <tal:block condition="not: context/isStudent">11 <tal:block condition="not:name"> 12 12 <strong> 13 13 <span tal:content="python:member.getProperty('fullname',None)" /> -
WAeUP_SRP/trunk/skins/waeup_student/application_edit.py
r1054 r1071 27 27 # Validate the document and write it if it's valid 28 28 # (We don't call getEditableContent here, validate does it when needed.) 29 info = context.get StudentInfo()29 info = context.getApplicationInfo() 30 30 31 31 if info is None: … … 36 36 app = info['app'] 37 37 app_doc = info['app_doc'] 38 state = context.getStudentInfo()['review_state']38 state = info['review_state'] 39 39 is_valid, ds = app_doc.validate(request=REQUEST, 40 40 schema_id = 'student_application', -
WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt
r1027 r1071 1 <metal:html tal:define="info context/get StudentInfo">1 <metal:html tal:define="info context/getApplicationInfo"> 2 2 <span tal:condition="not: info"> 3 3 <metal:block use-macro="here/illegal_view/macros/illegal_view" /> -
WAeUP_SRP/trunk/skins/waeup_student/getStudentId.py
r1067 r1071 12 12 return StudentId from request 13 13 """ 14 14 15 ptl = context.REQUEST.get('PATH_TRANSLATED').split('/') 15 16 try: … … 17 18 except: 18 19 return None 19 if len(ptl) > id_index + 2: 20 return ptl[id_index + 1] 21 return None 20 if len(ptl) <= id_index + 1: 21 return None 22 student_id = ptl[id_index +1] 23 if len(student_id) != 7: 24 return None 25 try: 26 int(student_id[1:]) 27 return student_id 28 except: 29 return None -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
r803 r1071 8 8 formaction options/formaction|string:application_edit; 9 9 creation creation|nothing; 10 metadata metadata|nothing;11 type_name request/type_name|nothing;12 ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);13 10 cpsmcat nocall:here/translation_service; 14 11 proceed options/proceed|nothing; -
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r1065 r1071 72 72 departments = [f.getId for f in res] 73 73 user_info['departments'] = departments 74 default = {'search_mode': ' name',74 default = {'search_mode': 'student_id', 75 75 'review_state': state, 76 76 'search_string': '' … … 114 114 allowed = True, 115 115 ) 116 st_queries = ('jamb_reg_no','matric_no','name') 117 review_res = None 118 query = None 116 119 items = [] 117 120 res = [] 118 portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}119 st_queries = ('jamb_reg_no','matric_no','name')120 query_step = 0121 review_res = None122 query = None123 121 review_set = [] 124 122 search_set = [] … … 126 124 if what == "student_id": 127 125 students_folder = context.portal_url.getPortalObject().campus.students 128 query_step = 1129 126 if hasattr(students_folder,term.strip()): 130 127 request.RESPONSE.redirect("%s/%s" % (students_folder.absolute_url(),term)) … … 139 136 elif what in st_queries: 140 137 if what == "jamb_reg_no": 141 query_step = 2142 138 pt = ('StudentApplication',) 143 139 st = "%s" % term.strip().lower() 144 140 elif what == "matric_no": 145 query_step = 3146 141 pt = ('StudentClearance',) 147 142 st = "%s" % term.strip().lower() 148 143 elif what == "name": 149 query_step = 4150 144 pt = ('StudentPersonal') 151 145 st = "%s" % term.strip() 152 146 query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip()) 153 147 res = evalAdvancedQuery(query) 154 search_set = []155 148 if res: 156 149 for r in res: … … 164 157 res = aq_students(query) 165 158 search_set = [r.id for r in res] 166 ## res = context.students_catalog(faculty=faculties[0],) 167 ## res = context.students_catalog(faculty=faculties,department=departments) 168 #set_trace() 169 if with_review: 170 query_step += 10 171 #review_res = evalAdvancedQuery(('portal_type',student_objects) & Eq('review_state',state)) 172 review_res = evalAdvancedQuery(Eq('review_state',state)) 159 if with_review and len(search_set) > 0: 160 query = In('id',search_set) & Eq('review_state',state) 161 elif with_review: 162 query = Eq('review_state',state) 163 review_res = evalAdvancedQuery(query) 173 164 review_set = [] 174 165 if review_res: … … 177 168 #review_set.append(pl[pl.index('students') + 1]) 178 169 review_set.append(r.getId) 179 all = []170 all = review_set 180 171 #set_trace() 181 if only_review:182 all = review_set183 elif with_review:184 for i in search_set:185 if i in review_set:186 all.append(i)187 else:188 all = search_set189 ## for a in all[:50]:190 ## if a in items:191 ## continue192 ## items.append(a)172 ##if only_review: 173 ## all = review_set 174 ##elif with_review: 175 ## for i in search_set: 176 ## if i in review_set: 177 ## all.append(i) 178 ##else: 179 ## all = search_set 180 ####for a in all[:50]: 181 #### if a in items: 182 #### continue 183 #### items.append(a) 193 184 items = all[:500] 194 185 students = []
Note: See TracChangeset for help on using the changeset viewer.