Ignore:
Timestamp:
6 Mar 2007, 18:26:05 (18 years ago)
Author:
joachim
Message:

Ghana changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py

    r1519 r1520  
    1313"""
    1414from urllib import urlencode
     15try:
     16    from Products.zdb import set_trace
     17except:
     18    def set_trace():
     19        pass
    1520request = context.REQUEST
    1621course_cat = context.courses_catalog
     
    3843    url = "%s?%s" % (context.absolute_url(),urlencode(args))
    3944    return request.RESPONSE.redirect(url)
    40 ##cert_id = context.aq_parent.getContent().study_course
    41 ##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]
    5145cr_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()
     47cr = getattr(context,cr_id)
     48context.portal_workflow.doActionFor(cr,'open')
     49cr.getContent().edit(mapping=d)
     50context.portal_workflow.doActionFor(cr,'close')
    5451args['course_id'] = course_id
    5552from urllib import urlencode
Note: See TracChangeset for help on using the changeset viewer.