Last change
on this file since 4376 was
113,
checked in by joachim, 19 years ago
|
=academics created
|
-
Property svn:keywords set to
Id
|
File size:
806 bytes
|
Line | |
---|
1 | ##parameters=REQUEST=None,psm=None,groups=None |
---|
2 | |
---|
3 | # $Id: students_folder_view.py 113 2005-10-28 10:17:39Z joachim $ |
---|
4 | |
---|
5 | """Default view for the forum. If post_id is not None, post with id = <post_id> |
---|
6 | will be displayed, otherwise first post will be displayed.""" |
---|
7 | |
---|
8 | member = context.portal_membership.getAuthenticatedMember() |
---|
9 | if not context.portal_membership.isAnonymousUser(): |
---|
10 | roles = member.getRoles() |
---|
11 | if 'Manager' in roles: |
---|
12 | return context.folder_view() |
---|
13 | elif 'StudentManager' in roles or 'UniversityManager' in roles: |
---|
14 | return context.students_folder_view_manager(psm=psm) |
---|
15 | elif 'Student' in roles: |
---|
16 | return getattr(context, str(member))() |
---|
17 | context_ti = context.portal_types['University'] |
---|
18 | index = context_ti.getActionById('view','university_view') |
---|
19 | return getattr(context,index)(psm=psm) |
---|
20 | return context.students_folder_view_all(psm=psm) |
---|
Note: See
TracBrowser for help on using the repository browser.