Changeset 8069 for main/waeup.kofa/trunk


Ignore:
Timestamp:
9 Apr 2012, 06:34:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Remove Nigerian lgas from base package. LGAs are not core data.

Use the COUNTRIES instead of NATS.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r8052 r8069  
    3434from waeup.kofa.payments.interfaces import IOnlinePayment
    3535from waeup.kofa.schoolgrades import ResultEntryField
    36 from waeup.kofa.students.vocabularies import (
    37     lgas_vocab, GenderSource)
     36from waeup.kofa.students.vocabularies import GenderSource
    3837from waeup.kofa.university.vocabularies import (
    3938    course_levels, AppCatSource, CertificateSource)
     
    343342        required = True,
    344343        )
    345     lga = schema.Choice(
    346         source = lgas_vocab,
    347         title = _(u'State/LGA'),
    348         default = 'foreigner',
    349         required = False,
    350         )
    351344    sex = schema.Choice(
    352345        title = _(u'Sex'),
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r8048 r8069  
    157157        self.browser.getControl(name="form.course1").value = ['CERT1']
    158158        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
    159         self.browser.getControl(name="form.lga").value = ['foreigner']
    160159        self.browser.getControl(name="form.sex").value = ['m']
    161160        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r8057 r8069  
    140140            'applicant_id,application_date,application_number,course1,course2,'
    141141            'course_admitted,date_of_birth,display_fullname,email,firstname,'
    142             'history,lastname,lga,locked,middlename,notice,password,phone,'
     142            'history,lastname,locked,middlename,notice,password,phone,'
    143143            'reg_number,screening_score,screening_venue,sex,state,'
    144144            'student_id\r\n'
     
    147147        self.assertTrue(
    148148            'Application initialized by system\'],Tester,'
    149             'foreigner,0,,,,,,,,,initialized,\r\n'
     149            '0,,,,,,,,,initialized,\r\n'
    150150            in result)
    151151        return
     
    164164            'applicant_id,application_date,application_number,course1,course2,'
    165165            'course_admitted,date_of_birth,display_fullname,email,firstname,'
    166             'history,lastname,lga,locked,middlename,notice,password,phone,'
     166            'history,lastname,locked,middlename,notice,password,phone,'
    167167            'reg_number,screening_score,screening_venue,sex,state,'
    168168            'student_id\r\n'
     
    172172        self.assertTrue(
    173173            'Application initialized by system\'],'
    174             'Tester,foreigner,0,M.,"Some notice\nin lines.",any password,'
     174            'Tester,0,M.,"Some notice\nin lines.",any password,'
    175175            '+234-123-12345,123456,98,Exam Room,f,initialized,\r\n'
    176176            in result)
     
    188188            'applicant_id,application_date,application_number,course1,course2,'
    189189            'course_admitted,date_of_birth,display_fullname,email,firstname,'
    190             'history,lastname,lga,locked,middlename,notice,password,phone,'
     190            'history,lastname,locked,middlename,notice,password,phone,'
    191191            'reg_number,screening_score,screening_venue,sex,state,'
    192192            'student_id\r\n'
     
    196196        self.assertTrue(
    197197            'Application initialized by system\'],'
    198             'Tester,foreigner,0,M.,"Some notice\nin lines.",any password,'
     198            'Tester,0,M.,"Some notice\nin lines.",any password,'
    199199            '+234-123-12345,123456,98,Exam Room,f,initialized,\r\n'
    200200            in result)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r8008 r8069  
    232232
    233233    nationality = schema.Choice(
    234         source = nats_vocab,
     234        vocabulary = nats_vocab,
    235235        title = _(u'Nationality'),
    236         default = 'nigeria',
    237236        required = False,
    238237        )
  • main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py

    r7915 r8069  
    2727from waeup.kofa.interfaces import SimpleKofaVocabulary
    2828from waeup.kofa.interfaces import MessageFactory as _
    29 from waeup.kofa.students.lgas import LGAS
    30 from waeup.kofa.students.nats import NATS
     29from waeup.kofa.utils.helpers import get_sorted_preferred
     30from waeup.kofa.utils.countries import COUNTRIES
    3131from waeup.kofa.university.vocabularies import course_levels
    3232
    33 lgas_vocab = SimpleKofaVocabulary(
    34     *sorted([(x[1],x[0]) for x in LGAS]))
    3533
    36 nats_vocab = SimpleKofaVocabulary(
    37     *sorted([(x[1],x[0]) for x in NATS]))
     34#: a tuple of tuples (<COUNTRY-NAME>, <ISO-CODE>) with Nigeria first.
     35COUNTRIES = get_sorted_preferred(COUNTRIES, ['NG'])
     36nats_vocab = SimpleKofaVocabulary(*COUNTRIES)
    3837
    3938def study_levels(studycourse):
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r7993 r8069  
    140140        9: 'N/A'
    141141        }
    142 
    143     #: a tuple of tuples (<COUNTRY-NAME>, <ISO-CODE>) with Nigeria first.
    144     COUNTRIES = get_sorted_preferred(COUNTRIES, ['NG'])
    145142
    146143    def sendContactForm(self,from_name,from_addr,rcpt_name,rcpt_addr,
Note: See TracChangeset for help on using the changeset viewer.