Changeset 2977
- Timestamp:
- 3 Jan 2008, 18:47:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/create_level.py
r2794 r2977 25 25 redirect = response.redirect 26 26 logger = logging.getLogger('Skins.create_level') 27 mtool = context.portal_membership 28 member = mtool.getAuthenticatedMember() 29 member_id = str(member) 30 requested_id = context.getStudentId() 31 #set_trace() 32 create_level = request.form.get('create_level',None) 33 if not create_level or not requested_id or\ 34 (not context.isStaff() and member_id != requested_id): 35 logger.info('%s tried to access %s' % (member_id,requested_id)) 36 return redirect("%s/srp_anonymous_view" % context.portal_url()) 37 student_id = context.getStudentId() 27 # mtool = context.portal_membership 28 # member = mtool.getAuthenticatedMember() 29 # member_id = str(member) 30 # requested_id = context.getStudentId() 31 # #set_trace() 32 # create_level = request.form.get('create_level',None) 33 # if not create_level or not requested_id or\ 34 # (not context.isStaff() and member_id != requested_id): 35 # logger.info('%s tried to access %s' % (member_id,requested_id)) 36 # return redirect("%s/srp_anonymous_view" % context.portal_url()) 37 # student_id = context.getStudentId() 38 info = context.waeup_tool.getAccessInfo(context) 39 student_id = info['student_id'] 40 if student_id is None: 41 return None 38 42 39 lt = context.portal_layouts40 wt = context.waeup_tool43 #lt = context.portal_layouts 44 #wt = context.waeup_tool 41 45 student = context.students_catalog.getRecordByKey(student_id) 42 46 cert_id = student.course … … 60 64 #context.portal_workflow.doActionFor(level,'close_for_edit') 61 65 level_id = level.getId() 66 onprobation = context.getContent().previous_verdict in ('C',) 62 67 session_id = context.getLevelSession(level.getContent(),student_id,level_id) 63 68 results = [] … … 110 115 records.append(d) 111 116 # fetch carry_over courses from the course_results catalog 112 el se:117 elif not onprobation: 113 118 res = aq_results(Eq('student_id',student_id), 114 119 sortSpecs=('level_id',))
Note: See TracChangeset for help on using the changeset viewer.