Changeset 1520 for WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
- Timestamp:
- 6 Mar 2007, 18:26:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
r1519 r1520 13 13 """ 14 14 from urllib import urlencode 15 try: 16 from Products.zdb import set_trace 17 except: 18 def set_trace(): 19 pass 15 20 request = context.REQUEST 16 21 course_cat = context.courses_catalog … … 38 43 url = "%s?%s" % (context.absolute_url(),urlencode(args)) 39 44 return request.RESPONSE.redirect(url) 40 ##cert_id = context.aq_parent.getContent().study_course41 ##res = context.portal_catalog(portal_type="Certificate", id = cert_id)42 ##l = []43 ##if res:44 ## cert = res[0]45 ## path = cert.getPath()46 ## query = Eq("path",path) &\47 ## Eq('portal_type','CertificateCourse') &\48 ## Eq('SearchableText', "%s" % student.level) &\49 ## Eq('id',course_id)50 ##course = aq_portal(query)[0]51 45 cr_id = context.invokeFactory('StudentCourseResult',course_id) 52 ##d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective') 53 ##getattr(context,cr_id).getContent().edit(mapping=d) 46 #set_trace() 47 cr = getattr(context,cr_id) 48 context.portal_workflow.doActionFor(cr,'open') 49 cr.getContent().edit(mapping=d) 50 context.portal_workflow.doActionFor(cr,'close') 54 51 args['course_id'] = course_id 55 52 from urllib import urlencode
Note: See TracChangeset for help on using the changeset viewer.