- Timestamp:
- 27 Jun 2012, 07:24:56 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/batching.py
r8582 r8821 18 18 """Batch processing for applicants. 19 19 """ 20 from waeup.kofa.interfaces import MessageFactory as _21 20 from waeup.kofa.utils.batching import BatchProcessor 22 21 from waeup.kofa.applicants.batching import ApplicantProcessor -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8803 r8821 29 29 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 30 30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source 31 from waeup.uniben.interfaces import (31 from kofacustom.nigeria.interfaces import ( 32 32 LGASource, high_qual, high_grade, exam_types) 33 33 from waeup.uniben.interfaces import MessageFactory as _ -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r8647 r8821 24 24 from zope.catalog.interfaces import ICatalog 25 25 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError 26 from waeup.kofa.applicants.utils import ApplicantsUtils 27 from waeup.kofa.applicants.interfaces import IApplicantsUtils 26 from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils 28 27 from waeup.kofa.applicants.workflow import (INITIALIZED, 29 28 STARTED, PAID, ADMITTED, NOT_ADMITTED, SUBMITTED, CREATED) … … 32 31 33 32 34 class ApplicantsUtils( ApplicantsUtils):33 class ApplicantsUtils(NigeriaApplicantsUtils): 35 34 """A collection of parameters and methods subject to customization. 36 35 """ 37 38 APP_TYPES_DICT = {39 'pude': ['Post-UDE Screening', 'PUDE'],40 'prence': ['Pre-NCE Programme', 'PRE'],41 'sandwich': ['Part-Time Degree in Education', 'SAND'],42 'pt': ['Part-Time Degree Programmes', 'PTP'],43 'putme': ['Post-UTME Screening Exercise', 'PUTME'],44 'app': ['General Studies', 'APP'],45 'cest': ['Common Entry Screening Test', 'CEST'],46 'ct': ['Certificate Programmes', 'CTP'],47 'dp': ['Diploma Programmes', 'DPP'],48 'pce': ['PCE Screening', 'PCE'],49 'pgft': ['Postgraduate Full-Time Programmes', 'PG'],50 'pgpt': ['Postgraduate Part-Time Programmes', 'PG']51 }52 53 SEPARATORS_DICT = {54 'form.applicant_id': _(u'Base Data'),55 'form.course1': _(u'Programmes/Courses Desired'),56 'form.hq_type': _(u'Higher Education Record'),57 'form.presently': _(u'Course or Programme Presently Attending'),58 'form.nysc_year': _(u'NYSC Information'),59 'form.employer': _(u'Employment History'),60 'form.jamb_subjects': _(u'JAMB Data'),61 'form.notice': _(u'Application Process Information'),62 'form.pp_school': _(u'Post Primary School Qualification'),63 'form.presently_inst': _(u'Presently attending a course or programme'),64 }65 36 66 37 # Temporarily disabled -
main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
r8715 r8821 22 22 from waeup.kofa.interfaces import (SimpleKofaVocabulary, 23 23 ISessionConfiguration, academic_sessions_vocab) 24 from waeup.uniben.utils.lgas import LGAS25 24 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.uniben') 90 26 91 27 # It's recommended to replicate all fields from the base package here. -
main/waeup.uniben/trunk/src/waeup/uniben/payments/interfaces.py
r8430 r8821 19 19 from zope import schema 20 20 from waeup.kofa.payments.interfaces import IPayment 21 from waeup. kofa.interfaces import MessageFactory as _21 from waeup.uniben.interfaces import MessageFactory as _ 22 22 23 23 class ICustomOnlinePayment(IPayment): -
main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py
r8803 r8821 29 29 from waeup.kofa.students.vocabularies import ( 30 30 nats_vocab, contextual_reg_num_source) 31 from waeup.uniben.interfaces import (31 from kofacustom.nigeria.interfaces import ( 32 32 high_qual, high_grade, exam_types, LGASource) 33 33 from waeup.uniben.interfaces import MessageFactory as _ -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r8715 r8821 20 20 from zope.component import createObject 21 21 from waeup.kofa.interfaces import CLEARED, RETURNING, PAID 22 from waeup.kofa.students.utils import StudentsUtils 23 from waeup.kofa.students.interfaces import IStudentsUtils 22 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils 24 23 from waeup.kofa.accesscodes import create_accesscode 25 24 from waeup.uniben.interfaces import MessageFactory as _ 26 25 27 class CustomStudentsUtils( StudentsUtils):26 class CustomStudentsUtils(NigeriaStudentsUtils): 28 27 """A collection of customized methods. 29 28 30 29 """ 31 grok.implements(IStudentsUtils)32 30 33 31 def getReturningData(self, student): … … 129 127 return None, payment 130 128 131 VERDICTS_DICT = {132 'NY': 'not yet',133 'A': 'Successful student',134 'B': 'Student with carryover courses',135 'C': 'Student on probation',136 'D': 'Withdrawn from the faculty',137 'E': 'Student who were previously on probation',138 'F': 'Medical case',139 'G': 'Absent from examination',140 'H': 'Withheld results',141 'I': 'Expelled/rusticated/suspended student',142 'J': 'Temporary withdrawn from the university',143 'K': 'Unregistered student',144 'L': 'Referred student',145 'M': 'Reinstatement',146 'N': 'Student on transfer',147 'O': 'NCE-III repeater',148 'Y': 'No previous verdict',149 'X': 'New 300 level student',150 'Z': 'Successful student (provisional)',151 'A1': 'First Class',152 'A2': 'Second Class Upper',153 'A3': 'Second Class Lower',154 'A4': 'Third Class',155 'A5': 'Pass',156 'A6': 'Distinction',157 'A7': 'Credit',158 'A8': 'Merit',159 }160 161 # Uniben separators162 SEPARATORS_DICT = {163 'form.fst_sit_fname': _(u'First Sitting Record'),164 'form.scd_sit_fname': _(u'Second Sitting Record'),165 'form.alr_fname': _(u'Advanced Level Record'),166 'form.hq_type': _(u'Higher Education Record'),167 'form.hq2_type': _(u'Second Higher Education Record'),168 'form.nysc_year': _(u'NYSC Information'),169 'form.employer': _(u'Employment History'),170 'form.former_matric': _(u'Former Uniben Student'),171 }172 173 129 # Uniben prefix 174 130 STUDENT_ID_PREFIX = u'B' -
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r8560 r8821 18 18 """Customize general helper utilities for Kofa. 19 19 """ 20 import os 21 import pytz 22 from waeup.kofa.utils.utils import KofaUtils, sorted_phone_prefixes 23 from waeup.uniben.interfaces import MessageFactory as _ 20 from kofacustom.nigeria.utils.utils import NigeriaKofaUtils 24 21 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): 22 class CustomKofaUtils(NigeriaKofaUtils): 37 23 """A collection of methods subject to customization. 38 24 """ 39 PORTAL_LANGUAGE = 'en'40 25 41 26 PREFERRED_LANGUAGES_DICT = { 42 27 } 43 44 #: A function to return45 @classmethod46 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 @property201 def tzinfo(self):202 return pytz.timezone('Africa/Lagos')
Note: See TracChangeset for help on using the changeset viewer.