Ignore:
Timestamp:
7 Jun 2012, 10:06:02 (12 years ago)
Author:
Henrik Bettermann
Message:

Implement max_credits limit for course registration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8595 r8642  
    17431743        'level_session', 'level_verdict')
    17441744    pnav = 4
     1745    max_credits = 50
    17451746
    17461747    def update(self):
     
    17981799    @action(_('Register course list'), style='primary')
    17991800    def registerCourses(self, **data):
     1801        if self.total_credits > self.max_credits:
     1802            self.flash(_('Maximum credits of ${a} exceeded.',
     1803                mapping = {'a':self.max_credits}))
     1804            return
    18001805        IWorkflowInfo(self.context.getStudent()).fireTransition(
    18011806            'register_courses')
Note: See TracChangeset for help on using the changeset viewer.