Ignore:
Timestamp:
21 Apr 2016, 14:17:19 (9 years ago)
Author:
Henrik Bettermann
Message:

IOE doesn't have a department.

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

Legend:

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

    r13793 r13846  
    166166        self.assertEqual(self.student.matric_number, 'AAU/SPS/ABC/dep1/04/AGRB/00001')
    167167        self.assertEqual(site['configuration'].next_matric_integer_3, 2)
     168        self.student.matric_number = None
     169        # students in IOE don't have a department
     170        self.app['faculties']['fac1'].code = 'IOE'
     171        msg, mnumber = utils.setMatricNumber(self.student)
     172        self.assertEqual(self.student.matric_number, 'AAU/SPS/IOE/04/AGRB/00002')
    168173        # Diploma Students get a matric number with leading 'IOS'
    169174        # and the dp counter which is next_matric_integer_3.
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13798 r13846  
    8686            if not degree or next_integer == 0:
    8787                return _('Matriculation number cannot be set.'), None
     88            if student.faccode in ('IOE'):
     89                return None, "AAU/SPS/%s/%s/%s/%05d" % (
     90                    faccode, year, degree, next_integer)
    8891            return None, "AAU/SPS/%s/%s/%s/%s/%05d" % (
    8992                faccode, depcode, year, degree, next_integer)
Note: See TracChangeset for help on using the changeset viewer.