Changeset 2609 for WAeUP_SRP/base/skins/waeup_academics
- Timestamp:
- 9 Nov 2007, 15:38:22 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_academics/getLevelInfo.py
r2281 r2609 32 32 info['choosen_ids'] = request.get('ids',[]) 33 33 info['doc'] = context.getContent() 34 brain = context.portal_catalog(meta_type="Certificate",id = cert_id)[-1]35 cp = brain.getPath()36 info['container_path'] = cp34 # brain = context.portal_catalog(meta_type="Certificate",id = cert_id)[-1] 35 # cp = brain.getPath() 36 # info['container_path'] = cp 37 37 info['dep_id'] = dep_id 38 38 info['cert_id'] = cert_id 39 39 40 res = context.portal_catalog(meta_type="CertificateCourse", container_path="%s/%s" % (cp,level_id)) 40 # res = context.portal_catalog(meta_type="CertificateCourse", container_path="%s/%s" % (cp,level_id)) 41 # first = [] 42 # second = [] 43 # for r in res: 44 # row = {} 45 # ro = r.getObject() 46 # rd = ro.getContent() 47 # course_id = r.getId 48 # row = context.getCourseInfo(course_id) 49 # row['id'] = course_id 50 # # row['title'] = rd.Title() 51 # # row['semester'] = rd.semester 52 # row['core'] = rd.core_or_elective 53 # row['url'] = ro.absolute_url() 54 # row['review_state'] = wf.getInfoFor(ro,'review_state','None') 55 # editable = row['is_editable'] = mtool.checkPermission('Modify portal content', ro) 56 # if editable: 57 # row['real_course_path'] = "%s/%s/%s/courses/%s" % (academics_path, 58 # row['faculty'], 59 # row['department'], 60 # course_id) 61 # if row['semester'] == 1: 62 # first.append(row) 63 # else: 64 # second.append(row) 41 65 first = [] 42 66 second = [] 43 for r in res:67 for course_id,course in context.objectItems(): 44 68 row = {} 45 ro = r.getObject()46 rd = ro.getContent()47 course_id = r.getId69 # ro = r.getObject() 70 course_doc = course.getContent() 71 # course_id = r.getId 48 72 row = context.getCourseInfo(course_id) 49 73 row['id'] = course_id 50 # row['title'] = rd.Title()51 # row['semester'] = rd.semester52 row['core'] = rd.core_or_elective53 row['url'] = ro.absolute_url()54 row['review_state'] = wf.getInfoFor( ro,'review_state','None')55 editable = row['is_editable'] = mtool.checkPermission('Modify portal content', ro)74 # row['title'] = course_doc.Title() 75 # row['semester'] = course_doc.semester 76 row['core'] = course_doc.core_or_elective 77 row['url'] = course.absolute_url() 78 row['review_state'] = wf.getInfoFor(course,'review_state','None') 79 editable = row['is_editable'] = mtool.checkPermission('Modify portal content', course) 56 80 if editable: 57 81 row['real_course_path'] = "%s/%s/%s/courses/%s" % (academics_path,
Note: See TracChangeset for help on using the changeset viewer.