Ignore:
Timestamp:
9 Mar 2017, 17:10:29 (8 years ago)
Author:
Henrik Bettermann
Message:

Repeaters can register less credits.

Location:
main/waeup.fceokene/trunk/src/waeup/fceokene/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py

    r14617 r14618  
    88from waeup.fceokene.testing import FunctionalLayer
    99
    10 class BedAllocationTests(StudentsFullSetup):
     10class StudentsUtilsTests(StudentsFullSetup):
    1111
    1212    layer = FunctionalLayer
     
    5858        studylevel = grok.Container()
    5959        studylevel.total_credits = 45
     60        studylevel.__parent__ = self.student['studycourse']
    6061        course = grok.Model()
    6162        course.credits = 7
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r14617 r14618  
    294294            elif student.current_level in (200, 210, 220):
    295295                amount += academic_session.penalty_nce3_ft
    296         elif category == 'schoolfee' and student.current_mode in (
    297             'nce_sw', 'nce_pt'):
     296        elif category == 'schoolfee' and student.current_mode in ('nce_sw',
     297            'nce_pt') and student['studycourse'].previous_verdict != 'O':
    298298            # NCE I fresh
    299299            if student.current_level == 100 and student.state == CLEARED:
     
    395395            if studylevel.total_credits > 52:
    396396                return _('Maximum credits exceeded.')
     397            if studylevel.__parent__.previous_verdict == 'O':
     398                return
    397399            if studylevel.total_credits_s1 < 18:
    398400                return _('Minimum credits in 1st semester not reached.')
Note: See TracChangeset for help on using the changeset viewer.