source: WAeUP_SRP/trunk/skins/waeup_default/home_index.py @ 535

Last change on this file since 535 was 535, checked in by joachim, 18 years ago

student apply admission should work now
the default_view for campus is now home_index.py
for students and student student_index.py
these script redirect to the appropriate PT

File size: 885 bytes
Line 
1## Script (Python) "cpsdocument_edit"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=batch=None
8##title=
9##
10# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
11"""
12return the correct campus_index_html
13"""
14
15request = context.REQUEST
16redirect = request.RESPONSE.redirect
17pm = context.portal_membership
18if pm.isAnonymousUser():
19    return redirect("%s/campus_anonymous_view" % request.get('URL1'))
20campus = context.portal_catalog(meta_type = "University")[-1].getObject()
21member = pm.getAuthenticatedMember()
22roles = member.getRoles()
23if "Manager" in roles or "SectionManager" in roles:
24    return redirect("%s/campus_manager_view" % campus.absolute_url())
25   
26info = context.getStudentInfo()
27if info is not None:
28    return redirect("%s/student_index" % campus.students.absolute_url())
29   
30
Note: See TracBrowser for help on using the repository browser.