Ignore:
Timestamp:
29 Sep 2011, 09:06:00 (13 years ago)
Author:
Henrik Bettermann
Message:

Add removedStudentHandler which logs if a student has been removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/container.py

    r6830 r6832  
    8383                user, ob_class, target, comment))
    8484        return
     85
     86@grok.subscribe(IStudent, grok.IObjectRemovedEvent)
     87def removedStudentHandler(student, event):
     88    """If a student is removed a message is logged.
     89    """
     90    comment = 'Student record removed'
     91    user = get_current_principal().id
     92    target = student.student_id
     93    grok.getSite()['students'].logger.info('%s - %s - %s' % (
     94        user, target, comment))
Note: See TracChangeset for help on using the changeset viewer.