Ignore:
Timestamp:
27 Jun 2012, 09:48:53 (12 years ago)
Author:
Henrik Bettermann
Message:

Merged with waeup.futminna 8832:8833.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene

  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/batching.py

    r8584 r8834  
    1818"""Batch processing for applicants.
    1919"""
    20 from waeup.kofa.interfaces import MessageFactory as _
    2120from waeup.kofa.utils.batching import BatchProcessor
    2221from waeup.kofa.applicants.batching import ApplicantProcessor
  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py

    r8807 r8834  
    2929from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    3030from waeup.kofa.applicants.interfaces import contextual_reg_num_source
    31 from waeup.fceokene.interfaces import (
     31from kofacustom.nigeria.interfaces import (
    3232    LGASource, high_qual, high_grade, exam_types)
    3333from waeup.fceokene.interfaces import MessageFactory as _
  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/utils.py

    r8566 r8834  
    2222import sys
    2323import grok
    24 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError
    25 from waeup.kofa.applicants.utils import ApplicantsUtils
    26 from waeup.fceokene.interfaces import MessageFactory as _
     24from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
    2725
    2826
    29 class ApplicantsUtils(ApplicantsUtils):
     27
     28class ApplicantsUtils(NigeriaApplicantsUtils):
    3029    """A collection of parameters and methods subject to customization.
    3130    """
    32 
    33     APP_TYPES_DICT = {
    34         'pude': ['Post UDE Screening', 'PUDE'],
    35         'prence': ['Pre-NCE Programme', 'PRE'],
    36         'sandwich': ['Part-Time Degree in Education', 'SAND'],
    37         'pt': ['Part-Time Degree Programmes', 'PTP'],
    38         'putme': ['Post-UTME Screening Exercise', 'PUTME'],
    39         'app': ['General Studies', 'APP'],
    40         'cest': ['Common Entry Screening Test', 'CEST'],
    41         'ct': ['Certificate Programmes', 'CTP'],
    42         'dp': ['Diploma Programmes', 'DPP'],
    43         'pce': ['PCE Screening', 'PCE'],
    44         'pgft': ['Postgraduate Full-Time Programmes', 'PG'],
    45         'pgpt': ['Postgraduate Part-Time Programmes', 'PG']
    46         }
    47 
    48     SEPARATORS_DICT = {
    49         'form.applicant_id': _(u'Base Data'),
    50         'form.course1': _(u'Programmes/Courses Desired'),
    51         'form.hq_type': _(u'Higher Education Record'),
    52         'form.presently': _(u'Course or Programme Presently Attending'),
    53         'form.nysc_year': _(u'NYSC Information'),
    54         'form.employer': _(u'Employment History'),
    55         'form.jamb_subjects': _(u'JAMB Data'),
    56         'form.notice': _(u'Application Process Information'),
    57         'form.pp_school': _(u'Post Primary School Qualification'),
    58         'form.presently_inst': _(u'Presently attending a course or programme'),
    59         }
  • main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py

    r8713 r8834  
    2222from waeup.kofa.interfaces import (SimpleKofaVocabulary,
    2323    ISessionConfiguration, academic_sessions_vocab)
    24 from waeup.fceokene.utils.lgas import LGAS
    2524
    26 _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.custom')
    27 
    28 high_qual = SimpleKofaVocabulary(
    29     ('National Certificate of Education','nce'),
    30     ('Pre Degree Programme','pre'),
    31     ('Diploma Programme','dip'),
    32     ('Ordinary National Diploma','ond'),
    33     ('Bachelors Degree','bd'),
    34     ('Masters Degree','md'),
    35     ('Professional Qualification','pq'),
    36     ('Other Certification','oc'),
    37     ('Higher National Diploma','hnd'),
    38     ('Post Graduate Diploma','pgd'),
    39     ('NCE AL OTH','nce_al_oth'),
    40     ('National Defence Academy','nda'),
    41     ('Awaiting Results','a_rslt'),
    42     ('RMC','rmc'),
    43     )
    44 
    45 high_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 
    60 exam_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 
    73 #lgas_vocab = SimpleKofaVocabulary(
    74 #    *sorted([(x[1],x[0]) for x in LGAS]))
    75 
    76 class LGASource(BasicSourceFactory):
    77     """A source for school subjects used in exam documentation.
    78     """
    79     lga_dict = dict(LGAS)
    80 
    81     def getValues(self):
    82         return sorted(self.lga_dict.keys())
    83 
    84     def getToken(self, value):
    85         return str(value)
    86 
    87     def getTitle(self, value):
    88         return self.lga_dict.get(value,
    89             _('Invalid key: ${a}', mapping = {'a':value}))
     25_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.fceokene')
    9026
    9127# It's recommended to replicate all fields from the base package here.
  • main/waeup.fceokene/trunk/src/waeup/fceokene/payments/interfaces.py

    r8430 r8834  
    1919from zope import schema
    2020from waeup.kofa.payments.interfaces import IPayment
    21 from waeup.kofa.interfaces import MessageFactory as _
     21from waeup.fceokene.interfaces import MessageFactory as _
    2222
    2323class ICustomOnlinePayment(IPayment):
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/interfaces.py

    r8807 r8834  
    2929from waeup.kofa.students.vocabularies import (
    3030    nats_vocab, contextual_reg_num_source)
    31 from waeup.fceokene.interfaces import (
     31from kofacustom.nigeria.interfaces import (
    3232    high_qual, high_grade, exam_types, LGASource)
    3333from waeup.fceokene.interfaces import MessageFactory as _
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r8713 r8834  
    2020from zope.component import createObject
    2121from waeup.kofa.interfaces import CLEARED, RETURNING, PAID
    22 from waeup.kofa.students.utils import StudentsUtils
    23 from waeup.kofa.students.interfaces import IStudentsUtils
     22from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    2423from waeup.kofa.accesscodes import create_accesscode
    2524from waeup.fceokene.interfaces import MessageFactory as _
    2625
    27 class CustomStudentsUtils(StudentsUtils):
     26class CustomStudentsUtils(NigeriaStudentsUtils):
    2827    """A collection of customized methods.
    2928
    3029    """
    31     grok.implements(IStudentsUtils)
    3230
    3331    def getReturningData(self, student):
     
    122120        return None, payment
    123121
    124     VERDICTS_DICT = {
    125         'NY': 'not yet',
    126         'A': 'Successful student',
    127         'B': 'Student with carryover courses',
    128         'C': 'Student on probation',
    129         'D': 'Withdrawn from the faculty',
    130         'E': 'Student who were previously on probation',
    131         'F': 'Medical case',
    132         'G': 'Absent from examination',
    133         'H': 'Withheld results',
    134         'I': 'Expelled/rusticated/suspended student',
    135         'J': 'Temporary withdrawn from the university',
    136         'K': 'Unregistered student',
    137         'L': 'Referred student',
    138         'M': 'Reinstatement',
    139         'N': 'Student on transfer',
    140         'O': 'NCE-III repeater',
    141         'Y': 'No previous verdict',
    142         'X': 'New 300 level student',
    143         'Z': 'Successful student (provisional)',
    144         'A1': 'First Class',
    145         'A2': 'Second Class Upper',
    146         'A3': 'Second Class Lower',
    147         'A4': 'Third Class',
    148         'A5': 'Pass',
    149         'A6': 'Distinction',
    150         'A7': 'Credit',
    151         'A8': 'Merit',
    152         }
    153 
    154     # FCEOkene separators
    155     SEPARATORS_DICT = {
    156         'form.fst_sit_fname': _(u'First Sitting Record'),
    157         'form.scd_sit_fname': _(u'Second Sitting Record'),
    158         'form.alr_fname': _(u'Advanced Level Record'),
    159         'form.hq_type': _(u'Higher Education Record'),
    160         'form.hq2_type': _(u'Second Higher Education Record'),
    161         'form.nysc_year': _(u'NYSC Information'),
    162         'form.employer': _(u'Employment History'),
    163         'form.former_matric': _(u'Former FCEOkene Student'),
    164         }
    165 
    166122    # FCEOkene prefix
    167123    STUDENT_ID_PREFIX = u'K'
  • main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py

    r8671 r8834  
    1818"""Customize general helper utilities for Kofa.
    1919"""
    20 import os
    21 import pytz
    22 from waeup.kofa.utils.utils import KofaUtils, sorted_phone_prefixes
    23 from waeup.fceokene.interfaces import MessageFactory as _
     20from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
    2421
    25 INT_PHONE_PREFIXES = [
    26     (1, _('Nigeria'), '234'),
    27     (99, _('Germany'), '49'),
    28     (99, _('United States'), '1'),
    29     (99, _('Niger'), '227'),
    30     (99, _('Benin'), '229'),
    31     (99, _('Cameroon'), '237'),
    32     (99, _('United Kingdom'), '44'),
    33     (99, _('France'), '33'),
    34     ]
    35 
    36 class KofaUtils(KofaUtils):
     22class CustomKofaUtils(NigeriaKofaUtils):
    3723    """A collection of methods subject to customization.
    3824    """
    39     PORTAL_LANGUAGE = 'en'
    4025
    4126    PREFERRED_LANGUAGES_DICT = {
    4227        }
    43 
    44     #: A function to return
    45     @classmethod
    46     def sorted_phone_prefixes(cls, data=INT_PHONE_PREFIXES, request=None):
    47         return sorted_phone_prefixes(data, request)
    48 
    49     EXAM_SUBJECTS_DICT = {
    50         'accounts': 'Accounts',
    51         'add_general_science': 'Add General Science',
    52         'add_maths': 'Add Maths',
    53         'adv_elect_install_maint': 'Adv. Electrical Installation and Maintenance',
    54         'agricultural_science': 'Agricultural Science',
    55         'applied_electricity': 'Applied Electricity',
    56         'arabi': 'Arabic',
    57         'arithmetics': 'Arithmetics',
    58         'art': 'Art',
    59         'auto_mechanics': 'Auto Mechanics',
    60         'basic_electricity': 'Basic Electricity',
    61         'bible_knowledge': 'Bible Knowledge',
    62         'biology': 'Biology',
    63         'biology_alt_syl': 'Biology (Alt.Syl)',
    64         'book_keeping': 'Book Keeping',
    65         'building_construction': 'Building Construction',
    66         'business_management': 'Business Management',
    67         'business_construction_management': 'Business/Construction Management (Adv)',
    68         'chemistry': 'Chemistry',
    69         'chemistry_alt_syl': 'Chemistry (Alt.Syl)',
    70         'christian_religious_studies': 'Christian Religious Studies',
    71         'class_teaching': 'Class Teaching',
    72         'clerical_office_duties': 'Clerical Office Duties',
    73         'clothing_and_textiles': 'Clothing and Textiles',
    74         'commerce': 'Commerce',
    75         'economics': 'Economics',
    76         'education': 'Education',
    77         'efik': 'Efik',
    78         'electronics': 'Electronics',
    79         'elementary_surveying': 'Elementary Surveying',
    80         'english_language': 'English Language',
    81         'engineering_science': 'Engineering Science',
    82         'financial_accounting': 'Financial Accounting',
    83         'food_and_nutrition': 'Food and Nutrition',
    84         'french': 'French',
    85         'further_mathematics': 'Further Mathematics',
    86         'general_science': 'General Science',
    87         'geography': 'Geography',
    88         'german': 'German',
    89         'government': 'Government',
    90         'hausa': 'Hausa',
    91         'hausa_literature': 'Hausa Literature',
    92         'health_science': 'Health Science',
    93         'history': 'History',
    94         'home_management': 'Home Management',
    95         'human_biology': 'Human Biology',
    96         'industrial_electrical_installation': 'Industrial Elect Installation (Adv)',
    97         'intergrated_science': 'Intergrated Science',
    98         'islamic_studies': 'Islamic Studies',
    99         'literature_in_english': 'Literature in English',
    100         'literature_in_nigerian_languages': 'Literature in Nigerian Languages',
    101         'igbo': 'Igbo',
    102         'igbo_literature': 'Igbo Literature',
    103         'yoruba': 'Yoruba',
    104         'yoruba_literature': 'Yoruba Literature',
    105         'management_in_living': 'Management in Living',
    106         'mathematics': 'Mathematics',
    107         'metalwork': 'Metalwork',
    108         'music': 'Music',
    109         'nigerian_language': 'Nigerian Language',
    110         'office_practice': 'Office Practice',
    111         'physical_education': 'Physical Education',
    112         'physical_health_education': 'Physical and Health Education',
    113         'physics': 'Physics',
    114         'physics_alt_syl': 'Physics (Alt.Syl)',
    115         'principles_and_practice_of_education': 'Principles and Practice of Education',
    116         'principles_of_cost_accounting': 'Principles of Cost Accounting',
    117         'rural_science': 'Rural Science',
    118         'science': 'Science',
    119         'secretarial_duties': 'Secretarial Duties',
    120         'shorthand': 'Shorthand',
    121         'sierra_leone_studies': 'Sierra Leone Studies',
    122         'sierra_leone_languages': 'Sierra Leone Languages',
    123         'social_studies': 'Social Studies',
    124         'statistics': 'Statistics',
    125         'teaching_practice': 'Teaching Practice',
    126         'technical_drawing': 'Technical Drawing',
    127         'typewriting': 'Typewriting',
    128         'visual_art': 'Visual Art',
    129         'woodwork': 'Woodwork',
    130         'winding_elect_machines': 'Winding of Elect Machines and Elect Eng Sc'
    131         }
    132 
    133     EXAM_GRADES = (
    134         ('A1', 'Excellent (A1)'),
    135         ('A2', 'Very Good (A2)'),
    136         ('A3', 'Good (A3)'),
    137         ('B2', 'Very Good (B2)'),
    138         ('B3', 'Good (B3)'),
    139         ('C4', 'Credit (C4)'),
    140         ('C5', 'Credit (C5)'),
    141         ('C6', 'Credit (C6)'),
    142         ('A', 'Pass (A)'),
    143         ('B', 'Pass (B)'),
    144         ('C', 'Pass (C)'),
    145         ('U', 'Pass (U)'),
    146         ('D7', 'Pass (D7)'),
    147         ('P7', 'Pass (P7)'),
    148         ('P8', 'Pass (P8)'),
    149         ('E8', 'Pass (E8)'),
    150         ('F9', 'Fail (F9)'),
    151         ('Aa', 'A (a)'),
    152         ('Bb', 'B (b)'),
    153         ('Cc', 'C (c)'),
    154         ('Dd', 'D (d)'),
    155         ('Ee', 'E (e)'),
    156         ('Ff', 'F (f)'),
    157         ('Gg', 'G (g)')
    158         )
    159 
    160     INST_TYPES_DICT = {
    161         'none': '',
    162         'faculty': 'Faculty of',
    163         'department': 'Department of',
    164         'school': 'School of',
    165         'office': 'Office for',
    166         'centre': 'Centre for',
    167         'institute': 'Institute of',
    168         'school_for': 'School for',
    169         'college': 'College of',
    170         }
    171 
    172     STUDY_MODES_DICT = {
    173         'ug_ft': 'Undergraduate Full Time',
    174         'ug_sw': 'Undergraduate Sandwich',
    175         'prence': 'Pre-NCE',
    176         'pce': 'PCE',
    177         'pd_ft': 'Professional Diploma in Education',
    178         }
    179 
    180     APP_CATS_DICT = {
    181         'basic': 'PUTME, PDE, PCE, PRENCE',
    182         'no': 'no application',
    183         'sandwich': 'Sandwich',
    184         'cest': 'Part-Time, Diploma, Certificate'
    185         }
    186 
    187     @property
    188     def tzinfo(self):
    189         return pytz.timezone('Africa/Lagos')
Note: See TracChangeset for help on using the changeset viewer.