Ignore:
Timestamp:
27 Jan 2007, 15:40:19 (18 years ago)
Author:
joachim
Message:

M profiles/default/schemas/certificate_course.xml
make level searchable
M profiles/default/layouts/course.xml
add code to course layout to allow creation
M skins/waeup_default/waeup_edit.py
M skins/waeup_default/waeup_document_create_do.py
M skins/waeup_custom/folder_delete.py
fix that courses_catalog also get updated
M skins/waeup_academics/courses_view.pt
M skins/waeup_academics/getCoursesInfo.py
use courses catalog.

Location:
WAeUP_SRP/trunk/skins/waeup_default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py

    r731 r1366  
    99"""
    1010from Products.CMFCore.utils import getToolByName
    11 
     11request = context.REQUEST
    1212if type_name in ("StudyLevel","StudentStudyLevel"):
    1313    id = datamodel.get('code')
     
    3434if new_id is not None:
    3535    id = new_id
    36 
     36if 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)
    3746ob = getattr(context, id)
    3847ob.getContent().edit(mapping=datamodel)
  • WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py

    r1350 r1366  
    4040
    4141action = "/" + came_from
    42 
    4342if is_valid:
    4443    comments = REQUEST.get('comments')
     
    7473                                             )
    7574    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)
    7781    if cpsdocument_edit_and_view_button is not None:
    7882        action = ''
Note: See TracChangeset for help on using the changeset viewer.