Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7682)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7683)
@@ -29,6 +29,6 @@
 from waeup.sirp.applicants.interfaces import (
     IApplicant, IApplicantEdit, IApplicantsRoot,
-    IApplicantsContainer, IApplicantsContainerAdd, application_types_vocab,
-    MAX_UPLOAD_SIZE, IApplicantOnlinePayment,
+    IApplicantsContainer, IApplicantsContainerAdd,
+    MAX_UPLOAD_SIZE, IApplicantOnlinePayment, IApplicantsUtils
     )
 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
@@ -158,5 +158,6 @@
         year = data['year']
         code = u'%s%s' % (data['prefix'], year)
-        prefix = application_types_vocab.getTerm(data['prefix'])
+        appcats_dict = getUtility(IApplicantsUtils).getApplicationTypeDict()
+        prefix = appcats_dict[data['prefix']][0]
         title = u'%s %s/%s' % (prefix.title, year, year + 1)
         if code in self.context.keys():
Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py	(revision 7682)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py	(revision 7683)
@@ -23,9 +23,10 @@
 from zope import schema
 from zope.interface import Interface, Attribute, implements, directlyProvides
-from zope.component import getUtilitiesFor, queryUtility
+from zope.component import getUtilitiesFor, queryUtility, getUtility
 from zope.catalog.interfaces import ICatalog
 from zope.schema.interfaces import (
     ValidationError, ISource, IContextSourceBinder)
 from zc.sourcefactory.basic import BasicSourceFactory
+from zc.sourcefactory.contextual import BasicContextualSourceFactory
 from waeup.sirp.schema import TextLineChoice
 from waeup.sirp.interfaces import (
@@ -35,6 +36,4 @@
 from waeup.sirp.students.vocabularies import (
     lgas_vocab, CertificateSource, GenderSource)
-from waeup.sirp.applicants.vocabularies import (
-    application_types_vocab, AppCatCertificateSource)
 from waeup.sirp.payments.interfaces import IOnlinePayment
 
@@ -78,4 +77,57 @@
 directlyProvides(contextual_reg_num_source, IContextSourceBinder)
 
+class AppCatCertificateSource(CertificateSource):
+    """An application certificate source delivers all courses which belong to
+    a certain application_category.
+    """
+    def getValues(self, context):
+        # appliction category not available when certificate was deleted.
+        # shouldn't that info be part of applicant info instead?
+        # when we cannot determine the appcat, we will display all courses.
+        appcat = getattr(getattr(context, '__parent__', None),
+                         'application_category', None)
+        catalog = getUtility(ICatalog, name='certificates_catalog')
+        result = catalog.searchResults(
+            application_category=(appcat,appcat))
+        result = sorted(result, key=lambda value: value.code)
+        curr_course = context.course1
+        if curr_course is not None and curr_course not in result:
+            # display also current course even if it is not catalogued
+            # (any more)
+            result = [curr_course,] + result
+        return result
+
+class ApplicationTypeSource(BasicContextualSourceFactory):
+    """An application type source delivers screening types defined in the
+    portal.
+    """
+    def getValues(self, context):
+        self.appcats_dict = getUtility(
+            IApplicantsUtils).getApplicationTypeDict()
+        return sorted(self.appcats_dict.keys())
+
+    def getToken(self, context, value):
+        return value
+
+    def getTitle(self, context, value):
+        return self.appcats_dict[value][0]
+
+# Maybe Uniben still needs this ...
+#class ApplicationPinSource(BasicContextualSourceFactory):
+#    """An application pin source delivers PIN prefixes for application
+#    defined in the portal.
+#    """
+#    def getValues(self, context):
+#        self.apppins_dict = getUtility(
+#            IApplicantsUtils).getApplicationTypeDict()
+#        return sorted(self.appcats_dict.keys())
+#
+#    def getToken(self, context, value):
+#        return value
+#
+#    def getTitle(self, context, value):
+#        return u"%s (%s)" % (
+#            self.apppins_dict[value][1],self.apppins_dict[value][0])
+
 class ApplicantContainerProviderSource(BasicSourceFactory):
     """A source offering all available applicants container types.
@@ -119,4 +171,5 @@
     """A collection of methods which are subject to customization.
     """
+    pass
 
 class IApplicantsRoot(ISIRPObject, IContainer):
@@ -151,8 +204,8 @@
 
     prefix = schema.Choice(
-        title = u'Application target',
-        required = True,
-        default = None,
-        source = application_types_vocab,
+        title = u'Application Target',
+        required = True,
+        default = None,
+        source = ApplicationTypeSource(),
         readonly = True,
         )
@@ -166,5 +219,5 @@
 
     year = schema.Choice(
-        title = u'Year of entrance',
+        title = u'Year of Entrance',
         required = True,
         default = None,
@@ -174,5 +227,5 @@
 
     provider = schema.Choice(
-        title = u'Applicants container type',
+        title = u'Applicants Container Type',
         required = True,
         default = None,
@@ -181,9 +234,10 @@
         )
 
+    # Maybe Uniben still needs this ...
     #ac_prefix = schema.Choice(
     #    title = u'Activation code prefix',
     #    required = True,
     #    default = None,
-    #    source = application_pins_vocab,
+    #    source = ApplicationPinSource(),
     #    )
 
@@ -203,5 +257,5 @@
 
     startdate = schema.Date(
-        title = u'Application start date',
+        title = u'Application Start Date',
         required = False,
         default = None,
@@ -209,5 +263,5 @@
 
     enddate = schema.Date(
-        title = u'Application closing date',
+        title = u'Application Closing Date',
         required = False,
         default = None,
@@ -254,13 +308,13 @@
     """
     prefix = schema.Choice(
-        title = u'Application target',
-        required = True,
-        default = None,
-        source = application_types_vocab,
+        title = u'Application Target',
+        required = True,
+        default = None,
+        source = ApplicationTypeSource(),
         readonly = False,
         )
 
     year = schema.Choice(
-        title = u'Year of entrance',
+        title = u'Year of Entrance',
         required = True,
         default = None,
@@ -270,5 +324,5 @@
 
     provider = schema.Choice(
-        title = u'Applicants container type',
+        title = u'Applicants Container Type',
         required = True,
         default = None,
Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_interfaces.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_interfaces.py	(revision 7682)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_interfaces.py	(revision 7683)
@@ -22,28 +22,6 @@
 from zc.sourcefactory.browser.source import FactoredTerms
 from zope.publisher.browser import TestRequest
-from waeup.sirp.applicants.vocabularies import application_types_vocab
+from waeup.sirp.applicants.interfaces import ApplicationTypeSource
 from waeup.sirp.students.vocabularies import GenderSource
-
-class ApplicationCategoriesTestCase(unittest.TestCase):
-
-    def setUp(self):
-        self.vocab = application_types_vocab
-        return
-
-    def test_vocabulary_len(self):
-        self.assertEqual(len(self.vocab), 10)
-        return
-
-    def test_vocabulary_items(self):
-        self.assertTrue('pude' in self.vocab)
-        return
-
-    def test_term_attributes(self):
-        # Check that each vocab entry provided value, token, and title.
-        term = self.vocab.getTermByToken('pude')
-        self.assertEqual(term.token, 'pude')
-        self.assertEqual(term.value, 'pude')
-        self.assertEqual(term.title, 'Post UDE Screening')
-        return
 
 class InterfacesTest(unittest.TestCase):
@@ -82,5 +60,4 @@
     suite = unittest.TestSuite()
     for testcase in [
-            ApplicationCategoriesTestCase,
             InterfacesTest,
             ]:
Index: in/waeup.sirp/trunk/src/waeup/sirp/applicants/vocabularies.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/vocabularies.py	(revision 7682)
+++ 	(revision )
@@ -1,66 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-"""Vocabularies and sources for the application section.
-"""
-from zope.component import getUtility
-from zope.catalog.interfaces import ICatalog
-from waeup.sirp.interfaces import SimpleSIRPVocabulary
-from waeup.sirp.students.vocabularies import CertificateSource
-
-#: Types of applications we support.
-APPLICATION_TYPES = (
-    ('General Studies', 'app','APP'),
-    ('Pre-NCE Programme', 'prence','PRE'),
-    ('Post UME Screening Test', 'pume','PUME'),
-    ('Post UDE Screening', 'pude','PUDE'),
-    ('Part Time Degree in Education', 'sandwich','SAND'),
-    ('Part-Time Degree Programmes', 'pt','PTP'),
-    ('Diploma Programmes', 'dp','DPP'),
-    ('PCE Screening', 'pce','PCE'),
-    ('Certificate Programmes', 'ct','CTP'),
-    ('Common Entry Screening Test', 'cest','CEST'),
-    )
-
-#: A :class:`waeup.sirp.interfaces.SimpleSIRPVocabulary` of supported
-#: application or screening types.
-application_types_vocab = SimpleSIRPVocabulary(
-    *[(x[0],x[1]) for x in APPLICATION_TYPES])
-application_pins_vocab = SimpleSIRPVocabulary(
-    *[(u"%s (%s)" % (x[2],x[0]),x[2]) for x in APPLICATION_TYPES])
-
-
-class AppCatCertificateSource(CertificateSource):
-    """An application certificate source delivers all courses which belong to
-    a certain application_category.
-    """
-    def getValues(self, context):
-        # appliction category not available when certificate was deleted.
-        # shouldn't that info be part of applicant info instead?
-        # when we cannot determine the appcat, we will display all courses.
-        appcat = getattr(getattr(context, '__parent__', None),
-                         'application_category', None)
-        catalog = getUtility(ICatalog, name='certificates_catalog')
-        result = catalog.searchResults(
-            application_category=(appcat,appcat))
-        result = sorted(result, key=lambda value: value.code)
-        curr_course = context.course1
-        if curr_course is not None and curr_course not in result:
-            # display also current course even if it is not catalogued
-            # (any more)
-            result = [curr_course,] + result
-        return result
