Ignore:
Timestamp:
13 Oct 2006, 12:45:55 (18 years ago)
Author:
joachim
Message:

show semester in courses_view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py

    r603 r689  
    3737res = context.portal_catalog(container_path="%s/courses" % cp)
    3838items = []
    39 for r in res:
    40     row = {}
    41     ro = r.getObject()
    42     rd = ro.getContent()
    43     row['id'] = r.getId
    44     row['title'] = rd.Title()
    45     row['url'] = ro.absolute_url()
    46     row['review_state'] = wf.getInfoFor(ro,'review_state','None')
    47     row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
    48     items.append(row)
     39for sem in ('1','2'):
     40    for r in res:
     41        row = {}
     42        ro = r.getObject()
     43        rd = ro.getContent()
     44        if rd.semester != sem:
     45            continue
     46        row['id'] = r.getId
     47        row['title'] = rd.Title()
     48        row['semester'] = rd.semester
     49        row['url'] = ro.absolute_url()
     50        row['review_state'] = wf.getInfoFor(ro,'review_state','None')
     51        row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
     52        items.append(row)
    4953info['courses'] = items
    5054return info
Note: See TracChangeset for help on using the changeset viewer.