source: WAeUP_SRP/trunk/skins/waeup_fceokene/student_index.py @ 14486

Last change on this file since 14486 was 3690, checked in by Henrik Bettermann, 16 years ago

Move all customized skins into trunk. The waeup_custom skin together with the default profile is the BASE configuration which is identical to the Uniben set-up.

File size: 1.9 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,portal_status_message=None
8##title=
9##
10# $Id: student_index.py 2297 2007-10-01 07:26:30Z henrik $
11"""
12return the current student_index
13"""
14
15request = context.REQUEST
16#session = request.SESSION
17response = request.RESPONSE
18redirect = response.redirect
19pm = context.portal_membership
20member = pm.getAuthenticatedMember()
21
22#from Products.zdb import set_trace;set_trace()
23if context.isStaff():
24    if context.portal_type == 'StudentStudyCourse':
25        return context.study_course_view()
26    elif context.portal_type == 'StudentStudyLevel':
27        return context.study_level_view()
28    elif context.portal_type == 'StudentClearance':
29        return context.clearance_view()
30    elif context.portal_type == 'PaymentsFolder':
31        return context.payments_view()
32    elif context.portal_type == 'Student':
33        if portal_status_message:
34            return redirect("%s/student_view?portal_status_message=%s" % (context.absolute_url(),portal_status_message))
35        else:
36            return redirect("%s/student_view" % context.absolute_url())
37    elif context.portal_type == 'Payment':
38        return context.payment_receipt()
39    return redirect("%s/waeup_document_view" % context.absolute_url())
40if context.isStudent():
41    if context.portal_type == 'PaymentsFolder':
42        return context.payments_view()
43    elif context.portal_type == 'Payment':
44        return context.payment_receipt()
45    elif context.portal_type == 'StudentStudyLevel':
46        return context.study_level_view()
47    elif context.portal_type == 'StudentStudyCourse':
48        return context.study_course_view()
49    students_url = "%s/campus/students" % (context.portal_url())
50    id = str(member)
51    return redirect("%s/%s/student_view" % (students_url, id))
52
53return redirect("%s/srp_anonymous_view" % context.portal_url())
54
Note: See TracBrowser for help on using the repository browser.