Changeset 3818 for WAeUP_SRP/trunk/skins
- Timestamp:
- 15 Dec 2008, 15:31:55 (16 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/lecturer_course_edit.py
r3786 r3818 9 9 # $Id: course_edit.py 1071 2006-12-16 15:53:13Z joachim $ 10 10 """ 11 This method is for demonstration purposes only.12 There is noi security to deter lecturers from editing courses they are not allowed to edit.13 11 """ 14 12 try: … … 34 32 requested_id = context.getStudentId() 35 33 if not 'Lecturers' in groups and not context.isSectionOfficer(): 36 logger.info('%s tried to access course result of %s ' % (member_id,requested_id))34 logger.info('%s tried to access course result of %s but is not a lecturer' % (member_id,requested_id)) 37 35 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 38 36 … … 48 46 mode = 'edit' 49 47 object = {} 50 course = course_results[0] 48 course_result = course_results[0] 49 course = context.courses_catalog(code=course_id)[0] 50 lecturer_id = getattr(course,'lecturer',None) 51 #set_trace() 52 if str(lecturer_id) != member_id: 53 logger.info('%s tried to access course result %s of %s but is not a lecturer of this course' % (member_id,course_id,requested_id)) 54 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 55 51 56 for field in context.course_results.schema(): 52 object[field] = getattr(course ,field,None)57 object[field] = getattr(course_result,field,None) 53 58 if repr(object[field]) == 'Missing.Value': 54 59 object[field] = None 55 #set_trace()60 56 61 lt = context.portal_layouts 57 62 res,psm, ds = lt.renderLayout(schema_id = 'student_course_result',
Note: See TracChangeset for help on using the changeset viewer.