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
|
Rev | Line | |
---|
[535] | 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 | """ |
---|
| 12 | return the correct campus_index_html |
---|
| 13 | """ |
---|
| 14 | |
---|
| 15 | request = context.REQUEST |
---|
| 16 | redirect = request.RESPONSE.redirect |
---|
| 17 | pm = context.portal_membership |
---|
| 18 | if pm.isAnonymousUser(): |
---|
| 19 | return redirect("%s/campus_anonymous_view" % request.get('URL1')) |
---|
| 20 | campus = context.portal_catalog(meta_type = "University")[-1].getObject() |
---|
| 21 | member = pm.getAuthenticatedMember() |
---|
| 22 | roles = member.getRoles() |
---|
| 23 | if "Manager" in roles or "SectionManager" in roles: |
---|
| 24 | return redirect("%s/campus_manager_view" % campus.absolute_url()) |
---|
| 25 | |
---|
| 26 | info = context.getStudentInfo() |
---|
| 27 | if 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.