Changeset 1870 for WAeUP_SRP/trunk/skins
- Timestamp:
- 8 Jun 2007, 16:13:05 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/getReviewInfo.py
r1819 r1870 25 25 d_review = '' 26 26 if context.portal_type != "Student": 27 student_id = context.getStudentId() 28 if student_id: 29 res = context.portal_catalog(id = student_id,portal_type='Student') 30 if res: 31 s_review = res[-1].review_state 32 return "%s / %s" % (s_review,d_review) 27 s_review = context.getStudentReviewState() 28 if s_review: 29 return "%s / %s" % (s_review,d_review) 30 # student_id = context.getStudentId() 31 # if student_id: 32 # res = context.portal_catalog(id = student_id,portal_type='Student') 33 # if res: 34 # return "%s / %s" % (s_review,d_review) 33 35 return "%s" % (d_review) 34 36 -
WAeUP_SRP/trunk/skins/waeup_student/getStudentReviewState.py
r1845 r1870 12 12 return the review_state of the Student 13 13 """ 14 from Products.AdvancedQuery import Eq, Between, Le,In15 14 try: 16 aq_portal = context.portal_catalog.evalAdvancedQuery15 from Products.zdb import set_trace 17 16 except: 18 aq_portal = context.portal_catalog_real.evalAdvancedQuery 17 def set_trace(): 18 pass 19 # from Products.AdvancedQuery import Eq, Between, Le,In 20 # try: 21 # aq_portal = context.portal_catalog.evalAdvancedQuery 22 # except: 23 # aq_portal = context.portal_catalog_real.evalAdvancedQuery 19 24 if student_id is None: 20 25 student_id = context.getStudentId() 21 query = Eq('id',student_id) 22 res = aq_portal(query) 26 #query = Eq('id',student_id) 27 #res = aq_portal(query) 28 res = context.students_catalog(id = student_id) 23 29 if not res: 24 30 return None
Note: See TracChangeset for help on using the changeset viewer.