Changeset 6836
- Timestamp:
- 30 Sep 2011, 08:24:05 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/container.py
r6832 r6836 83 83 user, ob_class, target, comment)) 84 84 return 85 86 @grok.subscribe(IStudent, grok.IObjectRemovedEvent)87 def removedStudentHandler(student, event):88 """If a student is removed a message is logged.89 """90 comment = 'Student record removed'91 user = get_current_principal().id92 target = student.student_id93 grok.getSite()['students'].logger.info('%s - %s - %s' % (94 user, target, comment)) -
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r6830 r6836 26 26 IStudent, IStudentNavigation, IStudentClearanceEdit, 27 27 IStudentPersonalEdit) 28 from waeup.sirp.utils.helpers import attrs_to_fields 28 from waeup.sirp.utils.helpers import attrs_to_fields, get_current_principal 29 29 from waeup.sirp.students.utils import generate_student_id 30 30 … … 90 90 def getInterfaces(self): 91 91 return implementedBy(Student) 92 93 @grok.subscribe(IStudent, grok.IObjectRemovedEvent) 94 def removedStudentHandler(student, event): 95 """If a student is removed a message is logged. 96 """ 97 comment = 'Student record removed' 98 user = get_current_principal().id 99 target = student.student_id 100 grok.getSite()['students'].logger.info('%s - %s - %s' % ( 101 user, target, comment))
Note: See TracChangeset for help on using the changeset viewer.