Changeset 10133


Ignore:
Timestamp:
2 May 2013, 05:30:25 (12 years ago)
Author:
Henrik Bettermann
Message:

At KwaraPoly? application_category and study_mode are basically identical. We need categories for full-time and part-time.

prend has been renamed to rmd. The students_catalog must be reindexed!

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/tests/test_browser.py

    r10132 r10133  
    5353        setSite(app)
    5454
    55         # Add nd applicants container
    56         self.ndcontainer = ApplicantsContainer()
    57         self.ndcontainer.mode = 'create'
    58         self.ndcontainer.code = u'nd2011'
    59         self.ndcontainer.prefix = u'nd'
    60         self.ndcontainer.application_category = u'nd'
    61         self.ndcontainer.year = 2011
    62         self.ndcontainer.application_fee = 300.0
    63         self.ndcontainer.title = u'This is the nd2011 container'
    64         self.app['applicants']['nd2011'] = self.ndcontainer
     55        # Add ndft applicants container
     56        self.ndftcontainer = ApplicantsContainer()
     57        self.ndftcontainer.mode = 'create'
     58        self.ndftcontainer.code = u'ndft2011'
     59        self.ndftcontainer.prefix = u'ndft'
     60        self.ndftcontainer.application_category = u'ndft'
     61        self.ndftcontainer.year = 2011
     62        self.ndftcontainer.application_fee = 300.0
     63        self.ndftcontainer.title = u'This is the ndft2011 container'
     64        self.app['applicants']['ndft2011'] = self.ndftcontainer
    6565
    6666        delta = datetime.timedelta(days=10)
    67         self.ndcontainer.startdate = datetime.datetime.now(pytz.utc) - delta
    68         self.ndcontainer.enddate = datetime.datetime.now(pytz.utc) + delta
     67        self.ndftcontainer.startdate = datetime.datetime.now(pytz.utc) - delta
     68        self.ndftcontainer.enddate = datetime.datetime.now(pytz.utc) + delta
    6969
    7070        # Populate university
    7171        self.certificate = createObject('waeup.Certificate')
    7272        self.certificate.code = 'CERT1'
    73         self.certificate.application_category = 'nd'
     73        self.certificate.application_category = 'ndft'
    7474        self.certificate.start_level = 100
    7575        self.certificate.end_level = 500
     
    8181
    8282        # Add (customized) applicants
    83         ndapplicant = createObject(u'waeup.Applicant')
    84         ndapplicant.firstname = u'Anna'
    85         ndapplicant.lastname = u'Post'
    86         self.app['applicants']['nd2011'].addApplicant(ndapplicant)
    87         self.ndapplication_number = ndapplicant.application_number
    88         self.ndapplicant = self.app['applicants']['nd2011'][
    89             self.ndapplication_number]
    90         self.ndapplicant_path = ('http://localhost/app/applicants/nd2011/%s'
    91             % self.ndapplication_number)
     83        ndftapplicant = createObject(u'waeup.Applicant')
     84        ndftapplicant.firstname = u'Anna'
     85        ndftapplicant.lastname = u'Post'
     86        self.app['applicants']['ndft2011'].addApplicant(ndftapplicant)
     87        self.ndftapplication_number = ndftapplicant.application_number
     88        self.ndftapplicant = self.app['applicants']['ndft2011'][
     89            self.ndftapplication_number]
     90        self.ndftapplicant_path = ('http://localhost/app/applicants/ndft2011/%s'
     91            % self.ndftapplication_number)
    9292
    9393        self.browser = Browser()
     
    111111
    112112    def test_manage_and_view_applicant(self):
    113         # Managers can manage nd applicants.
     113        # Managers can manage ndft applicants.
    114114        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    115         self.browser.open(self.ndapplicant_path)
     115        self.browser.open(self.ndftapplicant_path)
    116116        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    117117        self.assertTrue("'O' Level" in self.browser.contents)
    118118        self.assertFalse("Higher" in self.browser.contents)
    119         self.browser.open(self.ndapplicant_path + '/manage')
     119        self.browser.open(self.ndftapplicant_path + '/manage')
    120120        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    121121        self.assertTrue("'O' Level" in self.browser.contents)
    122122        self.assertTrue("Higher" in self.browser.contents)
    123         self.browser.open(self.ndapplicant_path + '/edit')
     123        self.browser.open(self.ndftapplicant_path + '/edit')
    124124        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    125125        self.assertTrue("'O' Level" in self.browser.contents)
    126126        self.assertFalse("Higher" in self.browser.contents)
    127         self.browser.open(self.ndapplicant_path + '/application_slip.pdf')
     127        self.browser.open(self.ndftapplicant_path + '/application_slip.pdf')
    128128        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    129         # Now we turn the nd applicant into an hnd applicant.
    130         self.ndapplicant.applicant_id = u'hnd_anything'
    131         self.browser.open(self.ndapplicant_path)
     129        # Now we turn the ndft applicant into an hndft applicant.
     130        self.ndftapplicant.applicant_id = u'hndft_anything'
     131        self.browser.open(self.ndftapplicant_path)
    132132        self.assertTrue("Higher" in self.browser.contents)
    133133        self.assertTrue("'O' Level" in self.browser.contents)
    134         self.browser.open(self.ndapplicant_path + '/edit')
     134        self.browser.open(self.ndftapplicant_path + '/edit')
    135135        self.assertTrue("Higher" in self.browser.contents)
    136136        self.assertTrue("'O' Level" in self.browser.contents)
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/utils.py

    r10132 r10133  
    3232
    3333    APP_TYPES_DICT = {
    34         'prend': ['Pre-ND Programme', 'RP'],
    35         'hnd': ['HND Programmes', 'hnd'],
    36         'nd': ['ND Programmes', 'nd'],
     34        'rmd': ['Remedial Programme', 'RP'],
     35        'hndft': ['HND Full-Time Programmes', 'HNDFT'],
     36        'hndpt': ['HND Part-Time Programmes', 'HNDPT'],
     37        'ndft': ['ND Full-Time Programmes', 'NDFT'],
     38        'ndpt': ['ND Part-Time Programmes', 'NDPT'],
    3739        'putme': ['Post-UTME Screening Exercise', 'PUTME'],
    3840        'app': ['General Studies', 'APP'],
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r10131 r10133  
    300300        self.certificate2 = createObject('waeup.Certificate')
    301301        self.certificate2.code = u'CERT2'
    302         self.certificate2.application_category = 'nd'
     302        self.certificate2.application_category = 'ndft'
    303303        self.certificate2.study_mode = 'nd_ft'
    304304        self.certificate2.start_level = 100
     
    306306        self.app['faculties']['CPGS']['dep1'].certificates.addCertificate(
    307307            self.certificate2)
    308         self.applicantscontainer.application_category = 'nd'
     308        self.applicantscontainer.application_category = 'ndft'
    309309        self.applicant.applicant_id = u'nd_anything'
    310310       
     
    346346            in self.browser.contents)
    347347
    348         # hnd fee goes to another account
     348        # hndft fee goes to another account
    349349        self.applicant.applicant_id = u'hnd_anything'
    350350        self.browser.open(self.manage_path)
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/utils/utils.py

    r10121 r10133  
    2929    APP_CATS_DICT = {
    3030        'basic': 'Basic',
    31         'nd': 'National Diploma Programmes',
    32         'hnd': 'Higher National Diploma Programmes',
     31        'ndft': 'National Diploma Full-Time Programmes',
     32        'ndpt': 'National Diploma Part-Time Programmes',
     33        'hndft': 'Higher National Diploma Full-Time Programmes',
     34        'hndpt': 'Higher National Diploma Part-Time Programmes',
    3335        'pgd': 'Postgraduate Diploma Programmes',
    34         'prend': 'Pre-ND Programmes',
     36        'rmd': 'Remedial Programmes',
    3537        }
    3638
    3739    STUDY_MODES_DICT = {
    38         'nd_ft': 'National Diploma Full Time',
    39         'nd_pt': 'National Diploma Part Time',
    40         'hnd_ft': 'Higher National Diploma Full Time',
    41         'hnd_pt': 'Higher National Diploma Part Time',
    42         'pgd_ft': 'Postgraduate Diploma Full Time',
    43         'pgd_pt': 'Postgraduate Diploma Part Time',
    44         'prend': 'Pre-ND',
     40        'nd_ft': 'National Diploma Full-Time',
     41        'nd_pt': 'National Diploma Part-Time',
     42        'hnd_ft': 'Higher National Diploma Full-Time',
     43        'hnd_pt': 'Higher National Diploma Part-Time',
     44        'pgd_ft': 'Postgraduate Diploma Full-Time',
     45        'pgd_pt': 'Postgraduate Diploma Part-Time',
     46        'rmd': 'Remedial',
    4547        }
    4648
Note: See TracChangeset for help on using the changeset viewer.