## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=batch=None ##title= ## # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ """ return the current student_index_html """ request = context.REQUEST redirect = request.RESPONSE.redirect campus = context.portal_catalog(meta_type = "University")[-1].getObject() pm = context.portal_membership if pm.isAnonymousUser(): return redirect("%s/students_anonymous_view" % campus.students.absolute_url()) member = pm.getAuthenticatedMember() roles = member.getRoles() if "Manager" in roles or "SectionManager" in roles: return redirect("%s/students_manager_view" % campus.students.absolute_url()) info = context.getStudentInfo() student = info['student'] doc = info['app_doc'] state = context.getStudentInfo()['review_state'] if state == 'admission_applied': return redirect("%s/application_view" % student.absolute_url()) elif state == 'application_pin_entered': return redirect("%s/passport_entry_view" % student.absolute_url())