Changeset 13749


Ignore:
Timestamp:
29 Feb 2016, 07:23:48 (9 years ago)
Author:
Henrik Bettermann
Message:

Add study modes mug_ft and mde_ft. All students, except those with entry mode mug_ft and mde_ft, have pay concessional fee before getting a matric number.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r13720 r13749  
    444444
    445445    def test_set_matric_number(self):
     446        payment = createObject('waeup.StudentOnlinePayment')
     447        payment.p_category = u'concessional'
     448        payment.p_id = u'anyid'
     449        payment.p_state = u'paid'
     450        self.student['payments']['anykey'] = payment
    446451        # Login as student
    447452        self.browser.open(self.login_path)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py

    r13664 r13749  
    130130        site['configuration'].next_matric_integer_3 = 1
    131131        self.student.matric_number = None
     132        msg, mnumber = utils.setMatricNumber(self.student)
     133        self.assertEqual(msg, 'Matriculation number cannot be set.')
     134        payment = createObject('waeup.StudentOnlinePayment')
     135        payment.p_category = u'concessional'
     136        payment.p_id = u'anyid'
     137        payment.p_state = u'paid'
     138        self.student['payments']['anykey'] = payment
    132139        # Regular ft students have a matric number without leading constant.
    133140        msg, mnumber = utils.setMatricNumber(self.student)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13720 r13749  
    5757        return
    5858
     59    def _concessionalPaymentMade(self, student):
     60        if len(student['payments']):
     61            for ticket in student['payments'].values():
     62                if ticket.p_state == 'paid' and \
     63                    ticket.p_category == 'concessional':
     64                    return True
     65        return False
     66
    5967    def constructMatricNumber(self, student):
    6068        faccode = student.faccode
     
    6775        if not student.state in (PAID, ) or not student.is_fresh or \
    6876            student.current_mode == 'found':
     77            return _('Matriculation number cannot be set.'), None
     78        if student.current_mode not in ('mug_ft', 'mde_ft') and \
     79            not self._concessionalPaymentMade(student):
    6980            return _('Matriculation number cannot be set.'), None
    7081        if student.is_postgrad:
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r13638 r13749  
    105105        'found': 'Foundation',
    106106        'transfer': 'Transfer',
     107        'mug_ft': 'Undergraduate Full Time Merit List',
     108        'mde_ft': 'Direct Entry Full Time Merit List',
    107109        }
    108110
Note: See TracChangeset for help on using the changeset viewer.