source: WAeUP_SRP/trunk/skins/waeup_student/getStudentWorkflowInfo.py @ 5209

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

getAccommodationInfo.py: deactivate histel booking fro graduates
srp_anonymous_view.pt: Use portal title for headline
portlet_student_workflow_display.pt: show state graduated

  • Property svn:keywords set to Id
File size: 1.1 KB
RevLine 
[1161]1## Script (Python) "getStudentWorkflowInfo"
[1072]2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: getStudentWorkflowInfo.py 3985 2009-02-27 20:22:29Z henrik $
11"""
12return Info about the current Student
13"""
14mtool = context.portal_membership
15wf = context.portal_workflow
16member = mtool.getAuthenticatedMember()
17member_id = str(member)
18if mtool.isAnonymousUser():
19    return None
20info = {}
[1077]21if not context.isStudent():
[1072]22    return None
23student_id = member_id
24students_object = context.portal_url.getPortalObject().campus.students
25student = getattr(students_object, student_id)
26info['id'] = student_id
27#info['student'] = student
28info['url'] = student.absolute_url()
[1874]29review_state = info['review_state'] = context.getStudentReviewState(student_id)
[1304]30info['cr'] = review_state in  ('returning',
[1286]31                                           'school_fee_paid',
[1184]32                                           'courses_registered',
33                                           'courses_validated',
[3985]34                                           'graduated',
[1184]35                                           )
[1427]36info['tr'] = review_state in  ('returning',)
[1072]37return info
Note: See TracBrowser for help on using the repository browser.