Changeset 1366
- Timestamp:
- 27 Jan 2007, 15:40:19 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts/course.xml
r853 r1366 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 <widget name="adm_status" meta_type="String Widget"> 9 <widget name="code" meta_type="CourseId Widget"> 10 <property name="title">Course Id</property> 11 <property name="fields"> 12 <element value="code"/> 13 </property> 14 <property name="is_required">True</property> 15 <property name="label">Course Id</property> 16 <property name="label_edit">Course Id</property> 17 <property name="readonly_layout_modes"> 18 <element value="edit"/> 19 </property> 20 <property name="hidden_layout_modes"/> 21 <property name="hidden_readonly_layout_modes"/> 22 <property name="display_width">8</property> 23 </widget> 24 <widget name="adm_status" meta_type="String Widget"> 10 25 <property name="title">Adm Status</property> 11 26 <property name="fields"> -
WAeUP_SRP/trunk/profiles/default/schemas/certificate_course.xml
r556 r1366 10 10 <field name="semester" meta_type="CPS String Field"/> 11 11 <field name="department" meta_type="CPS String Field"/> 12 <field name="level" meta_type="CPS String Field"/> 13 <field name="session" meta_type="CPS String Field"/> 12 <field name="level" meta_type="CPS String Field"> 13 <property name="is_searchabletext">True</property> 14 </field> 15 <field name="session" meta_type="CPS String Field"/> 14 16 </object> -
WAeUP_SRP/trunk/skins/waeup_academics/courses_view.pt
r913 r1366 1 <metal:html tal:define="info context/getCoursesInfo; 2 is_so context/isSectionOfficer;" 3 > 1 <metal:html> 4 2 <metal:body use-macro="here/waeup_content_master/macros/master"> 5 <metal:block fill-slot="header"> 3 <metal:block fill-slot="header" 4 tal:define="global info context/getCoursesInfo; 5 global is_so context/isSectionOfficer;" 6 > 6 7 <a href="" 7 8 tal:attributes="href string:${here/academicsParent}"> -
WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py
r913 r1366 12 12 return Info about the Faculties 13 13 """ 14 def cmpsemester(a,b): 15 if a.semester == b.semester: 16 return 0 17 if a.semester > b.semester: 18 return 1 19 return -1 20 21 22 14 23 request = context.REQUEST 15 24 … … 33 42 info['dep_id'] = dep_id 34 43 35 res = context.portal_catalog(container_path="%s/courses" % cp) 36 items = [] 37 for sem in ('1','2'): 38 for r in res: 39 row = {} 40 ro = r.getObject() 41 rd = ro.getContent() 42 if rd.semester != sem: 43 continue 44 row['id'] = r.getId 45 row['title'] = rd.Title() 46 row['semester'] = rd.semester 47 row['url'] = ro.absolute_url() 48 row['review_state'] = wf.getInfoFor(ro,'review_state','None') 49 row['is_editable'] = mtool.checkPermission('Modify portal content', ro) 50 items.append(row) 51 info['courses'] = items 44 res = context.courses_catalog(department=dep_id) 45 items = [ brain for brain in res] 46 items.sort(cmpsemester) 47 rows = [] 48 for r in items: 49 row = {} 50 code = getattr(r,'code',None) 51 if code is None: 52 continue 53 ro = getattr(context,code) 54 row['id'] = code 55 row['title'] = r['title'] 56 row['semester'] = r['semester'] 57 row['url'] = "%s/%s" % (context.absolute_url(),code) 58 row['review_state'] = wf.getInfoFor(ro,'review_state','None') 59 row['is_editable'] = mtool.checkPermission('Modify portal content', ro) 60 rows.append(row) 61 #from Products.zdb import set_trace;set_trace() 62 ##res = context.portal_catalog(container_path="%s/courses" % cp) 63 ##items = [] 64 ##for sem in ('1','2'): 65 ## for r in res: 66 ## row = {} 67 ## ro = r.getObject() 68 ## rd = ro.getContent() 69 ## if rd.semester != sem: 70 ## continue 71 ## row['id'] = r.getId 72 ## row['title'] = rd.Title() 73 ## row['semester'] = rd.semester 74 ## row['url'] = ro.absolute_url() 75 ## row['review_state'] = wf.getInfoFor(ro,'review_state','None') 76 ## row['is_editable'] = mtool.checkPermission('Modify portal content', ro) 77 ## items.append(row) 78 info['courses'] = rows 52 79 return info -
WAeUP_SRP/trunk/skins/waeup_custom/folder_delete.py
r586 r1366 27 27 # XXX has to be called from here since the workflow doesn't handle the 28 28 # deletion yet 29 if context.portal_type == "CoursesFolder": 30 context.courses_catalog.deleteRecord(id) 29 31 ob = getattr(here, id) 30 32 from Products.CPSCore.EventServiceTool import getPublicEventService -
WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py
r731 r1366 9 9 """ 10 10 from Products.CMFCore.utils import getToolByName 11 11 request = context.REQUEST 12 12 if type_name in ("StudyLevel","StudentStudyLevel"): 13 13 id = datamodel.get('code') … … 34 34 if new_id is not None: 35 35 id = new_id 36 36 if type_name == "Course": 37 d = {} 38 ptl = request.get('PATH_TRANSLATED').split('/') 39 ai = ptl.index('academics') 40 d['faculty'] = ptl[ai+1] 41 d['department'] = ptl[ai+2] 42 from_dm = ('code','title','semester','credits',) 43 for f in from_dm: 44 d[f] = datamodel.get(f) 45 context.courses_catalog.addRecord(**d) 37 46 ob = getattr(context, id) 38 47 ob.getContent().edit(mapping=datamodel) -
WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
r1350 r1366 40 40 41 41 action = "/" + came_from 42 43 42 if is_valid: 44 43 comments = REQUEST.get('comments') … … 74 73 ) 75 74 elif context.portal_type == "Course": 76 context.courses_catalog.modifyRecord(**ds) 75 dd = {} 76 dd.update(ds) # ds is not a real dictionary 77 try: 78 context.courses_catalog.modifyRecord(**dd) 79 except KeyError: 80 context.courses_catalog.addRecord(**dd) 77 81 if cpsdocument_edit_and_view_button is not None: 78 82 action = ''
Note: See TracChangeset for help on using the changeset viewer.