Changeset 8833 for main/waeup.futminna/trunk/src/waeup/futminna
- Timestamp:
- 27 Jun 2012, 09:40:35 (13 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna
- Property svn:mergeinfo changed
/main/waeup.uniben/trunk/src/waeup/uniben merged: 8821
- Property svn:mergeinfo changed
-
main/waeup.futminna/trunk/src/waeup/futminna/applicants/batching.py
r8619 r8833 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.futminna/trunk/src/waeup/futminna/applicants/interfaces.py
r8806 r8833 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.futminna.interfaces import (31 from kofacustom.nigeria.interfaces import ( 32 32 LGASource, high_qual, high_grade, exam_types) 33 33 from waeup.futminna.interfaces import MessageFactory as _ -
main/waeup.futminna/trunk/src/waeup/futminna/applicants/utils.py
r8619 r8833 22 22 import sys 23 23 import grok 24 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError 25 from waeup.kofa.applicants.utils import ApplicantsUtils 26 from waeup.futminna.interfaces import MessageFactory as _ 24 from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils 27 25 28 26 29 class ApplicantsUtils(ApplicantsUtils): 27 28 class ApplicantsUtils(NigeriaApplicantsUtils): 30 29 """A collection of parameters and methods subject to customization. 31 30 """ 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.futminna/trunk/src/waeup/futminna/interfaces.py
r8714 r8833 22 22 from waeup.kofa.interfaces import (SimpleKofaVocabulary, 23 23 ISessionConfiguration, academic_sessions_vocab) 24 from waeup.futminna.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.futminna') 90 26 91 27 # It's recommended to replicate all fields from the base package here. -
main/waeup.futminna/trunk/src/waeup/futminna/payments/interfaces.py
r8430 r8833 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.futminna.interfaces import MessageFactory as _ 22 22 23 23 class ICustomOnlinePayment(IPayment): -
main/waeup.futminna/trunk/src/waeup/futminna/students/interfaces.py
r8806 r8833 29 29 from waeup.kofa.students.vocabularies import ( 30 30 nats_vocab, contextual_reg_num_source) 31 from waeup.futminna.interfaces import (31 from kofacustom.nigeria.interfaces import ( 32 32 high_qual, high_grade, exam_types, LGASource) 33 33 from waeup.futminna.interfaces import MessageFactory as _ -
main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py
r8714 r8833 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.futminna.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 # FUTMinna 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 FUTMinna Student'),171 }172 173 129 # FUTMinna prefix 174 130 STUDENT_ID_PREFIX = u'M' -
main/waeup.futminna/trunk/src/waeup/futminna/utils/utils.py
r8619 r8833 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.futminna.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.