## Script (Python) "raise_objection" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id:defer_admission.py 486 2006-09-06 10:09:39Z joachim $ """ raise an objection and print Info. """ import DateTime import logging logger = logging.getLogger('Student.Objection') wf = context.portal_workflow info = context.getStudentInfo() if not info: logger.info('"%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId())) return context.admission_form() current = DateTime.DateTime() info['app_doc'].edit(mapping={'objection_date':current,}) if info['review_state'] == "admitted": wf.doActionFor(info['student'],'raise_objection') return context.objection_raised_form(info=info) return context.admission_form()