Ignore:
Timestamp:
6 Apr 2012, 09:20:11 (13 years ago)
Author:
Henrik Bettermann
Message:

Configure application forms for postgraduate students.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r8020 r8051  
    8787        if target is not None and target.startswith('pg'):
    8888            form_fields = grok.AutoFields(IPGApplicant)
     89            form_fields[
     90                'emp_start'].custom_widget = FriendlyDateWidget('le-year')
     91            form_fields[
     92                'emp_end'].custom_widget = FriendlyDateWidget('le-year')
     93            form_fields[
     94                'emp2_start'].custom_widget = FriendlyDateWidget('le-year')
     95            form_fields[
     96                'emp2_end'].custom_widget = FriendlyDateWidget('le-year')
    8997        else:
    9098            form_fields = grok.AutoFields(IUGApplicant)
     
    107115            form_fields = grok.AutoFields(IPGApplicantEdit).omit(
    108116                'locked', 'course_admitted', 'student_id',
    109                 'screening_score', 'reg_number'
     117                'screening_score', 'screening_venue'
    110118                )
     119            form_fields[
     120                'emp_start'].custom_widget = FriendlyDateWidget('le-year')
     121            form_fields[
     122                'emp_end'].custom_widget = FriendlyDateWidget('le-year')
     123            form_fields[
     124                'emp2_start'].custom_widget = FriendlyDateWidget('le-year')
     125            form_fields[
     126                'emp2_end'].custom_widget = FriendlyDateWidget('le-year')
    111127        else:
    112128            form_fields = grok.AutoFields(IUGApplicantEdit).omit(
    113129                'locked', 'course_admitted', 'student_id',
    114                 'screening_score', 'reg_number'
     130                'screening_score'
    115131                )
    116132        form_fields[
     
    118134        form_fields['phone'].custom_widget = PhoneWidget
    119135        form_fields['applicant_id'].for_display = True
     136        form_fields['reg_number'].for_display = True
    120137        return form_fields
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r8020 r8051  
    2020
    2121from zope import schema
    22 from waeup.kofa.applicants.interfaces import IApplicant, IApplicantProcessData
     22from waeup.kofa.applicants.interfaces import (
     23    IApplicant, IApplicantProcessData,
     24    AppCatCertificateSource, CertificateSource)
     25from waeup.kofa.schoolgrades import ResultEntryField
     26from waeup.kofa.interfaces import SimpleKofaVocabulary
    2327from waeup.uniben.interfaces import MessageFactory as _
     28
     29high_qual = SimpleKofaVocabulary(
     30    ('National Certificate of Education','nce'),
     31    ('Pre Degree Programme','pre'),
     32    ('Diploma Programme','dip'),
     33    ('Ordinary National Diploma','ond'),
     34    ('Bachelors Degree','bd'),
     35    ('Masters Degree','md'),
     36    ('Professional Qualification','pq'),
     37    ('Other Certification','oc'),
     38    ('Higher National Diploma','hnd'),
     39    ('NCE AL OTH','nce_al_oth'),
     40    ('National Defence Academy','nda'),
     41    ('Awaiting Results','a_rslt'),
     42    ('RMC','rmc'),
     43    )
     44
     45high_grade = SimpleKofaVocabulary(
     46    ('Upper Credit','upper_credit'),
     47    ('Distinction','distinction'),
     48    ('Credit','credit'),
     49    ('Merit','merit'),
     50    ('Lower Credit','lower_credit'),
     51    ('First Class','first_class'),
     52    ('Second Class Upper','second_class_upper'),
     53    ('Second Class Lower','second_class_lower'),
     54    ('Third Class','third_class'),
     55    ('Pass','pass'),
     56    ('Awaiting Results','a_rslt'),
     57    ('A Levels','al'),
     58    )
     59
     60exam_types = SimpleKofaVocabulary(
     61    ('SSCE','ssce'),
     62    ('WAEC','waec'),
     63    ('GCE O\' LEVEL','gce_o_level'),
     64    ('TC II','tc_ii'),
     65    ('RSA','rsa'),
     66    ('NABTEB','nabteb'),
     67    ('NECO','neco'),
     68    ('ACE','ace'),
     69    ('GCE A\' LEVEL','gce_a_level'),
     70    ('IGCSE','igcse'),
     71    )
     72
    2473
    2574class IUGApplicant(IApplicant):
     
    3382    """
    3483
     84    perm_address = schema.Text(
     85        title = _(u'Permanent Address'),
     86        required = False,
     87        )
     88    course1 = schema.Choice(
     89        title = _(u'1st Choice Course of Study'),
     90        source = AppCatCertificateSource(),
     91        required = True,
     92        )
     93    course2 = schema.Choice(
     94        title = _(u'2nd Choice Course of Study'),
     95        source = AppCatCertificateSource(),
     96        required = False,
     97        )
     98    hq_type = schema.Choice(
     99        title = _(u'Qualification Obtained'),
     100        required = False,
     101        readonly = False,
     102        vocabulary = high_qual,
     103        )
     104    hq_matric_no = schema.TextLine(
     105        title = _(u'Former Matric Number'),
     106        required = False,
     107        readonly = False,
     108        )
     109    hq_degree = schema.Choice(
     110        title = _(u'Class of Degree'),
     111        required = False,
     112        readonly = False,
     113        vocabulary = high_grade,
     114        )
     115    hq_school = schema.TextLine(
     116        title = _(u'Institution Attended'),
     117        required = False,
     118        readonly = False,
     119        )
     120    hq_session = schema.TextLine(
     121        title = _(u'Years Attended'),
     122        required = False,
     123        readonly = False,
     124        )
     125    hq_disc = schema.TextLine(
     126        title = _(u'Discipline'),
     127        required = False,
     128        readonly = False,
     129        )
     130    pp_school = schema.Choice(
     131        title = _(u'Qualification Obtained'),
     132        required = False,
     133        readonly = False,
     134        vocabulary = exam_types,
     135        )
    35136    employer = schema.TextLine(
    36137        title = _(u'Employer'),
     
    38139        readonly = False,
    39140        )
     141    emp_position = schema.TextLine(
     142        title = _(u'Employer Position'),
     143        required = False,
     144        readonly = False,
     145        )
     146    emp_start = schema.Date(
     147        title = _(u'Start Date'),
     148        required = False,
     149        readonly = False,
     150        )
     151    emp_end = schema.Date(
     152        title = _(u'End Date'),
     153        required = False,
     154        readonly = False,
     155        )
     156    emp_reason = schema.TextLine(
     157        title = _(u'Reason for Leaving'),
     158        required = False,
     159        readonly = False,
     160        )
     161    employer2 = schema.TextLine(
     162        title = _(u'2nd Employer'),
     163        required = False,
     164        readonly = False,
     165        )
     166    emp2_position = schema.TextLine(
     167        title = _(u'2nd Employer Position'),
     168        required = False,
     169        readonly = False,
     170        )
     171    emp2_start = schema.Date(
     172        title = _(u'Start Date'),
     173        required = False,
     174        readonly = False,
     175        )
     176    emp2_end = schema.Date(
     177        title = _(u'End Date'),
     178        required = False,
     179        readonly = False,
     180        )
     181    emp2_reason = schema.TextLine(
     182        title = _(u'Reason for Leaving'),
     183        required = False,
     184        readonly = False,
     185        )
     186    notice = schema.Text(
     187        title = _(u'Notice'),
     188        required = False,
     189        readonly = False,
     190        )
     191    screening_venue = schema.TextLine(
     192        title = _(u'Screening Venue'),
     193        required = False,
     194        readonly = False,
     195        )
     196    screening_score = schema.Int(
     197        title = _(u'Screening Score'),
     198        required = False,
     199        readonly = False,
     200        )
     201    course_admitted = schema.Choice(
     202        title = _(u'Admitted Course of Study'),
     203        source = CertificateSource(),
     204        required = False,
     205        readonly = False,
     206        )
     207
     208
     209IPGApplicant[
     210    'student_id'].order =  IPGApplicant['notice'].order
    40211
    41212class IApplicant(IUGApplicant,IPGApplicant):
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r8012 r8051  
    2121import grok
    2222from waeup.kofa.applicants.utils import ApplicantsUtils
     23from waeup.uniben.interfaces import MessageFactory as _
    2324
    2425class ApplicantsUtils(ApplicantsUtils):
     
    3940        'pg': ['Postgraduate Programmes', 'PCE']
    4041        }
     42
     43    SEPARATORS_DICT = {
     44        'form.applicant_id': _(u'Base Data'),
     45        'form.course1': _(u'Programmes/Courses Desired'),
     46        'form.hq_type': _(u'Higher Education Record'),
     47        'form.presently': _(u'Course or Programme Presently Attending'),
     48        'form.nysc_year': _(u'NYSC Information'),
     49        'form.employer': _(u'Employer History'),
     50        'form.notice': _(u'Application Process Information'),
     51        'form.pp_school': _(u'Post Primary School Qualification'),
     52        }
Note: See TracChangeset for help on using the changeset viewer.