Ignore:
Timestamp:
19 Mar 2008, 16:20:34 (17 years ago)
Author:
joachim
Message:

resolve #509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_default/waeup_edit.py

    r3301 r3356  
    33"""
    44"""
     5try:
     6    from Products.zdb import set_trace
     7except:
     8    def set_trace():
     9        pass
    510
    611from urllib import urlencode
     
    2328#        url = context.absolute_url() + '?' + urlencode(args)
    2429#        return REQUEST.RESPONSE.redirect(url)
     30old_values = dict([(k,v) for k,v in doc.getDataModel().items()])
    2531
    2632is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,
    2733                            use_session=True)
    28 
    2934student_id = context.getStudentId()
    30 
    3135action = "/" + came_from
    3236if is_valid:
    33     comments = REQUEST.get('comments')
    34     context.cpsdocument_notify_modification(comments=comments)
    35 
    36 
    37 
     37    # comments = REQUEST.get('comments')
     38    # context.cpsdocument_notify_modification(comments=comments)
    3839    if cpsdocument_edit_and_view_button is not None:
    3940        action = ''
     41    new_values = dict([(k,v) for k,v in doc.getDataModel().items()])
     42    changed = [ k for k in old_values.keys() if new_values[k] != old_values[k]]
     43    logger.info('%s edited %s %s (%s) of %s' % (member,
     44                                                context.portal_type,
     45                                                context.id,
     46                                                ','.join(changed),
     47                                                student_id))
    4048    psm = 'psm_content_changed'
    4149    args = {}
     
    4452    args = getFormUidUrlArg(REQUEST)
    4553
    46 logger.info('%s edited %s %s of %s' % (member,context.portal_type,context.id,student_id))
    4754args['portal_status_message'] = psm
    4855url = context.absolute_url() + action + '?' + urlencode(args)
Note: See TracChangeset for help on using the changeset viewer.