## Script (Python) "student_indext" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=batch=None ##title= ## # $Id: student_index.py 805 2006-11-09 09:38:29Z joachim $ """ return the current student_index_html """ request = context.REQUEST redirect = request.RESPONSE.redirect pm = context.portal_membership if pm.isAnonymousUser(): return redirect("%s/srp_anonymous_view" % context.absolute_url()) if context.isManager(): if context.portal_type == 'StudentStudyCourse': return context.study_course_view() elif context.portal_type == 'StudentStudyLevel': return context.study_level_view() return redirect("%s/student_view" % context.absolute_url()) if context.isStudent(): 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 in ('application_pin_entered',): return redirect("%s/application_edit" % info['app'].absolute_url()) elif state in ('admitted',): return redirect("%s/admission_accept_form" % student.absolute_url()) elif state == 'clearance_pin_entered': return redirect("%s/student_view" % info['clear'].absolute_url()) elif context.portal_type == 'StudentStudyLevel': return context.study_level_student_view() return redirect("%s/student_view" % student.absolute_url())