Changeset 1025 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 10 Dec 2006, 18:39:15 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
r859 r1025 23 23 # (We don't call getEditableContent here, validate does it when needed.) 24 24 doc = context.getContent() 25 if context.portal_type == "StudentStudyCourse": 26 if len(context.objectIds()) > 0: 27 psm = 'Edit of StudyCourse is only possible if there are no levels' 28 args = getFormUidUrlArg(REQUEST) 29 args['portal_status_message'] = psm 30 url = context.absolute_url() + '?' + urlencode(args) 31 REQUEST.RESPONSE.redirect(url) 32 25 33 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster, 26 34 use_session=True) … … 36 44 comments = REQUEST.get('comments') 37 45 context.cpsdocument_notify_modification(comments=comments) 46 if context.portal_type == "StudentStudyCourse": 47 course = ds.get('study_course') 48 student_id = context.getStudentId() 49 res = context.portal_catalog(portal_type='Certificate',id = course) 50 if res: 51 c_brain = res[0] 52 c_path = c_brain.getPath().split('/') 53 student_id = context.getStudentId() 54 context.students_catalog.modifyRecord(id = student_id, 55 course = course, 56 faculty = c_path[-4], 57 department = c_path[-3], 58 ) 38 59 if cpsdocument_edit_and_view_button is not None: 39 60 action = ''
Note: See TracChangeset for help on using the changeset viewer.