Changeset 103 for waeup_product/trunk/skins/waeup_default/create_common.py
- Timestamp:
- 27 Oct 2005, 16:06:03 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_default/create_common.py
r96 r103 39 39 context.invokeFactory(type_name,oid) 40 40 object = getattr(context,oid) 41 okw = {'Title': ds.get('Title'),42 'Description': ds.get('Description')43 }44 41 object.getContent().edit(mapping=ds) 42 context.notifyCPSDocumentCreation(ob=object) 45 43 psm = 'new %s created' % oid 46 44 context_ti = context.portal_types[context.portal_type] 47 45 index = context_ti.getActionById('view','university_view') 48 46 return getattr(context,index)(psm=psm) 49 name = ds.get('name')50 student = getattr(context,s_id)51 student.edit(mapping=skw)52 context.notifyCPSDocumentCreation(ob=student)53 jamb_id = 'JAMB'54 student.invokeFactory('Jamb',jamb_id)55 jamb = getattr(student,jamb_id)56 ds.set('title', name)57 jamb.edit(mapping=ds)58 context.notifyCPSDocumentCreation(ob=jamb)59 psm = 'Student created'60 noCPSMember = False61 try:62 pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student'))63 except:64 noCPSMember = True65 if noCPSMember:66 pr.addMember(s_id, 'UnSeT',roles=('Member',))67 ## groups = context.portal_directories.groups68 ## gm = list(groups.getEntry('Students')['members'])69 ## gm.extend((s_id,))70 ## groups.editEntry({'group': 'Students',71 ## 'members': gm})72 ## return context.create_jamb_form(rendered = res,73 ## psm = psm,74 ## ds = ds,75 ## )76 77 return res,psm,ds78 47
Note: See TracChangeset for help on using the changeset viewer.