Changeset 7843


Ignore:
Timestamp:
12 Mar 2012, 11:19:57 (13 years ago)
Author:
Henrik Bettermann
Message:

Reduce dictionaries in base package. They will be part of the custom package.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r7819 r7843  
    799799Set the remaining required fields:
    800800
    801   >>> browser.getControl(name='form.study_mode').value = ['ume_ft']
     801  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
    802802  >>> browser.getControl(name='form.start_level').value = ['100']
    803803  >>> browser.getControl(name='form.end_level').value = ['400']
     
    815815  >>> ctrl.value = 'Another cert with same code'
    816816  >>> browser.getControl(name='form.code').value = 'CERT1'
    817   >>> browser.getControl(name='form.study_mode').value = ['ume_ft']
     817  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
    818818  >>> browser.getControl(name='form.start_level').value = ['100']
    819819  >>> browser.getControl(name='form.end_level').value = ['400']
     
    955955  >>> browser.getControl(name='form.code').value = 'CERT1'
    956956  >>> browser.getControl(name='form.title').value = 'Certificate 1'
    957   >>> browser.getControl(name='form.study_mode').value = ['ume_ft']
     957  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
    958958  >>> browser.getControl(name='form.start_level').value = ['100']
    959959  >>> browser.getControl(name='form.end_level').value = ['400']
     
    966966  >>> browser.getControl(name='form.code').value = 'CERT2'
    967967  >>> browser.getControl(name='form.title').value = 'Certificate 2'
    968   >>> browser.getControl(name='form.study_mode').value = ['ume_ft']
     968  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
    969969  >>> browser.getControl(name='form.start_level').value = ['100']
    970970  >>> browser.getControl(name='form.end_level').value = ['400']
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r7841 r7843  
    9494    def getValues(self):
    9595        grades_dict = getUtility(IKofaUtils).EXAM_GRADES_DICT
    96         return sorted(grades_dict.keys())
     96        return [value[0] for value in
     97            sorted(grades_dict.items(), key=lambda item: item[1][0])]
    9798
    9899    def getTitle(self, value):
    99100        grades_dict = getUtility(IKofaUtils).EXAM_GRADES_DICT
    100         return grades_dict[value]
     101        return grades_dict[value][1]
    101102
    102103# Define a valiation method for email addresses
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r7811 r7843  
    613613        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    614614        self.assertEqual(self.browser.url, self.studycourse_student_path)
    615         self.assertTrue('Undergraduate Full Time' in self.browser.contents)
     615        self.assertTrue('Undergraduate Full-Time' in self.browser.contents)
    616616        self.browser.getLink("Manage").click()
    617617        self.assertTrue('Manage study course' in self.browser.contents)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r7841 r7843  
    382382        'B': 'Student with carryover courses',
    383383        'C': 'Student on probation',
    384         'D': 'Withdrawn from the faculty',
    385         'E': 'Student who were previously on probation',
    386         'F': 'Medical case',
    387         'G': 'Absent from examination',
    388         'H': 'Withheld results',
    389         'I': 'Expelled/rusticated/suspended student',
    390         'J': 'Temporary withdrawn from the university',
    391         'K': 'Unregistered student',
    392         'L': 'Referred student',
    393         'M': 'Reinstatement',
    394         'N': 'Student on transfer',
    395         'O': 'NCE-III repeater',
    396         'Y': 'No previous verdict',
    397         'X': 'New 300 level student',
    398         'Z': 'Successful student (provisional)',
    399         'A1': 'First Class',
    400         'A2': 'Second Class Upper',
    401         'A3': 'Second Class Lower',
    402         'A4': 'Third Class',
    403         'A5': 'Pass',
    404         'A6': 'Distinction',
    405         'A7': 'Credit',
    406         'A8': 'Merit',
    407384        }
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r7841 r7843  
    5858
    5959    EXAM_SUBJECTS_DICT = {
    60         'accounts': 'Accounts',
    61         'add_general_science': 'Add General Science',
    62         'add_maths': 'Add Maths',
    63         'agricultural_science': 'Agricultural Science',
    64         'applied_electricity': 'Applied Electricity',
    65         'arabi': 'Arabic',
    66         'arithmetics': 'Arithmetics',
    67         'art': 'Art',
    68         'auto_mechanics': 'Auto Mechanics',
    69         'basic_electricity': 'Basic Electricity',
    70         'bible_knowledge': 'Bible Knowledge',
    71         'biology': 'Biology',
    72         'biology_alt_syl': 'Biology (Alt.Syl)',
    73         'book_keeping': 'Book Keeping',
    74         'building_construction': 'Building Construction',
    75         'business_management': 'Business Management',
    76         'business_construction_management': 'Business/Construction Management (Adv)',
    77         'chemistry': 'Chemistry',
    78         'chemistry_alt_syl': 'Chemistry (Alt.Syl)',
    79         'christian_religious_studies': 'Christian Religious Studies',
    80         'clerical_office_duties': 'Clerical Office Duties',
    81         'clothing_and_textiles': 'Clothing and Textiles',
    82         'commerce': 'Commerce',
    83         'economics': 'Economics',
    84         'education': 'Education',
    85         'efik': 'Efik',
    86         'electronics': 'Electronics',
    87         'elementary_surveying': 'Elementary Surveying',
    88         'english_language': 'English Language',
    89         'engineering_science': 'Engineering Science',
    90         'financial_accounting': 'Financial Accounting',
    91         'food_and_nutrition': 'Food and Nutrition',
    92         'french': 'French',
    93         'further_mathematics': 'Further Mathematics',
    94         'general_science': 'General Science',
    95         'geography': 'Geography',
    96         'german': 'German',
    97         'government': 'Government',
    98         'hausa': 'Hausa',
    99         'hausa_literature': 'Hausa Literature',
    100         'health_science': 'Health Science',
    101         'history': 'History',
    102         'home_management': 'Home Management',
    103         'industrial_electrical_installation': 'Industrial Elect Installation (Adv)',
    104         'intergrated_science': 'Intergrated Science',
    105         'islamic_studies': 'Islamic Studies',
    106         'literature_in_english': 'Literature in English',
    107         'literature_in_nigerian_languages': 'Literature in Nigerian Languages',
    108         'igbo': 'Igbo',
    109         'igbo_literature': 'Igbo Literature',
    110         'yoruba': 'Yoruba',
    111         'yoruba_literature': 'Yoruba Literature',
    112         'management_in_living': 'Management in Living',
    113         'mathematics': 'Mathematics',
    114         'metalwork': 'Metalwork',
    115         'music': 'Music',
    116         'nigerian_language': 'Nigerian Language',
    117         'office_practice': 'Office Practice',
    118         'physical_education': 'Physical Education',
    119         'physical_health_education': 'Physical and Health Education',
    120         'physics': 'Physics',
    121         'physics_alt_syl': 'Physics (Alt.Syl)',
    122         'principles_of_cost_accounting': 'Principles of Cost Accounting',
    123         'rural_science': 'Rural Science',
    124         'science': 'Science',
    125         'secretarial_duties': 'Secretarial Duties',
    126         'shorthand': 'Shorthand',
    127         'sierra_leone_studies': 'Sierra Leone Studies',
    128         'sierra_leone_languages': 'Sierra Leone Languages',
    129         'social_studies': 'Social Studies',
    130         'statistics': 'Statistics',
    131         'teaching_practice': 'Teaching Practice',
    132         'technical_drawing': 'Technical Drawing',
    133         'typewriting': 'Typewriting',
    134         'visual_art': 'Visual Art',
    135         'woodwork': 'Woodwork',
    136         'winding_elect_machines': 'Winding of Elect Machines and Elect Eng Sc'
     60        'math': 'Mathematics',
     61        'computer_science': 'Computer Science',
    13762        }
    13863
    13964    EXAM_GRADES_DICT = {
    140         'A1': 'Excellent (A1)',
    141         'A2': 'Very Good (A2)',
    142         'A3': 'Good (A3)',
    143         'B2': 'Very Good (B2)',
    144         'B3': 'Good (B3)',
    145         'C4': 'Credit (C4)',
    146         'C5': 'Credit (C5)',
    147         'C6': 'Credit (C6)',
    148         'D7': 'Pass (D7)',
    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)'
     65        'A': (1, 'Best'),
     66        'B': (2, 'Better'),
     67        'C': (3, 'Good'),
    15868        }
    15969
     
    16979
    17080    STUDY_MODES_DICT = {
    171         'rmd_ft': 'Remedial with deficiencies',
    172         'dp_pt': 'Diploma Part Time',
    173         'ct_ft': 'Certificate Full Time',
    174         'dp_ft': 'Diploma Full Time',
    175         'de_pt': 'Direct Entry Part Time',
    176         'pg_ft': 'Postgraduate Full Time',
    177         'pg_pt': 'Postgraduate Part Time',
    178         'jm_ft': 'Joint Matriculation Full Time',
    179         'ume_ft': 'UME Full Time',
    180         'de_ft': 'Direct Entry Full Time',
    181         'ph_ft': 'Post Higher Education Full Time',
    182         'transfer_pt': 'Transfer Part Time',
    183         'ug_pt': 'Undergraduate Part Time',
    184         'transfer_ft': 'Transfer Full Time',
    185         'ct_pt': 'Certificate Part Time',
    186         'ug_ft': 'Undergraduate Full Time',
    187         'rm_ft': 'Remedial'
     81        'ug_ft': 'Undergraduate Full-Time',
     82        'ug_pt': 'Undergraduate Part-Time',
    18883        }
    18984
    19085    APP_CATS_DICT = {
    191         'basic': 'PUME, PDE, PCE, PRENCE',
     86        'basic': 'Basic Application',
    19287        'no': 'no application',
    19388        'pg': 'Postgraduate',
Note: See TracChangeset for help on using the changeset viewer.