## Script (Python) "students_index" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=batch=None ##title= ## # $Id: students_index.py 1574 2007-03-18 09:09:09Z henrik $ """ return the current students_index_html """ request = context.REQUEST redirect = request.RESPONSE.redirect mtool = context.portal_membership member = mtool.getAuthenticatedMember() if mtool.isAnonymousUser(): return redirect("%s/srp_anonymous_view" % context.portal_url()) students_url = "%s/campus/students" % (context.portal_url()) if "ClearanceOfficers" in member.getGroups() or\ "CourseAdvisers" in member.getGroups(): return redirect("%s/campus/students/search_students" % context.portal_url()) if context.isSectionOfficer(): return redirect("%s/campus/students/search_students" % context.portal_url()) if context.isStudent(): id = str(member) return redirect("%s/%s/student_view" % (students_url, id))