Changeset 13614 for main/waeup.fceokene


Ignore:
Timestamp:
14 Jan 2016, 10:43:10 (9 years ago)
Author:
Henrik Bettermann
Message:

Add special_handling code 'ugft' and allocate bed space accordingly.

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

Legend:

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

    r13459 r13614  
    348348    def test_student_accommodation(self):
    349349        del self.student['accommodation']['2004']
     350        self.certificate.study_mode = 'ug_pt'
    350351        # Login
    351352        self.browser.open(self.login_path)
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py

    r9903 r13614  
    1414        students_utils = getUtility(IStudentsUtils)
    1515        acc_details  = students_utils.getAccommodationDetails(self.student)
    16         self.assertEqual(acc_details['bt'], 'regular_male_fr')
     16        self.assertEqual(acc_details['bt'], 'ugft_male_fr')
    1717        self.student['studycourse'].current_level = 200
     18        self.certificate.study_mode = 'ug_pt'
    1819        acc_details  = students_utils.getAccommodationDetails(self.student)
    1920        self.assertEqual(acc_details['bt'], 'regular_male_re')
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r13459 r13614  
    315315            sex = 'male'
    316316        special_handling = 'regular'
     317        if certificate.study_mode == 'ug_ft':
     318            special_handling = 'ugft'
    317319        d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
    318320        return d
  • main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py

    r13128 r13614  
    3737        }
    3838
     39    SPECIAL_HANDLING_DICT = {
     40        'regular': 'Regular Hostel',
     41        'blocked': 'Blocked Hostel',
     42        'ugft': 'Undergraduate Fulltime Hostel'
     43        }
    3944
    4045    PAYMENT_CATEGORIES = {
Note: See TracChangeset for help on using the changeset viewer.