Changeset 1811
- Timestamp:
- 23 May 2007, 16:34:51 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/create_level.py
r1770 r1811 102 102 context.portal_workflow.doActionFor(course_result,'open') 103 103 course_result.getContent().edit(mapping=d) 104 level['create_course_results'](cert_id,current_level)105 ##res = context.portal_catalog(portal_type="Certificate", id = cert_id)106 ##l = []107 ##if res:108 ##cert = res[0]109 ##path = cert.getPath()110 ###set_trace()111 ##query = Eq("path","%s/%s" % (path,current_level)) &\112 ##Eq('portal_type','CertificateCourse')113 ##courses = aq_portal(query)114 ##for c in courses:115 ##d = context.getCourseInfo(c.getId)116 ##cr_id = level.invokeFactory('StudentCourseResult',c.getId)117 ##course_result = getattr(level,cr_id)118 ##context.portal_workflow.doActionFor(course_result,'open')119 ##d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')120 ##course_result.getContent().edit(mapping=d)104 #level['create_course_results'](cert_id,current_level) 105 res = context.portal_catalog(portal_type="Certificate", id = cert_id) 106 l = [] 107 if res: 108 cert = res[0] 109 path = cert.getPath() 110 #set_trace() 111 query = Eq("path","%s/%s" % (path,current_level)) &\ 112 Eq('portal_type','CertificateCourse') 113 courses = aq_portal(query) 114 for c in courses: 115 d = context.getCourseInfo(c.getId) 116 cr_id = level.invokeFactory('StudentCourseResult',c.getId) 117 course_result = getattr(level,cr_id) 118 context.portal_workflow.doActionFor(course_result,'open') 119 d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective') 120 course_result.getContent().edit(mapping=d) 121 121 122 122 return response.redirect("%s/%s" % (context.absolute_url(),current_level))
Note: See TracChangeset for help on using the changeset viewer.