Changeset 5457


Ignore:
Timestamp:
19 Aug 2010, 12:45:34 (14 years ago)
Author:
Henrik Bettermann
Message:

resolve #687

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/register_courses.py

    r2091 r5457  
    88##title=
    99##
    10 # $Id: getStudyCourseInfo.py 1504 2007-02-26 21:20:40Z henrik $
     10# $Id: register_courses.py 1504 2007-02-26 21:20:40Z henrik $
    1111"""
    1212close the Students StudyLevel
     
    3333student = getattr(students_folder,student_id)
    3434
     35info = context.getStudyLevelInfo()
     36if info['credits_exceeded']:
     37    args = {}
     38    args['portal_status_message'] = "Your total credits exceed %s!" % info['max_credits']
     39    url = context.absolute_url() + '?' + urlencode(args)
     40    logger.info('%s tried to register course list with credits exceeded, probably by pressing the browser back button' % (student_id))
     41    return REQUEST.RESPONSE.redirect(url)
     42
    3543try:
    3644    wftool.doActionFor(student,'register_courses')
Note: See TracChangeset for help on using the changeset viewer.