source: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/academics_index.py @ 11359

Last change on this file since 11359 was 1988, checked in by joachim, 17 years ago

merged r1979:r1987 from trunk

  • Property svn:keywords set to Id
File size: 1.3 KB
RevLine 
[542]1## Script (Python) "academics_index"
[538]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##
[805]10# $Id: academics_index.py 1988 2007-07-05 11:14:12Z joachim $
[538]11"""
[542]12return the appropriate page in the academics section
[538]13"""
[1988]14try:
15    from Products.zdb import set_trace
16except:
17    def set_trace():
18        pass
[538]19
20request = context.REQUEST
21redirect = request.RESPONSE.redirect
[542]22pm = context.portal_membership
23
24if pm.isAnonymousUser():
[681]25    return redirect("%s/srp_anonymous_view" % context.portal_url())
26else:
[551]27    if context.portal_type == 'AcademicsFolder':
[937]28        return context.academics_view()
[551]29    elif context.portal_type == 'Faculty':
[653]30        return context.faculty_view()
[552]31    elif context.portal_type == 'Department':
[653]32        return context.department_view()
[556]33    elif context.portal_type == 'CoursesFolder':
[653]34        return context.courses_view()
[683]35    elif context.portal_type == 'CertificatesFolder':
[739]36        return context.certificates_view()
[556]37    elif context.portal_type == 'Certificate':
[653]38        return context.certificate_view()
[556]39    elif context.portal_type == 'StudyLevel':
[653]40        return context.level_view()
[556]41    elif context.portal_type in ('CertificateCourse','Course'):
[739]42        return context.waeup_document_view()
[901]43    return redirect("%s/srp_view" % context.portal_url())
[538]44
Note: See TracBrowser for help on using the repository browser.