Changeset 8823


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

Merged with waeup.uniben 8820:HEAD.

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

Legend:

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

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

    r8583 r8823  
    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.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

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

    r8567 r8823  
    1919"""
    2020
    21 from time import time
    22 import sys
    23 import grok
    24 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError
    25 from waeup.kofa.applicants.utils import ApplicantsUtils
     21from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
    2622from waeup.aaue.interfaces import MessageFactory as _
    2723
    2824
    29 class ApplicantsUtils(ApplicantsUtils):
     25class ApplicantsUtils(NigeriaApplicantsUtils):
    3026    """A collection of parameters and methods subject to customization.
    3127    """
    3228
    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.aaue/trunk/src/waeup/aaue/interfaces.py

    r8753 r8823  
    2222from waeup.kofa.interfaces import (SimpleKofaVocabulary,
    2323    ISessionConfiguration, academic_sessions_vocab)
    24 from waeup.aaue.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.aaue')
    9026
    9127# It's recommended to replicate all fields from the base package here.
  • main/waeup.aaue/trunk/src/waeup/aaue/payments/interfaces.py

    r8762 r8823  
    2020from waeup.kofa.payments.interfaces import IPayment
    2121from waeup.kofa.interfaces import SimpleKofaVocabulary
    22 from waeup.kofa.interfaces import MessageFactory as _
     22from waeup.aaue.interfaces import MessageFactory as _
    2323
    2424payment_categories = SimpleKofaVocabulary(
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

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

    r8775 r8823  
    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.aaue.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):
     
    155153        return None, payment
    156154
    157     VERDICTS_DICT = {
    158         'NY': 'not yet',
    159         'A': 'Successful student',
    160         'B': 'Student with carryover courses',
    161         'C': 'Student on probation',
    162         'D': 'Withdrawn from the faculty',
    163         'E': 'Student who were previously on probation',
    164         'F': 'Medical case',
    165         'G': 'Absent from examination',
    166         'H': 'Withheld results',
    167         'I': 'Expelled/rusticated/suspended student',
    168         'J': 'Temporary withdrawn from the university',
    169         'K': 'Unregistered student',
    170         'L': 'Referred student',
    171         'M': 'Reinstatement',
    172         'N': 'Student on transfer',
    173         'O': 'NCE-III repeater',
    174         'Y': 'No previous verdict',
    175         'X': 'New 300 level student',
    176         'Z': 'Successful student (provisional)',
    177         'A1': 'First Class',
    178         'A2': 'Second Class Upper',
    179         'A3': 'Second Class Lower',
    180         'A4': 'Third Class',
    181         'A5': 'Pass',
    182         'A6': 'Distinction',
    183         'A7': 'Credit',
    184         'A8': 'Merit',
    185         }
    186 
    187     # AAUE separators
    188     SEPARATORS_DICT = {
    189         'form.fst_sit_fname': _(u'First Sitting Record'),
    190         'form.scd_sit_fname': _(u'Second Sitting Record'),
    191         'form.alr_fname': _(u'Advanced Level Record'),
    192         'form.hq_type': _(u'Higher Education Record'),
    193         'form.hq2_type': _(u'Second Higher Education Record'),
    194         'form.nysc_year': _(u'NYSC Information'),
    195         'form.employer': _(u'Employment History'),
    196         'form.former_matric': _(u'Former AAUE Student'),
    197         }
    198 
    199155    # AAUE prefix
    200156    STUDENT_ID_PREFIX = u'E'
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r8567 r8823  
    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.aaue.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         'rmd_ft': 'Remedial with deficiencies',
    174         'dp_pt': 'Diploma Part Time',
    175         'ct_ft': 'Certificate Full Time',
    176         'dp_ft': 'Diploma Full Time',
    177         'de_pt': 'Direct Entry Part Time',
    178         'pg_ft': 'Postgraduate Full Time',
    179         'pg_pt': 'Postgraduate Part Time',
    180         'jm_ft': 'Joint Matriculation Full Time',
    181         'de_ft': 'Direct Entry Full Time',
    182         'ph_ft': 'Post Higher Education Full Time',
    183         'transfer_pt': 'Transfer Part Time',
    184         'ug_pt': 'Undergraduate Part Time',
    185         'transfer_ft': 'Transfer Full Time',
    186         'ct_pt': 'Certificate Part Time',
    187         'ug_ft': 'Undergraduate Full Time',
    188         'rm_ft': 'Remedial'
    189         }
    190 
    191     APP_CATS_DICT = {
    192         'basic': 'PUTME, PDE, PCE, PRENCE',
    193         'no': 'no application',
    194         'pg_ft': 'Postgraduate Full-Time',
    195         'pg_pt': 'Postgraduate Part-Time',
    196         'sandwich': 'Sandwich',
    197         'cest': 'Part-Time, Diploma, Certificate'
    198         }
    199 
    200     @property
    201     def tzinfo(self):
    202         return pytz.timezone('Africa/Lagos')
Note: See TracChangeset for help on using the changeset viewer.