Ignore:
Timestamp:
30 Dec 2006, 12:36:01 (18 years ago)
Author:
joachim
Message:

clearance_slip now also uses getClearanceInfo, which has been extended.

File:
1 edited

Legend:

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

    r1145 r1156  
    5454info['clear_doc'] = student.clearance.getContent()
    5555info['clear_review_state'] = wf.getInfoFor(student.clearance,'review_state',None)
     56if info['clear_review_state'] == "clearance_requested":
     57    info['penalty'] = info['penalty'] and\
     58                      info['clear_doc'].entry_date.lessThan(DateTime('2006/12/30'))
     59course = getattr(student,'study_course',None)
     60if course:
     61    cert_id = course.getContent().study_course
     62    res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
     63    ci = {}
     64    if len(res) > 0:
     65        info['course'] = course
     66        brain = res[0]
     67        ci['study_course'] = brain.getId
     68        ci['title'] = brain.Title
     69        pl = brain.getPath().split('/')
     70        ci['faculty'] = pl[-4]
     71        ci['department'] = pl[-3]
     72        info['course_doc'] = ci
     73    else:
     74        info['course'] = None
    5675return info
Note: See TracChangeset for help on using the changeset viewer.