source: WAeUP_SRP/branches/srpp_branch/skins/waeup_student/students_folder_view.py @ 7637

Last change on this file since 7637 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>
6will be displayed, otherwise first post will be displayed."""
7
8member = context.portal_membership.getAuthenticatedMember()
9if 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))()
17context_ti = context.portal_types['University']
18index = context_ti.getActionById('view','university_view')
19return getattr(context,index)(psm=psm)
20return context.students_folder_view_all(psm=psm)
Note: See TracBrowser for help on using the repository browser.