Ignore:
Timestamp:
22 Feb 2012, 21:14:09 (13 years ago)
Author:
Henrik Bettermann
Message:

Uses sources instead of vocabularies and feed sources with dictionaries defined in SIRPUtils. This way we can easily customize the sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py

    r7678 r7681  
    4343    # (e.g. object histories).
    4444    PORTAL_LANGUAGE = 'en'
     45
     46    def getInstTypeDict(self):
     47        """Provide a dictionary of study modes.
     48        """
     49        return {
     50        'faculty': 'Faculty of',
     51        'department': 'Department of',
     52        'school': 'School of',
     53        'office': 'Office for',
     54        'centre': 'Centre for',
     55        'institute': 'Institute of',
     56        'school_for': 'School for',
     57        }
     58
     59    def getStudyModesDict(self):
     60        """Provide a dictionary of study modes.
     61        """
     62        return {
     63        'rmd_ft': 'Remedial with deficiencies',
     64        'dp_pt': 'Diploma Part Time',
     65        'ct_ft': 'Certificate Full Time',
     66        'dp_ft': 'Diploma Full Time',
     67        'de_pt': 'Direct Entry Part Time',
     68        'pg_ft': 'Postgraduate Full Time',
     69        'pg_pt': 'Postgraduate Part Time',
     70        'jm_ft': 'Joint Matriculation Full Time',
     71        'ume_ft': 'UME Full Time',
     72        'de_ft': 'Direct Entry Full Time',
     73        'ph_ft': 'Post Higher Education Full Time',
     74        'transfer_pt': 'Transfer Part Time',
     75        'ug_pt': 'Undergraduate Part Time',
     76        'transfer_ft': 'Transfer Full Time',
     77        'ct_pt': 'Certificate Part Time',
     78        'ug_ft': 'Undergraduate Full Time',
     79        'rm_ft': 'Remedial'
     80        }
     81
     82    def getAppCatDict(self):
     83        """Provide a dictionary of study modes.
     84        """
     85        return {
     86        'basic': 'PUME, PDE, PCE, PRENCE',
     87        'no': 'no application',
     88        'pg': 'Postgraduate',
     89        'sandwich': 'Sandwich',
     90        'cest': 'Part-Time, Diploma, Certificate'
     91        }
     92
     93    def getSemesterDict(self):
     94        """Provide a dictionary of semester or trimester types.
     95        """
     96        return {
     97        1: 'First Semester',
     98        2: 'Second Semester',
     99        3: 'Combined',
     100        9: 'N/A'
     101        }
    45102
    46103    def sendContactForm(self,from_name,from_addr,rcpt_name,rcpt_addr,
Note: See TracChangeset for help on using the changeset viewer.