Ignore:
Timestamp:
27 Sep 2006, 07:48:32 (18 years ago)
Author:
joachim
Message:

removed Semester-type and semester-schema,
move StudyLevel? from Students.py to Academics.py
all Academics content has to be deleted before installing this !!!

File:
1 edited

Legend:

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

    r556 r565  
    3737info['cert_id'] = cert_id
    3838
    39 for sem in ('first','second'):
    40     res = context.portal_catalog(container_path="%s/%s/%s" % (cp,level_id,sem))
    41     items = []
    42     for r in res:
    43         row = {}
    44         ro = r.getObject()
    45         rd = ro.getContent()
    46         row['id'] = r.getId
    47         row['title'] = rd.Title()
    48         row['core'] = rd.core_or_elective
    49         row['semester'] = sem
    50         row['url'] = ro.absolute_url()
    51         items.append(row)
    52     info[sem] = items
     39res = context.portal_catalog(container_path="%s/%s" % (cp,level_id))
     40first = []
     41second = []
     42for r in res:
     43    row = {}
     44    ro = r.getObject()
     45    rd = ro.getContent()
     46    row['id'] = r.getId
     47    row['title'] = rd.Title()
     48    row['core'] = rd.core_or_elective
     49    row['semester'] = rd.semester
     50    row['url'] = ro.absolute_url()
     51    if rd.semester == 'first':
     52        first.append(row)
     53    else:
     54        second.append(row)
     55info['first'] = first
     56info['second'] = second
    5357return info
Note: See TracChangeset for help on using the changeset viewer.