Changeset 689 for WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py
- Timestamp:
- 13 Oct 2006, 12:45:55 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py
r603 r689 37 37 res = context.portal_catalog(container_path="%s/courses" % cp) 38 38 items = [] 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) 39 for 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) 49 53 info['courses'] = items 50 54 return info
Note: See TracChangeset for help on using the changeset viewer.