source: WAeUP_SRP/branches/regebro-noskins/skins/waeup_student/register_courses.py @ 11110

Last change on this file since 11110 was 1513, checked in by joachim, 18 years ago

register courses

File size: 951 bytes
Line 
1## Script (Python) "getStudyCourseInfo"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=student=None
8##title=
9##
10# $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $
11"""
12close the Students StudyLevel
13"""
14try:
15    from Products.zdb import set_trace
16except:
17    def set_trace():
18        pass
19
20request = context.REQUEST
21mtool = context.portal_membership
22member = mtool.getAuthenticatedMember()
23member_id = str(member)
24import logging
25logger = logging.getLogger('Student.register_courses')
26
27wftool = context.portal_workflow
28wftool.doActionFor(context,'close')
29students_folder = context.portal_url.getPortalObject().campus.students
30student = getattr(students_folder,context.getStudentId())
31wftool.doActionFor(student,'register_courses')
32logger.info('"%s","courses registered"' % student.getId())
33return request.RESPONSE.redirect("%s" % context.absolute_url())
Note: See TracBrowser for help on using the repository browser.