Ignore:
Timestamp:
8 Apr 2012, 09:59:47 (12 years ago)
Author:
Henrik Bettermann
Message:

Add more phone prefixes.

Temporarily remove language selector.

Split pg application into pg full-time and pg part-time.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py

    r8056 r8064  
    6161        # Add an two different applicants containers
    6262        self.pgcontainer = ApplicantsContainer()
    63         self.pgcontainer.code = u'pg2011'
    64         self.pgcontainer.prefix = u'pg'
    65         self.app['applicants']['pg2011'] = self.pgcontainer
     63        self.pgcontainer.code = u'pgft2011'
     64        self.pgcontainer.prefix = u'pgft'
     65        self.app['applicants']['pgft2011'] = self.pgcontainer
    6666        self.ugcontainer = ApplicantsContainer()
    6767        self.ugcontainer.code = u'app2011'
     
    8484        pgapplicant.firstname = u'Anna'
    8585        pgapplicant.lastname = u'Post'
    86         self.app['applicants']['pg2011'].addApplicant(pgapplicant)
     86        self.app['applicants']['pgft2011'].addApplicant(pgapplicant)
    8787        self.pgapplication_number = pgapplicant.application_number
    88         self.pgapplicant = self.app['applicants']['pg2011'][
     88        self.pgapplicant = self.app['applicants']['pgft2011'][
    8989            self.pgapplication_number]
    9090
     
    108108    def test_manage_and_view_applicant(self):
    109109        # Managers can manage pg applicants
    110         pgapplicant_path = ('http://localhost/app/applicants/pg2011/%s'
     110        pgapplicant_path = ('http://localhost/app/applicants/pgft2011/%s'
    111111            % self.pgapplication_number)
    112112        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r8051 r8064  
    3838        'dp': ['Diploma Programmes', 'DPP'],
    3939        'pce': ['PCE Screening', 'PCE'],
    40         'pg': ['Postgraduate Programmes', 'PCE']
     40        'pgft': ['Postgraduate Full-Time Programmes', 'PG'],
     41        'pgpt': ['Postgraduate Part-Time Programmes', 'PG']
    4142        }
    4243
  • main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py

    r8020 r8064  
    1919"""
    2020import os
    21 from waeup.kofa.utils.utils import KofaUtils
     21from waeup.kofa.utils.utils import KofaUtils, sorted_phone_prefixes
    2222from waeup.kofa.accesscodes import create_accesscode
    2323from waeup.uniben.interfaces import MessageFactory as _
     
    5151    return
    5252
     53INT_PHONE_PREFIXES = [
     54    (99, _('Germany'), '49'),
     55    ( 1, _('Nigeria'), '234'),
     56    (99, _('United States'), '1'),
     57    (99, _('Niger'), '234'),
     58    (99, _('Benin'), '229'),
     59    (99, _('Cameroon'), '237'),
     60    (99, _('United Kingdom'), '44'),
     61    (99, _('France'), '33'),
     62    ]
    5363
    5464class KofaUtils(KofaUtils):
     
    5767    PORTAL_LANGUAGE = 'en'
    5868
     69    # We do not dosplay the language selector at the moment.
    5970    PREFERRED_LANGUAGES_DICT = {
    60         'en':(1, u'English'),
    61         'fr':(2, u'Français'),
    62         'de':(3, u'Deutsch'),
    63         'ha':(4, u'Hausa'),
    64         'yo':(5, u'Yoruba'),
    65         'ig':(6, u'Igbo'),
    66         }
     71        }
     72
     73    #: A function to return
     74    @classmethod
     75    def sorted_phone_prefixes(cls, data=INT_PHONE_PREFIXES, request=None):
     76        return sorted_phone_prefixes(data, request)
    6777
    6878    EXAM_SUBJECTS_DICT = {
     
    200210        'basic': 'PUME, PDE, PCE, PRENCE',
    201211        'no': 'no application',
    202         'pg': 'Postgraduate',
     212        'pg_ft': 'Postgraduate Full-Time',
     213        'pg_pt': 'Postgraduate Part-Time',
    203214        'sandwich': 'Sandwich',
    204215        'cest': 'Part-Time, Diploma, Certificate'
Note: See TracChangeset for help on using the changeset viewer.