source: WAeUP_SRP/trunk/skins/waeup_student/student_index.py @ 952

Last change on this file since 952 was 903, checked in by Henrik Bettermann, 18 years ago

isManager renamed to isSectionManager

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1## Script (Python) "student_index"
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_index.py 903 2006-11-20 08:08:10Z henrik $
11"""
12return the current student_index_html
13"""
14
15request = context.REQUEST
16redirect = request.RESPONSE.redirect
17pm = context.portal_membership
18
19if context.isStaff():
20    if context.portal_type == 'StudentStudyCourse':
21        return context.study_course_view()
22    elif context.portal_type == 'StudentStudyLevel':
23        return context.study_level_view()
24    elif context.portal_type == 'StudentClearance':
25        return context.clearance_view()
26    elif context.portal_type == 'Student':
27        return redirect("%s/student_view" % context.absolute_url())
28    return redirect("%s/waeup_document_view" % context.absolute_url())
29if context.isStudent():
30    info = context.getStudentInfo()
31    student = info['student']
32    return redirect("%s/student_view" % student.absolute_url())
33
34return redirect("%s/srp_anonymous_view" % context.absolute_url())
35   
Note: See TracBrowser for help on using the repository browser.