Changeset 1845
- Timestamp:
- 2 Jun 2007, 11:01:49 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTables.py
r1815 r1845 32 32 p_home = Globals.package_home(globals()) 33 33 i_home = Globals.INSTANCE_HOME 34 from Products.CMFCore.CatalogTool import CatalogTool 34 35 from Products.AdvancedQuery import Eq, Between, Le,In 35 36 … … 45 46 return ob 46 47 48 class RealCatalogTool(CatalogTool): 49 meta_type = 'Catalog Tool Real' 50 name = id = "portal_catalog_real" 51 47 52 48 53 class WAeUPTable(ZCatalog): ###( -
WAeUP_SRP/trunk/__init__.py
r1825 r1845 12 12 13 13 import PatchCPSWorkflowWorkflowDefinition 14 #import PatchCatalogToolSearchResults 14 15 import PatchCatalogToolXMLAdapter 15 16 import PatchCPSSchemasAttributeStorageAdapter … … 26 27 import PatchCPSDefaultImportExport 27 28 import PatchRenderActionIcon 28 import PatchZODBConnectionOpen29 #import PatchZODBConnectionOpen 29 30 import Products.WAeUP_SRP.WAeUPPermissions 30 31 import WAeUPTool -
WAeUP_SRP/trunk/profiles/default/toolset.xml
r1625 r1845 1 1 <?xml version="1.0"?> 2 2 <tool-setup> 3 <required tool_id="portal_catalog_real" 4 class="Products.WAeUP_SRP.WAeUPTables.RealCatalogTool"/> 3 5 <required tool_id="portal_accommodation" 4 6 class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/> -
WAeUP_SRP/trunk/skins/waeup_directory/search_members.py
r953 r1845 11 11 12 12 from Products.CPSDirectory.BaseDirectory import SearchSizeLimitExceeded 13 from Products.AdvancedQuery import Eq, Between, Le,In 14 aq_portal = context.portal_catalog.evalAdvancedQuery 13 15 try: 14 from Products.AdvancedQuery import Eq, Between, Le,In 15 evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery 16 aq_portal = context.portal_catalog.evalAdvancedQuery 16 17 except: 17 evalAdvancedQuery = None18 aq_portal = context.portal_catalog_real.evalAdvancedQuery 18 19 19 20 datamodel = datastructure.getDataModel() … … 80 81 query = In('portal_type',('Faculty','Department')) &\ 81 82 In('localUsersWithRoles',('user:%s' % user_id,)) 82 res = evalAdvancedQuery(query)83 res = aq_portal(query) 83 84 facs = [] 84 85 roles = [] -
WAeUP_SRP/trunk/skins/waeup_epayment/check_online_payments.py
r1625 r1845 36 36 response.setHeader('Content-type','text/html; charset=ISO-8859-15') 37 37 response.write("%s<br>\n" % s) 38 from Products.AdvancedQuery import Eq, Between, Le,In 38 39 try: 39 from Products.AdvancedQuery import Eq, Between, Le,In40 40 aq_portal = context.portal_catalog.evalAdvancedQuery 41 aq_students = context.students_catalog.evalAdvancedQuery42 41 except: 43 aq_portal = None 42 aq_portal = context.portal_catalog_real.evalAdvancedQuery 43 aq_students = context.students_catalog.evalAdvancedQuery 44 44 45 45 query1 = Eq('portal_type','Payment') 46 query2 = Eq('SearchableText',"Approved Successful") 46 query2 = Eq('SearchableText',"Approved Successful") 47 47 online_payments = aq_portal(query1 & query2) 48 48 set_trace() -
WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py
r1783 r1845 16 16 if mtool.isAnonymousUser(): 17 17 return None 18 try: 19 from Products.zdb import set_trace 20 except: 21 def set_trace(): 22 pass 18 23 19 24 … … 32 37 request = context.REQUEST 33 38 students = context.portal_url.getPortalObject().campus.students 34 39 #set_trace() 35 40 student_id = context.getStudentId() 36 41 if student_id is None: -
WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
r1648 r1845 25 25 course_cat = context.courses_catalog 26 26 from Products.AdvancedQuery import Eq, Between, Le,In 27 aq_portal = context.portal_catalog.evalAdvancedQuery 27 try: 28 aq_portal = context.portal_catalog.evalAdvancedQuery 29 except: 30 aq_portal = context.portal_catalog_real.evalAdvancedQuery 28 31 course_id = request.get('course_id') 29 32 -
WAeUP_SRP/trunk/skins/waeup_student/create_level.py
r1823 r1845 13 13 pass 14 14 from Products.AdvancedQuery import Eq, Between, Le,In 15 aq_portal = context.portal_catalog.evalAdvancedQuery 15 try: 16 aq_portal = context.portal_catalog.evalAdvancedQuery 17 except: 18 aq_portal = context.portal_catalog_real.evalAdvancedQuery 16 19 aq_courses = context.courses_catalog.evalAdvancedQuery 17 20 … … 37 40 logger.info('%s tried to add already existing level %s' % (student.id,current_level)) 38 41 return 42 logger.info('%s started to create level %s' % (student.id,current_level)) 39 43 40 44 ##if in_progress in ('not started','started'): … … 53 57 else: 54 58 context.invokeFactory('StudentStudyLevel',"%s" % current_level) 55 logger.info('%s started to create level %s' % (student.id,current_level))56 59 level = getattr(context,"%s" % current_level) 57 60 context.portal_workflow.doActionFor(level,'open') … … 76 79 c_res = aq_courses(query) 77 80 if not c_res: 78 logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode))81 #logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode)) 79 82 continue 80 83 course_cat_entry = c_res[0] … … 86 89 score = int(co.Score) 87 90 except: 88 logger.info('%s, course %s has invalid score %s"' % (student.id,89 co.CosCode,90 co.Score))91 # logger.info('%s, course %s has invalid score %s"' % (student.id, 92 # co.CosCode, 93 # co.Score)) 91 94 continue 92 95 if int(c_res[0].passmark) <= score: -
WAeUP_SRP/trunk/skins/waeup_student/getStudentReviewState.py
r1700 r1845 12 12 return the review_state of the Student 13 13 """ 14 from Products.AdvancedQuery import Eq, Between, Le,In 14 15 try: 15 from Products.AdvancedQuery import Eq, Between, Le,In16 16 aq_portal = context.portal_catalog.evalAdvancedQuery 17 17 except: 18 aq_portal = None18 aq_portal = context.portal_catalog_real.evalAdvancedQuery 19 19 if student_id is None: 20 20 student_id = context.getStudentId() -
WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py
r1822 r1845 26 26 27 27 from Products.AdvancedQuery import Eq, Between, Le,In 28 aq_portal = context.portal_catalog.evalAdvancedQuery 28 try: 29 aq_portal = context.portal_catalog.evalAdvancedQuery 30 except: 31 aq_portal = context.portal_catalog_real.evalAdvancedQuery 29 32 request = context.REQUEST 30 33 #session = request.SESSION -
WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py
r1822 r1845 19 19 pass 20 20 from Products.AdvancedQuery import Eq, Between, Le,In 21 aq_portal = context.portal_catalog.evalAdvancedQuery 21 try: 22 aq_portal = context.portal_catalog.evalAdvancedQuery 23 except: 24 aq_portal = context.portal_catalog_real.evalAdvancedQuery 22 25 aq_courses = context.courses_catalog.evalAdvancedQuery 23 26 -
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r1582 r1845 31 31 if is_anon: 32 32 allowed = False 33 from Products.AdvancedQuery import Eq, Between, Le,In 33 34 try: 34 from Products.AdvancedQuery import Eq, Between, Le,In 35 evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery 36 aq_students = context.students_catalog.evalAdvancedQuery 35 aq_portal = context.portal_catalog.evalAdvancedQuery 37 36 except: 38 evalAdvancedQuery = None 37 aq_portal = context.portal_catalog_real.evalAdvancedQuery 38 aq_students = context.students_catalog.evalAdvancedQuery 39 39 40 40 def cmp_id(a,b): … … 81 81 query = In('portal_type',('Faculty',)) &\ 82 82 In('localUsersWithRoles', ("user:%s" % member,)) 83 res = evalAdvancedQuery(query)83 res = aq_portal(query) 84 84 logger.info('ClearanceOfficer %s initiated student_search' % member) 85 85 faculties = [] … … 90 90 query = In('portal_type',('Department',)) &\ 91 91 In('localUsersWithRoles', ("user:%s" % member,)) 92 res = evalAdvancedQuery(query)92 res = aq_portal(query) 93 93 departments = [] 94 94 if res: … … 107 107 query = In('portal_type',('StudyLevel',)) &\ 108 108 In('localUsersWithRoles', ("user:%s" % member,)) 109 res = evalAdvancedQuery(query)109 res = aq_portal(query) 110 110 logger.info('CourseAdviser %s initiated student_search' % member) 111 111 certificate_level = [] … … 195 195 query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip()) 196 196 logger.info('%s searches for student with name %s' % (member,term)) 197 res = evalAdvancedQuery(query)197 res = aq_portal(query) 198 198 if res: 199 199 for r in res: … … 207 207 logger.info('"%s","start 100"' % member) 208 208 query = Eq('review_state',state) 209 review_res = evalAdvancedQuery(query)209 review_res = aq_portal(query) 210 210 211 211 logger.info('%s searches for students in review_state %s' % (member,state)) -
WAeUP_SRP/trunk/skins/waeup_student/student_index.py
r1822 r1845 12 12 return the current student_index 13 13 """ 14 from Products.AdvancedQuery import Eq, Between, Le,In 15 evalAdvancedQuery = context.portal_catalog.evalAdvancedQuery 14 # from Products.AdvancedQuery import Eq, Between, Le,In 15 # try: 16 # aq_portal = context.portal_catalog.evalAdvancedQuery 17 # except: 18 # aq_portal = context.portal_catalog_real.evalAdvancedQuery 16 19 17 20 request = context.REQUEST
Note: See TracChangeset for help on using the changeset viewer.