Changeset 3101
- Timestamp:
- 4 Feb 2008, 12:45:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/uniben/waeup_custom/getStudyLevelInfo.py
r2965 r3101 12 12 return Info about the Studylevel 13 13 """ 14 15 wf = context.portal_workflow16 mtool = context.portal_membership17 if mtool.isAnonymousUser():18 return None19 member = mtool.getAuthenticatedMember()20 member_id = str(member)21 22 14 try: 23 15 from Products.zdb import set_trace … … 26 18 pass 27 19 20 info = context.waeup_tool.getAccessInfo(context) 21 student_id = info['student_id'] 22 if student_id is None: 23 return None 28 24 29 # from Products.AdvancedQuery import Eq, Between, Le,In 30 # try: 31 # aq_portal = context.portal_catalog.evalAdvancedQuery 32 # except: 33 # aq_portal = context.portal_catalog_real.evalAdvancedQuery 25 mtool = context.portal_membership 26 member = mtool.getAuthenticatedMember() 27 member_id = str(member) 28 34 29 course_results = context.course_results 35 30 request = context.REQUEST … … 38 33 logger = logging.getLogger('Skins.getStudyLevelInfo') 39 34 40 info = {}41 42 student_id = context.getStudentId()43 35 level_id = context.getId() 44 36 level_doc = info['doc'] = context.getContent() 45 37 46 info['is_so'] = is_so = context.isSectionOfficer()47 info['is_student'] = is_student = context.isStudent()38 info['is_so'] = is_so = info['is_sectionofficer'] 39 #info['is_student'] = is_student = context.isStudent() 48 40 info['is_ca'] = is_ca = context.isCourseAdviser() 49 info['student'] = student = context.students_catalog(id=student_id)[0] 41 #info['student'] = student = context.students_catalog(id=student_id)[0] 42 info['student'] = student = context.students_catalog.getRecordByKey(student_id) 50 43 info['review_state'] = review_state = student.review_state 51 44 is_current_level = level_id == student.level … … 60 53 61 54 info['show_check_boxes'] = (is_ca and school_fee_paid and is_current_level and not has_verdict) or\ 62 (i s_studentand school_fee_paid and is_current_level and not has_verdict) or\55 (info['is_student'] and school_fee_paid and is_current_level and not has_verdict) or\ 63 56 (is_so and is_current_level and not has_verdict) 64 57
Note: See TracChangeset for help on using the changeset viewer.