Ignore:
Timestamp:
28 Mar 2007, 02:35:25 (18 years ago)
Author:
uli
Message:

Incorporated changeset 1593:1652 of trunk into uli-branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/branches/uli/skins/waeup_academics/getLevelInfo.py

    r1514 r1653  
    1616wf = context.portal_workflow
    1717mtool = context.portal_membership
     18academics_path = "%s/campus/academics" % context.portal_url()
    1819path_info = request.get('PATH_INFO').split('/')
    1920try:
     
    4445    ro = r.getObject()
    4546    rd = ro.getContent()
    46     row['id'] = r.getId
     47    course_id = row['id'] = r.getId
    4748    row['title'] = rd.Title()
    4849    row['core'] = rd.core_or_elective
     
    5051    row['url'] = ro.absolute_url()
    5152    row['review_state'] = wf.getInfoFor(ro,'review_state','None')
    52     row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
     53    editable = row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
     54    if editable:
     55        course_res = context.courses_catalog(code=course_id)
     56        if course_res:
     57            rc = course_res[0]
     58            row['real_course_path'] = "%s/%s/%s/courses/%s" % (academics_path,rc.faculty,rc.department,course_id)
    5359    if rd.semester == 'first':
    5460        first.append(row)
Note: See TracChangeset for help on using the changeset viewer.