Ignore:
Timestamp:
24 Sep 2006, 06:03:25 (18 years ago)
Author:
Henrik Bettermann
Message:

index pages reorganized (part 1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_index.py

    r538 r542  
    1 ## Script (Python) "cpsdocument_edit"
     1## Script (Python) "academics_index"
    22##bind container=container
    33##bind context=context
     
    1010# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return the appropriate page in the academics section 
     12return the appropriate page in the academics section
    1313"""
    1414
    1515request = context.REQUEST
    1616redirect = request.RESPONSE.redirect
     17pm = context.portal_membership
     18
     19if pm.isAnonymousUser():
     20    return redirect("%s/academics_contents" % context.absolute_url())
     21
    1722campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    18 pm = context.portal_membership
    1923member = pm.getAuthenticatedMember()
    2024roles = member.getRoles()
    2125isManager = "Manager" in roles or "SectionManager" in roles
    2226isStudent = "Student" in roles
     27
    2328if isManager:
    2429    return redirect("%s/academics_contents" % context.absolute_url())
    2530if isStudent:
    2631    return redirect("%s/academics_contents" % context.absolute_url())
    27 if pm.isAnonymousUser():
    28     return redirect("%s/acacemics_contents" % context.absolute_url())
    29    
    30 info = context.getStudentInfo()
    31 student = info['student']
    32 doc = info['app_doc']
    33 state = context.getStudentInfo()['review_state']
    34 if state == 'admission_applied':
    35     return redirect("%s/application_view" % student.absolute_url())
    36 elif state == 'application_pin_entered':
    37     return redirect("%s/passport_entry_view" % student.absolute_url())
    38    
    3932
Note: See TracChangeset for help on using the changeset viewer.