Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.py	(revision 11947)
@@ -51,15 +51,11 @@
         """Setup some hard-wired components.
 
-        Create local datacenter, containers for users, students and
+        Create local datacenter, containers for users and
         the like.
         """
-        from waeup.kofa.students.container import StudentsContainer
-        from waeup.kofa.hostels.container import HostelsContainer
 
         self['users'] = UsersContainer()
         self['datacenter'] = DataCenter()
-        self['students'] = StudentsContainer()
         self['configuration'] = ConfigurationContainer()
-        self['hostels'] = HostelsContainer()
         self['mandates'] = MandatesContainer()
         self._createPlugins()
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.txt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.txt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/app.txt	(revision 11947)
@@ -58,10 +58,4 @@
     u'Sample University'
 
-    >>> myuniversity['faculties']
-    <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
-
-  >>> myuniversity['students']
-  <waeup.kofa.students.container.StudentsContainer object at 0x...>
-
   >>> myuniversity['users']
   <waeup.kofa.userscontainer.UsersContainer object at 0x...>
@@ -73,33 +67,4 @@
   <waeup.kofa.configuration.ConfigurationContainer object at 0x...>
 
-We can export universities. For this we lookup an appropriate exporter
-first::
-
-  >>> from waeup.kofa.interfaces import IKofaExporter
-  >>> exporter = IKofaExporter(myuniversity)
-  >>> exporter
-  <waeup.kofa.utils.importexport.Exporter object at 0x...>
-
-Now we can trigger the export::
-
-  >>> exporter.export()
-  <cStringIO.StringO object at 0x...>
-
-We can also get an XML representation as file. If we do not provide a
-filepath, we will get an instance of `cStringIO.StringIO`, i.e. a
-memory file::
-
-  >>> from waeup.kofa.interfaces import IKofaXMLExporter
-  >>> exporter = IKofaXMLExporter(myuniversity)
-  >>> f = exporter.export()
-  >>> f
-  <cStringIO.StringO object at 0x...>
-
-  >>> print f.read()
-  <?xml version="1.0" encoding="utf-8" ?>
-  <pickle>
-    <initialized_object id="...">
-  ...
-  </pickle>
 
 Kofa plugins
@@ -116,5 +81,5 @@
    >>> from zope.component import getAdapters, getUtilitiesFor
    >>> sorted(list(getUtilitiesFor(IKofaPluggable)))
-   [(u'accesscodes', <waeup.kofa.accesscodes...AccessCodePlugin ...)]
+   [(u'mandates', <waeup.kofa.mandates.container.MandatesPlugin ...)]
 
 
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.py	(revision 11947)
@@ -388,5 +388,5 @@
 def handle_account_added(account, event):
     """When an account is added, the local owner role and the global
-    AcademicsOfficer role must be set.
+    ProductsOfficer role must be set.
     """
     # We set the local Owner role
@@ -394,9 +394,9 @@
     role_manager_account.assignRoleToPrincipal(
         'waeup.local.Owner', account.name)
-    # We set the global AcademicsOfficer role
+    # We set the global ProductsOfficer role
     site = grok.getSite()
     role_manager_site = IPrincipalRoleManager(site)
     role_manager_site.assignRoleToPrincipal(
-        'waeup.AcademicsOfficer', account.name)
+        'waeup.ProductsOfficer', account.name)
     # Finally we have to notify the user account that the local role
     # of the same object has changed
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.txt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.txt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/authentication.txt	(revision 11947)
@@ -51,8 +51,8 @@
   {'waeup.local.Owner': [<waeup.kofa.authentication.Account object at 0x...>]}
 
-User  automatically get the global AcademicsOfficer role:
+User  automatically get the global ProductsOfficer role:
 
   >>> alice.getSiteRolesForPrincipal()
-  ['waeup.ManageDataCenter', 'waeup.AcademicsOfficer']
+  ['waeup.ManageDataCenter', 'waeup.ProductsOfficer']
 
 We can tell an account, that Alice got some role for another object:
@@ -88,67 +88,4 @@
 stored objects are removed. Furthermore this subscriber reads the
 internal local roles table.
-
-We create a faculty and grant Bob a local role:
-
-   >>> from zope.securitypolicy.interfaces import IPrincipalRoleManager
-   >>> from waeup.kofa.university.faculty import Faculty
-   >>> faculty = Faculty()
-   >>> root['app']['bobs_fac'] = faculty
-   >>> role_manager = IPrincipalRoleManager(faculty)
-   >>> role_manager.assignRoleToPrincipal(
-   ...    'waeup.PortalManager', 'bob')
-
-We notify the machinery about that fact:
-
-   >>> notify(LocalRoleSetEvent(faculty, 'waeup.PortalManager', 'bob',
-   ...                          granted=True))
-   >>> bob = root['app']['users']['bob']
-   >>> bob.getLocalRoles()
-   {'waeup.PortalManager': [<waeup.kofa...Faculty object at 0x...>]}
-
-When we delete the faculty from ZODB, also Bobs roles are modified:
-
-   >>> del root['app']['bobs_fac']
-   >>> bob.getLocalRoles()
-   {'waeup.local.Owner': [<waeup.kofa.authentication.Account object at 0x...>]}
-
-If one notifies the machinery of a local role removal for an object
-that cannot have local roles, this will cause no trouble:
-
-   >>> mycontext = None #object()
-   >>> notify(LocalRoleSetEvent(
-   ...   mycontext, 'waeup.PortalManager', 'bob', granted=False
-   ... )) is None
-   True
-
-When an account get deleted, also the local roles of the owner get
-removed. Let's setup a local role for `alice`:
-
-   >>> faculty = Faculty()
-   >>> root['app']['alice_fac'] = faculty
-   >>> role_manager = IPrincipalRoleManager(faculty)
-   >>> role_manager.assignRoleToPrincipal(
-   ...    'waeup.PortalManager', 'alice')
-   >>> notify(LocalRoleSetEvent(faculty, 'waeup.PortalManager', 'alice',
-   ...                          granted=True))
-
-The local role is set now:
-
-   >>> from zope.securitypolicy.interfaces import IPrincipalRoleMap
-   >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles()
-   [('waeup.PortalManager', 'alice', PermissionSetting: Allow)]
-
-But when we delete Alices account from ZODB:
-
-   >>> del root['app']['users']['alice']
-   >>> IPrincipalRoleMap(faculty).getPrincipalsAndRoles()
-   []
-
-the local role has gone and also the site roles have been removed:
-
-   >>> prm = IPrincipalRoleManager(root['app'])
-   >>> [x[0] for x in prm.getRolesForPrincipal('alice')
-   ...      if x[0].startswith('waeup.')]
-   []
 
 
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/batchprocessing.txt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/batchprocessing.txt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/batchprocessing.txt	(revision 11947)
@@ -58,365 +58,4 @@
 
 
-Batch processing faculties
-==========================
-
-Go to datacenter page:
-
-    >>> browser.open('http://localhost/app/datacenter')
-
-Prepare a CSV file for faculties (extended ascii values are accepted):
-
-    >>> open('faculties.csv', 'wb').write(
-    ... """code,title,title_prefix
-    ... FAC1,Faculty 1,faculty
-    ... FAC2,Faculty 2,institute
-    ... FAC3,Fäcülty 3,school
-    ... """)
-
-Upload the file:
-
-    >>> import cStringIO
-    >>> browser.getLink('Upload data').click()
-    >>> filecontents = cStringIO.StringIO(
-    ...   open('faculties.csv', 'rb').read())
-    >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'faculties.csv')
-    >>> browser.getControl(name='SUBMIT').click()
-
-Step 1: start batch processing:
-
-    >>> browser.getLink('Process data').click()
-    >>> button = lookup_submit_value(
-    ...   'select', 'faculties_zope.mgr.csv', browser)
-    >>> button.click()
-
-Step 2: select a processor and mode:
-
-    >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.displayOptions
-    ['AccessCodeBatch Processor', 'AccessCode Processor',
-    'Applicant Processor', 'ApplicantsContainer Processor',
-    'CertificateCourse Processor', 'Certificate Processor',
-    'Course Processor',
-    'CourseTicket Processor',
-    'Department Processor', 'Faculty Processor',
-    'Hostel Processor',
-    'StudentOnlinePayment Processor', 'Student Processor',
-    'StudentStudyCourse Processor (update only)',
-    'StudentStudyLevel Processor',
-    'User Processor',
-    'Verdict Processor (special processor, update only)']
-
-    >>> importerselect.getControl('Faculty Processor').selected = True
-
-    >>> modeselect = browser.getControl(name='mode')
-    >>> modeselect.options
-    ['create', 'update', 'remove']
-
-    >>> modeselect.getControl(value='create').selected = True
-    >>> browser.getControl('Proceed to step 3').click()
-
-Step 3: Fix headerlines
-
-We get informed that there are no problems with the current header:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...
-    Header fields OK
-    ...
-
-The submit button is enabled:
-
-    >>> browser.getControl('Perform import').disabled
-    False
-
-    >>> browser.getControl('Perform import').click()
-
-Step 4: See import results
-
-The import was successful:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...Successfully processed 3 rows...
-    ...Batch processing finished...
-    ...File:...faculties_zope.mgr.csv...
-
-We can grep the entries generated in logfile:
-
-    >>> browser.open('http://localhost/app/datacenter/logs')
-    >>> browser.getControl('Show', index=0).click()
-    >>> print browser.contents
-    <!DOCTYPE ...
-    ...<h1 class="kofa-content-label">Logfile datacenter.log</h1>...
-
-    >>> browser.getControl(name='query').value = "zope.mgr"
-    >>> browser.getControl('Search').click()
-    >>> 'zope.mgr - processed' in browser.contents
-    True
-
-
-Batch processing departments
-============================
-
-    >>> browser.open('http://localhost/app/datacenter')
-
-Prepare a CSV file for departments:
-
-    >>> open('departments.csv', 'wb').write(
-    ... """code,faculty_code,title,title_prefix
-    ... DEP1,FAC1,Department 1,department
-    ... DEP2,FAC2,Department 2,centre
-    ... """)
-
-Upload the file:
-
-    >>> import cStringIO
-    >>> browser.getLink('Upload data').click()
-    >>> filecontents = cStringIO.StringIO(
-    ...   open('departments.csv', 'rb').read())
-    >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'departments.csv')
-    >>> browser.getControl(name='SUBMIT').click()
-
-Step 1: start batch processing:
-
-    >>> browser.getLink('Process data').click()
-    >>> button = lookup_submit_value(
-    ...   'select', 'departments_zope.mgr.csv', browser)
-    >>> button.click()
-
-Step 2: select a processor and mode:
-
-    >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('Department Processor').selected = True
-    >>> modeselect = browser.getControl(name='mode')
-    >>> modeselect.getControl(value='create').selected = True
-    >>> browser.getControl('Proceed to step 3').click()
-
-Step 3: Fix headerlines
-
-We get informed that there are no problems with the current header:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...
-    Header fields OK
-    ...
-
-The submit button is enabled:
-
-    >>> browser.getControl('Perform import').disabled
-    False
-
-    >>> browser.getControl('Perform import').click()
-
-Step 4: See import results
-
-The import was successful:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...Successfully processed 2 rows...
-    ...Batch processing finished...
-    ...File:...departments_zope.mgr.csv...
-
-Batch processing courses
-========================
-
-    >>> browser.open('http://localhost/app/datacenter')
-
-Prepare a CSV file for courses:
-
-    >>> open('courses.csv', 'wb').write(
-    ... """code,faculty_code,department_code,title,level,passmark,credits,semester
-    ... CRS1,FAC1,DEP1,Course 1,100,40,2,1
-    ... CRS2,FAC1,DEP1,Course 2,100,40,2,2
-    ... """)
-
-Upload the file:
-
-    >>> import cStringIO
-    >>> browser.getLink('Upload data').click()
-    >>> filecontents = cStringIO.StringIO(
-    ...   open('courses.csv', 'rb').read())
-    >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'courses.csv')
-    >>> browser.getControl(name='SUBMIT').click()
-
-Step 1: start batch processing:
-
-    >>> browser.getLink('Process data').click()
-    >>> button = lookup_submit_value(
-    ...   'select', 'courses_zope.mgr.csv', browser)
-    >>> button.click()
-
-Step 2: select a processor and mode:
-
-    >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('Course Processor', index=1).selected = True
-    >>> modeselect = browser.getControl(name='mode')
-    >>> modeselect.getControl(value='create').selected = True
-    >>> browser.getControl('Proceed to step 3').click()
-
-Step 3: Fix headerlines
-
-We get informed that there are no problems with the current header:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...
-    Header fields OK
-    ...
-
-The submit button is enabled:
-
-    >>> browser.getControl('Perform import').disabled
-    False
-
-    >>> browser.getControl('Perform import').click()
-
-Step 4: See import results
-
-The import was successful:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...Successfully processed 2 rows...
-    ...Batch processing finished...
-    ...File:...courses_zope.mgr.csv...
-
-Batch processing certificates
-=============================
-
-    >>> browser.open('http://localhost/app/datacenter')
-
-Prepare a CSV file for certificates:
-
-    >>> open('certificates.csv', 'wb').write(
-    ... """code,faculty_code,department_code,title,study_mode,start_level,end_level,application_category
-    ... CERT1,FAC1,DEP1,Certificate 1,pg_ft,999,999,basic
-    ... CERT2,FAC1,DEP1,Certificate 2,ug_ft,200,300,cest
-    ... """)
-
-Upload the file:
-
-    >>> import cStringIO
-    >>> browser.getLink('Upload data').click()
-    >>> filecontents = cStringIO.StringIO(
-    ...   open('certificates.csv', 'rb').read())
-    >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'certificates.csv')
-    >>> browser.getControl(name='SUBMIT').click()
-
-Step 1: start batch processing:
-
-    >>> browser.getLink('Process data').click()
-    >>> button = lookup_submit_value(
-    ...   'select', 'certificates_zope.mgr.csv', browser)
-    >>> button.click()
-
-
-Step 2: select a processor and mode:
-
-    >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('Certificate Processor').selected = True
-    >>> modeselect = browser.getControl(name='mode')
-    >>> modeselect.getControl(value='create').selected = True
-    >>> browser.getControl('Proceed to step 3').click()
-
-Step 3: Fix headerlines
-
-We get informed that there are no problems with the current header:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...
-    Header fields OK
-    ...
-
-The submit button is enabled:
-
-    >>> browser.getControl('Perform import').disabled
-    False
-
-    >>> browser.getControl('Perform import').click()
-
-Step 4: See import results
-
-The import was successful:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...Successfully processed 2 rows...
-    ...Batch processing finished...
-    ...File:...certificates_zope.mgr.csv...
-
-Batch processing certificate courses
-====================================
-
-    >>> browser.open('http://localhost/app/datacenter')
-
-Prepare a CSV file for certificate courses:
-
-    >>> open('mycertcourses.csv', 'wb').write(
-    ... """course,faculty_code,department_code,certificate_code,level,mandatory
-    ... CRS1,FAC1,DEP1,CERT1,100,True
-    ... CRS2,FAC1,DEP1,CERT1,100,True
-    ... """)
-
-Upload the file:
-
-    >>> import cStringIO
-    >>> browser.getLink('Upload data').click()
-    >>> filecontents = cStringIO.StringIO(
-    ...   open('mycertcourses.csv', 'rb').read())
-    >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'mycertcourses.csv')
-    >>> browser.getControl(name='SUBMIT').click()
-
-Step 1: start batch processing:
-
-    >>> browser.getLink('Process data').click()
-    >>> button = lookup_submit_value(
-    ...   'select', 'mycertcourses_zope.mgr.csv', browser)
-    >>> button.click()
-
-Step 2: select a processor and mode:
-
-    >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('CertificateCourse Processor').selected = True
-    >>> modeselect = browser.getControl(name='mode')
-    >>> modeselect.getControl(value='create').selected = True
-    >>> browser.getControl('Proceed to step 3').click()
-
-Step 3: Fix headerlines
-
-We get informed that there are no problems with the current header:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...
-    Header fields OK
-    ...
-
-The submit button is enabled:
-
-    >>> browser.getControl('Perform import').disabled
-    False
-
-    >>> browser.getControl('Perform import').click()
-
-Step 4: See import results
-
-The import was successful:
-
-    >>> print browser.contents
-    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    ...Successfully processed 2 rows...
-    ...Batch processing finished...
-    ...File:...mycertcourses_zope.mgr.csv...
-
 Batch processing users
 ======================
@@ -488,5 +127,5 @@
    >>> henrik = getRootFolder()['app']['users']['henrik']
    >>> henrik.roles
-   ['waeup.PortalManager', 'waeup.AcademicsOfficer', 'waeup.ImportManager']
+   ['waeup.ProductsOfficer', 'waeup.PortalManager', 'waeup.ImportManager']
 
 Pending files
@@ -502,10 +141,10 @@
     >>> browser.open('http://localhost/app/datacenter')
 
-Prepare a CSV file for faculties:
-
-    >>> open('newfaculties.csv', 'wb').write(
-    ... """code,title,title_prefix
-    ... FAC1,Faculty 1,faculty
-    ... FAC4,Faculty 4,school
+Prepare a CSV file for users:
+
+    >>> open('newusers.csv', 'wb').write(
+    ... """name,title,public_name,email,phone,roles
+    ... isouaba,Issoufou Abba Moussa,Chief Developer,isouaba@abc.de,+49-234-567,[]
+    ... henrik,Henrik Bettermann,Admin,henrik@abc.de,+49-234-567,"['waeup.PortalManager', 'waeup.ImportManager']"
     ... """)
 
@@ -515,7 +154,7 @@
     >>> browser.getLink('Upload data').click()
     >>> filecontents = cStringIO.StringIO(
-    ...   open('newfaculties.csv', 'rb').read())
+    ...   open('newusers.csv', 'rb').read())
     >>> filewidget = browser.getControl(name='uploadfile:file')
-    >>> filewidget.add_file(filecontents, 'text/plain', 'newfaculties.csv')
+    >>> filewidget.add_file(filecontents, 'text/plain', 'newusers.csv')
     >>> browser.getControl(name='SUBMIT').click()
 
@@ -531,5 +170,5 @@
     >>> browser.getLink('Process data').click()
     >>> button = lookup_submit_value(
-    ...   'select', 'newfaculties_zope.mgr.csv', browser)
+    ...   'select', 'newusers_zope.mgr.csv', browser)
     >>> button.click()
 
@@ -537,5 +176,5 @@
 
     >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('Faculty Processor').selected = True
+    >>> importerselect.getControl('User Processor').selected = True
     >>> modeselect = browser.getControl(name='mode')
     >>> modeselect.getControl(value='create').selected = True
@@ -561,13 +200,13 @@
 ``finished`` dirs:
 
-    >>> pending_file = dc_path + '/newfaculties_zope.mgr.create.pending.csv'
+    >>> pending_file = dc_path + '/newusers_zope.mgr.create.pending.csv'
     >>> print open(pending_file).read()
-    title_prefix,code,title,--ERRORS--
-    faculty,FAC1,Faculty 1,This object already exists. Skipping.
-
-    >>> finished_file = dc_path + '/finished/newfaculties_zope.mgr.create.finished.csv'
+    name,roles,title,public_name,phone,email,--ERRORS--
+    henrik,"['waeup.PortalManager', 'waeup.ImportManager']",Henrik Bettermann,Admin,+49-234-567,henrik@abc.de,This object already exists. Skipping.
+
+    >>> finished_file = dc_path + '/finished/newusers_zope.mgr.create.finished.csv'
     >>> print open(finished_file).read()
-    title_prefix,code,title
-    school,FAC4,Faculty 4
+    name,roles,title,public_name,phone,email
+    isouaba,[],Issoufou Abba Moussa,Chief Developer,+49-234-567,isouaba@abc.de
 
 The finished-file contains the dataset we could import, while the
@@ -583,7 +222,7 @@
 import this way:
 
-    >>> open(dc_path + '/newfaculties_zope.mgr.create.pending.csv', 'wb').write(
-    ... """title_prefix,--IGNORE--,code,title
-    ... faculty,FAC5,Faculty 5
+    >>> open(dc_path + '/newusers_zope.mgr.create.pending.csv', 'wb').write(
+    ... """name,title,public_name,email,phone,roles
+    ... gbenga,Jason Bamidele,Chief Developer,gbenga@abc.de,+49-234-567,[]
     ... """)
 
@@ -593,5 +232,5 @@
     >>> browser.getLink('Process data').click()
     >>> button = lookup_submit_value(
-    ...   'select', 'newfaculties_zope.mgr.create.pending.csv', browser)
+    ...   'select', 'newusers_zope.mgr.create.pending.csv', browser)
     >>> button.click()
 
@@ -599,5 +238,5 @@
 
     >>> importerselect = browser.getControl(name='importer')
-    >>> importerselect.getControl('Faculty Processor').selected = True
+    >>> importerselect.getControl('User Processor').selected = True
     >>> modeselect = browser.getControl(name='mode')
     >>> modeselect.getControl(value='create').selected = True
@@ -626,6 +265,5 @@
 
     >>> sorted(os.listdir(dc_path + '/finished'))
-    ['certificates_zope.mgr.create.finished.csv', ...,
-    'users_zope.mgr.create.finished.csv', 'users_zope.mgr.csv']
+    ['newusers_zope.mgr.create.finished.csv', 'newusers_zope.mgr.csv', 'users_zope.mgr.create.finished.csv', 'users_zope.mgr.csv']
 
 Processed (finished) Files
@@ -633,5 +271,5 @@
 
     >>> browser.open('http://localhost/app/datacenter/processed')
-    >>> 'download?filename=finished/certificates_zope.mgr.create.finished.csv' in browser.contents
+    >>> 'download?filename=finished/users_zope.mgr.create.finished.csv' in browser.contents
     True
 
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/breadcrumbs.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/breadcrumbs.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/breadcrumbs.py	(revision 11947)
@@ -28,7 +28,5 @@
 from waeup.kofa.browser.interfaces import (
     IBreadcrumb, IBreadcrumbIgnorable, IBreadcrumbContainer, IKofaObject,
-    IUniversity, IFacultiesContainer, IUsersContainer, IDataCenter, IFaculty,
-    IDepartment, ICourse, ICertificate, ICoursesContainer, ICertificateCourse,
-    ICertificatesContainer
+    IUniversity, IUsersContainer, IDataCenter,
     )
 from waeup.kofa.reports import IReportsContainer
@@ -114,10 +112,4 @@
         return (self.context, 'administration')
 
-class FacultiesContainerBreadcrumb(Breadcrumb):
-    """A breadcrumb for faculty containers.
-    """
-    grok.context(IFacultiesContainer)
-    title = _(u'Academics')
-
 class AdministrationBreadcrumb(Breadcrumb):
     """A breadcrumb for administration areas of University instances.
@@ -174,48 +166,4 @@
     title = _(u'Student Data Exports')
     target = None
-
-class FacultyBreadcrumb(Breadcrumb):
-    """A breadcrumb for faculties.
-    """
-    grok.context(IFaculty)
-
-    @property
-    def title(self):
-        return self.context.longtitle
-
-class DepartmentBreadcrumb(FacultyBreadcrumb):
-    """A breadcrumb for departments.
-    """
-    grok.context(IDepartment)
-
-class CourseBreadcrumb(FacultyBreadcrumb):
-    """A breadcrumb for courses.
-    """
-    grok.context(ICourse)
-
-class CertificateBreadcrumb(FacultyBreadcrumb):
-    """A breadcrumb for certificates.
-    """
-    grok.context(ICertificate)
-
-class CoursesContainerBreadcrumb(Breadcrumb):
-    """ We don't want course container breadcrumbs.
-    """
-    grok.context(ICoursesContainer)
-    grok.implements(IBreadcrumbIgnorable)
-
-class CertificatesContainerBreadcrumb(Breadcrumb):
-    """ We don't want course container breadcrumbs.
-    """
-    grok.context(ICertificatesContainer)
-    grok.implements(IBreadcrumbIgnorable)
-
-class CertificateCourseBreadcrumb(Breadcrumb):
-    """ We don't want course container breadcrumbs.
-    """
-    grok.context(ICertificateCourse)
-    @property
-    def title(self):
-        return self.context.longtitle
 
 def getBreadcrumb(obj, viewname=None):
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/browser.txt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/browser.txt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/browser.txt	(revision 11947)
@@ -148,19 +148,4 @@
 
   >>> browser.open('http://localhost/myuniversity//@@change_language?lang=en')
-
-We can export a university as XML::
-
-  >>> browser.open('http://localhost/myuniversity/export.xml')
-  >>> print browser.contents
-  <?xml version="1.0" encoding="utf-8" ?>
-  <pickle>
-  ...
-  </pickle>
-
-  >>> print browser.headers
-  Status: 200 Ok
-  Content-Length: ...
-  Content-Type: text/xml; charset=UTF-8
-  X-Powered-By: Zope (www.zope.org), Python (www.python.org)
 
 
@@ -204,11 +189,11 @@
   >>> print root['myuniversity']['users']['bob'].roles
   []
-  >>> root['myuniversity']['users']['bob'].roles = ['waeup.ApplicationsOfficer']
+  >>> root['myuniversity']['users']['bob'].roles = ['waeup.UsersManager']
   >>> print root['myuniversity']['users']['bob'].roles
-  ['waeup.ApplicationsOfficer']
+  ['waeup.UsersManager']
   >>> browser.open('http://localhost/myuniversity/users')
   >>> print browser.contents
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td nowrap>Applications Officer (view only) <br /></td>
+  ...<td nowrap>Users Manager <br /></td>
   ...
 
@@ -263,914 +248,4 @@
 
 
-
-Faculties
-=========
-
-Faculties are stored in a special container of `IUniversity`
-instances. The container is called ``faculties`` and provides an
-add-form to add new faculties::
-
-  >>> browser.open('http://localhost/myuniversity/faculties/manage')
-  >>> browser.getControl('Add faculty').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...*...
-  ...<span>Name of faculty</span>:
-  ...
-  >>> browser.getControl('Cancel').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/add')
-
-We fill in a new name for our new faculty::
-
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'TestFac'
-
-Furthermore we add a prefix and a code (kind of abbreviation):
-
-  >>> browser.getControl(name='form.code').value = 'TF'
-
-Finally we click on 'Add Faculty' to add the new thing::
-
-  >>> browser.getControl('Add faculty').click()
-
-We can view a faculty by browsing a URL like this::
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF')
-
-Afterwards, the faculty should be visible:
-
-  >>> browser.open('http://localhost/myuniversity/faculties')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  ...<h1 class="kofa-content-label">Academic Section</h1>
-  ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td>
-  ...
-
-We can 'visit' each faculty by clicking on the appropriate link:
-
-  >>> browser.getLink('TF').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Faculty of TestFac (TF)...
-  ...
-
-If we add the same faculty twice, an error message will occur:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/add')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'TestFac'
-  >>> browser.getControl(name='form.code').value = 'TF'
-  >>> browser.getControl('Add faculty').click()
-  >>> 'The faculty code chosen already exists.' in browser.contents
-  True
-
-Modifying faculties
--------------------
-
-A faculty can directly be reached by its code:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF')
-
-We can change the settings for a faculty by clicking on the
-provided 'Manage  faculty' button:
-
-  >>> browser.getLink('Manage faculty').click()
-
-Let's set a new title and save the form:
-
-  >>> browser.getControl(name='form.title').value = "My renamed faculty"
-  >>> browser.getControl(name='form.actions.save').click()
-
-Our faculty was indeed renamed to ``My renamed faculty``:
-
-  >>> browser.open('http://localhost/myuniversity/faculties')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<h1 class="kofa-content-label">Academic Section</h1>
-  ...<td> <a href="http://localhost/myuniversity/faculties/TF"> <span>TF</span></a></td>
-  ...<td>Faculty of My renamed faculty (TF)</td>
-  ...
-
-We can grant local roles:
-
-  >>> root['myuniversity']['users'].addUser('bob', 'secret',title='Bob',
-  ...                               description='A sample user')
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> browser.getControl(name="user").value = ['bob']
-  >>> browser.getControl(
-  ...     name="local_role").value = ['waeup.local.DepartmentManager']
-  >>> browser.getControl("Add local role").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>bob</td>
-  ...
-
-On the portal user page the new local role is displayed:
-
-  >>> browser.getLink("Portal Users").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>Department Manager:...
-  ...
-
-The local role can be removed again:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...No local role selected...
-  ...
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> ctrl.getControl(value='bob|waeup.local.DepartmentManager').selected = True
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Local role successfully removed...
-  ...
-
-Deleting faculties
-------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/manage')
-  >>> browser.getControl('Cancel').click()
-  >>> print browser.url
-  http://localhost/myuniversity/faculties
-  >>> browser.getLink('Manage academic section').click()
-  >>> browser.getControl('Add faculty').click()
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Second Faculty'
-  >>> browser.getControl(name='form.code').value = 'TF2'
-  >>> browser.getControl('Add faculty').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/manage')
-  >>> browser.getControl("Remove selected", index=0).click()
-  >>> 'No item selected' in browser.contents
-  True
-  >>> browser.open('http://localhost/myuniversity/faculties/manage')
-  >>> ctrl = browser.getControl(name='val_id')
-  >>> ctrl.getControl(value='TF2').selected = True
-  >>> browser.getControl("Remove selected", index=0).click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Successfully removed:...
-  ...
-
-Departments
-===========
-
-Adding departments
-------------------
-
-Departments are stored in :class:`IFaculty` instances with their code
-as key. Faculties therefore are also department containers. Faculties
-provides an add-form to add new departments:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/add')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...*</span>
-  ...<span>Name of department</span>:
-  ...
-  >>> browser.getControl('Cancel').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/add')
-
-We fill in a new name for our new department:
-
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'TestDept'
-
-Furthermore we add a code (kind of abbreviation):
-
-  >>> browser.getControl(name='form.code').value = 'TD'
-
-Finally we click on 'Add Department' to add the new thing::
-
-  >>> browser.getControl('Add department').click()
-
-If we try to register a department under the same code twice we will
-get an error:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/add')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another TestDept with same code'
-  >>> browser.getControl(name='form.code').value = 'TD'
-  >>> browser.getControl('Add department').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...The code chosen already exists in this faculty...
-  ...
-
-We can view a department by browsing a URL like this::
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD')
-
-Afterwards, the department should be visible::
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<h1 class="kofa-content-label">Departments</h1>
-  ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td>
-  ...<td>Department of TestDept (TD)</td>
-  ...
-
-
-Modifying departments
----------------------
-
-We can change the settings for a department by clicking on the
-provided 'Edit department' button:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD')
-  >>> browser.getLink('Manage department').click()
-
-Let's set a new title and save the form:
-
-  >>> browser.getControl(name='form.title').value = "My test dept"
-  >>> browser.getControl(name='form.actions.save').click()
-
-Clicking 'Save' we will stay on the settings form. So we can change
-the department again.
-
-  >>> browser.getControl(name='form.title').value = "My renamed dept"
-  >>> ctrl = browser.getControl("Save")
-  >>> ctrl.click()
-
-
-Our department was indeed renamed to ``My renamed dept``:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  ...<h1 class="kofa-content-label">Departments</h1>
-  ...<td> <a href="http://localhost/myuniversity/faculties/TF/TD"> <span>TD</span></a></td>
-  ...<td>Department of My renamed dept (TD)</td>
-  ...
-
-We can grant local roles:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage')
-  >>> browser.getControl(name="user").value = ['bob']
-  >>> browser.getControl(
-  ...     name="local_role").value = ['waeup.local.DepartmentManager']
-  >>> browser.getControl("Add local role").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>bob</td>
-  ...
-
-The local role can be removed again:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...No local role selected...
-  ...
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> ctrl.getControl(
-  ...     value='bob|waeup.local.DepartmentManager').selected = True
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Local role successfully removed...
-  ...
-
-Deleting departments
---------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> browser.getControl('Cancel', index=0).click()
-  >>> print browser.url
-  http://localhost/myuniversity/faculties/TF
-  >>> browser.getLink('Manage faculty').click()
-  >>> browser.getControl('Add department').click()
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Second Department'
-  >>> browser.getControl(name='form.code').value = 'TD2'
-  >>> browser.getControl('Add department').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> browser.getControl("Remove selected", index=0).click()
-  >>> 'No item selected' in browser.contents
-  True
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> ctrl = browser.getControl(name='val_id')
-  >>> ctrl.getControl(value='TD2').selected = True
-  >>> browser.getControl("Remove selected", index=0).click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Successfully removed:...
-  ...
-
-
-Courses
-=======
-
-Once we have a department, we can add courses.
-
-Adding courses
---------------
-
-Courses are stored in :class:`ICoursesContainer` instances with their
-code as key. CoursesContainers are normally availabe as `course`
-attribute of :class:`waeup.kofa.university.department.Department`
-instances.
-
-To ease the life of users we do not require to browse the
-coursescontainers (which have a rather flat user interface), but
-provide adding of courses in department views.
-
-Each department provides a ``Add course`` action button near top.
-
-Departments provide an add-form to add new courses:
-
-  >>> dept_url = 'http://localhost/myuniversity/faculties/TF/TD'
-  >>> browser.open(dept_url + '/manage')
-  >>> browser.getControl('Add course').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...*</span>
-  ...<span>Title of course</span>:
-  ...
-
-We fill in a name for our new course:
-
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'My Course 1'
-
-Furthermore we add a code (kind of abbreviation):
-
-  >>> browser.getControl(name='form.code').value = 'COURSE1'
-
-This course will take place in the the first semester, so we set the
-`semester` value to 1:
-
-  >>> ctrl = browser.getControl(name='form.semester')
-  >>> ctrl.options
-  ['1', '2', '3', '9']
-
-  >>> ctrl.displayOptions
-  ['1st Semester', '2nd Semester', 'Combined', 'N/A']
-
-  >>> ctrl.value = ['1']
-
-Finally, we create the course:
-
-  >>> browser.getControl('Add course').click()
-
-If we try to register a course under the same code twice we will
-get an error:
-
-  >>> browser.open(dept_url + '/addcourse')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another course with same code'
-  >>> browser.getControl(name='form.code').value = 'COURSE1'
-  >>> browser.getControl('Add course').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...A course with same code already exists:...
-  ...
-
-Our course will be linked under the code on the department page:
-
-  >>> browser.open(dept_url)
-  >>> browser.getLink('COURSE1').click()
-  >>> browser.url
-  'http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1'
-
-Before we really add a course we can cancel the action and will be
-redirected to the department page:
-
-  >>> browser.open(dept_url + '/addcourse')
-  >>> browser.getControl('Cancel').click()
-  >>> browser.url
-  'http://localhost/myuniversity/faculties/TF/TD'
-
-
-Modifying courses
------------------
-
-We can change the settings for a course by clicking on the provided
-'Edit settings' link:
-
-  >>> browser.open(dept_url + '/courses/COURSE1')
-  >>> browser.getLink('Edit course').click()
-
-When modifying a course, we cannot change the code any more:
-
-  >>> browser.getControl(name='form.code')
-  Traceback (most recent call last):
-  ...
-  LookupError: name 'form.code'
-
-Let's set a new title and save the form:
-
-  >>> browser.getControl(name='form.title').value = "My test course"
-  >>> browser.getControl(name='form.actions.save').click()
-
-Clicking 'Save' we will stay on the settings form. So we can change
-the course again. If we click ``Cancel`` nothing will be
-changed:
-
-  >>> browser.getControl(name='form.title').value = "Blah"
-  >>> browser.getControl('Cancel').click()
-
-Our course was not renamed to ``Blah``:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>My test course</td>...
-  ...
-
-Searching courses
------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/search')
-  >>> browser.getControl(name='query').value = "My test course"
-  >>> browser.getControl('Search').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...faculties/TF/TD/courses/COURSE1">COURSE1</a>
-  ...
-
-  >>> browser.open('http://localhost/myuniversity/faculties/search')
-  >>> browser.getControl(name='query').value = "COURSE1"
-  >>> browser.getControl('Search').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...faculties/TF/TD/courses/COURSE1">COURSE1</a>
-  ...
-
-  >>> browser.getControl(name='query').value = "Nonsense"
-  >>> browser.getControl('Search').click()
-  >>> 'Search Results' in browser.contents
-  False
-  >>> '<div class="alert alert-warning">No object found.</div>' in browser.contents
-  True
-
-  >>> browser.getControl(name='query').value = ""
-  >>> browser.getControl('Search').click()
-  >>> 'Empty search string' in browser.contents
-  True
-
-We can grant local roles:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
-  >>> browser.getControl(name="user").value = ['bob']
-  >>> browser.getControl(
-  ...     name="local_role").value = ['waeup.local.Lecturer']
-  >>> browser.getControl("Add local role").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>bob</td>
-  ...
-
-On the portal user page the new local role is displayed:
-
-  >>> browser.getLink("Portal Users").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>Lecturer:...
-  ...
-
-The local role can be removed again:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...No local role selected...
-  ...
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD/courses/COURSE1/manage')
-  >>> ctrl = browser.getControl(name='role_id')
-  >>> ctrl.getControl(value='bob|waeup.local.Lecturer').selected = True
-  >>> browser.getControl("Remove selected local roles").click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Local role successfully removed...
-  ...
-
-Deleting courses
-----------------
-
-We can delete courses by browsing the manage page of the containing
-department and checking the appropriate select box and clicking the
-´´Remove selected´´ button.
-
-  >>> browser.open(
-  ...     'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-2')
-  >>> 'My test course' in browser.contents
-  True
-
-  >>> browser.getControl('Cancel', index=0).click()
-  >>> browser.getLink('Manage department').click()
-  >>> browser.getControl('Remove selected courses').click()
-  >>> 'No item selected' in browser.contents
-  True
-
-  >>> browser.getControl(
-  ...    name='val_id').getControl(value='COURSE1').selected = True
-  >>> browser.getControl('Remove selected courses').click()
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD')
-  >>> 'My renamed course' in browser.contents
-  False
-
-
-Deleting departments with courses
----------------------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> browser.getControl('Cancel', index=0).click()
-  >>> browser.getLink('Manage faculty').click()
-  >>> browser.getControl('Add department').click()
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Third Department'
-  >>> browser.getControl(name='form.code').value = 'TD3'
-  >>> browser.getControl('Add department').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD3/manage')
-  >>> browser.getControl('Add course').click()
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'My Course 5'
-  >>> browser.getControl(name='form.code').value = 'COURSE5'
-  >>> browser.getControl('Add course').click()
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/manage')
-  >>> ctrl = browser.getControl(name='val_id')
-  >>> ctrl.getControl(value='TD3').selected = True
-  >>> browser.getControl("Remove selected", index=0).click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...Successfully removed:...
-  ...
-
-Certificates
-============
-
-Once we have a department, we can add also certificats.
-
-Adding certificates
--------------------
-
-Certificates are stored in :class:`ICertificatesContainer` instances
-with their code as key. CertificatesContainers are normally availabe as
-`certificates` attribute of
-:class:`waeup.kofa.university.department.Department` instances.
-
-To ease the life of users we do not require to browse the
-certificatescontainers (which have in fact no user interface), but
-provide adding of certificates in department views.
-
-Each department provides a ``Add certificate`` action button near top.
-
-Departments provide an add-form to add new certificates:
-
-  >>> dept_url = 'http://localhost/myuniversity/faculties/TF/TD'
-  >>> browser.open(dept_url + '/manage')
-  >>> browser.getControl('Add certificate').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...*</span>
-  ...<span>Title</span>:
-  ...
-
-We fill in a name for our new cert:
-
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'My Certificate 1'
-
-Furthermore we add a code (kind of abbreviation):
-
-  >>> browser.getControl(name='form.code').value = 'CERT1'
-
-Set the remaining required fields:
-
-  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
-  >>> browser.getControl(name='form.start_level').value = ['100']
-  >>> browser.getControl(name='form.end_level').value = ['400']
-  >>> browser.getControl(name='form.application_category').value = ['basic']
-
-Finally, we create the certificate:
-
-  >>> browser.getControl('Add certificate').click()
-
-If we try to register a certificate under the same code twice we will
-get an error:
-
-  >>> browser.open(dept_url + '/addcertificate')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another cert with same code'
-  >>> browser.getControl(name='form.code').value = 'CERT1'
-  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
-  >>> browser.getControl(name='form.start_level').value = ['100']
-  >>> browser.getControl(name='form.end_level').value = ['400']
-  >>> browser.getControl(name='form.application_category').value = ['basic']
-
-  >>> browser.getControl('Add certificate').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...A certificate with same code already exists:...
-  ...
-
-Our certificate will be linked under the code on the department page:
-
-  >>> browser.open(dept_url)
-  >>> browser.getLink('CERT1').click()
-  >>> browser.url
-  'http://localhost/myuniversity/faculties/TF/TD/certificates/CERT1'
-
-Before we really add a certificate we can cancel the action and will be
-redirected to the department page:
-
-  >>> browser.open(dept_url + '/addcertificate')
-  >>> browser.getControl('Cancel').click()
-  >>> browser.url
-  'http://localhost/myuniversity/faculties/TF/TD'
-
-
-Modifying certificates
-----------------------
-
-We can change the settings for a cert by clicking on the provided
-'Edit certificate' link:
-
-  >>> browser.open(dept_url + '/certificates/CERT1')
-  >>> browser.getLink('Manage certificate').click()
-
-When modifying a certificate, we cannot change the code any more:
-
-  >>> browser.getControl(name='form.code')
-  Traceback (most recent call last):
-  ...
-  LookupError: name 'form.code'
-
-Let's set a new title and save the form:
-
-  >>> browser.getControl(name='form.title').value = "My test cert"
-  >>> browser.getControl(name='form.actions.save').click()
-
-Clicking 'Save' we will stay on the settings form. So we can change
-the cert again.
-
-  >>> browser.getControl(name='form.title').value = "My renamed cert"
-  >>> ctrl = browser.getControl("Save",index=0)
-  >>> ctrl.click()
-
-If we go to the settings page and click ``Cancel`` nothing will be
-changed:
-
-  >>> browser.getControl(name='form.title').value = "Blah"
-  >>> browser.getControl('Cancel',index=0).click()
-
-Our certificate was indeed renamed to ``My renamed cert`` and not to
-``Blah``:
-
-  >>> browser.open('http://localhost/myuniversity/faculties/TF/TD')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...<td>My renamed cert</td>...
-  ...
-
-Searching certificates
-----------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/search')
-  >>> browser.getControl(name='query').value = "My renamed cert"
-  >>> browser.getControl('Search').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...faculties/TF/TD/certificates/CERT1">CERT1</a>
-  ...
-
-  >>> browser.open('http://localhost/myuniversity/faculties/search')
-  >>> browser.getControl(name='query').value = "CERT1"
-  >>> browser.getControl('Search').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...faculties/TF/TD/certificates/CERT1">CERT1</a>
-  ...
-
-Deleting certificates
----------------------
-
-We can delete certificates by browsing the manage page of the
-containing department and checking the appropriate select box and
-clicking the ´´Remove selected´´ button.
-
-  >>> browser.open(
-  ...    'http://localhost/myuniversity/faculties/TF/TD/@@manage#tab-3')
-  >>> 'My renamed cert' in browser.contents
-  True
-
-  >>> browser.getControl('Remove selected certificates').click()
-  >>> 'No item selected' in browser.contents
-  True
-
-  >>> browser.getControl(name='val_id').getControl(
-  ...    value='CERT1').selected = True
-  >>> browser.getControl('Remove selected certificates').click()
-  >>> 'My renamed cert' in browser.contents
-  False
-
-
-CertificateCourses
-==================
-
-Once we have a certificate, we can add also certificate courses. These
-are referrers of courses with some extra data.
-
-Before we can work with certificate courses, we need some certificates
-and courses to be available.
-
-  >>> browser.open(dept_url + '/addcourse')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another course with same code'
-  >>> browser.getControl(name='form.code').value = 'COURSE1'
-  >>> browser.getControl(name='form.title').value = 'Course 1'
-  >>> browser.getControl('Add course').click()
-
-  >>> browser.open(dept_url + '/addcourse')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another course with same code'
-  >>> browser.getControl(name='form.code').value = 'COURSE2'
-  >>> browser.getControl(name='form.title').value = 'Course 2'
-  >>> browser.getControl('Add course').click()
-
-  >>> browser.open(dept_url + '/addcertificate')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another cert with same code'
-  >>> browser.getControl(name='form.code').value = 'CERT1'
-  >>> browser.getControl(name='form.title').value = 'Certificate 1'
-  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
-  >>> browser.getControl(name='form.start_level').value = ['100']
-  >>> browser.getControl(name='form.end_level').value = ['400']
-  >>> browser.getControl(name='form.application_category').value = ['basic']
-  >>> browser.getControl('Add certificate').click()
-
-  >>> browser.open(dept_url + '/addcertificate')
-  >>> ctrl = browser.getControl(name='form.title')
-  >>> ctrl.value = 'Another cert with same code'
-  >>> browser.getControl(name='form.code').value = 'CERT2'
-  >>> browser.getControl(name='form.title').value = 'Certificate 2'
-  >>> browser.getControl(name='form.study_mode').value = ['ug_ft']
-  >>> browser.getControl(name='form.start_level').value = ['100']
-  >>> browser.getControl(name='form.end_level').value = ['400']
-  >>> browser.getControl(name='form.application_category').value = ['basic']
-  >>> browser.getControl('Add certificate').click()
-
-
-Adding certificatecourses
--------------------------
-
-Certcourses are stored in :class:`ICertificate` instances
-with their code as key.
-
-Each certificate provides a ``Add certificate course`` action button near top.
-
-Certificates provide an add-form to add new certcourses:
-
-  >>> cert_url = dept_url + '/certificates/CERT1'
-  >>> browser.open(cert_url + '/manage')
-  >>> browser.getControl('Add certificate course').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...*</span>
-  ...<span>Level</span>:
-  ...
-
-In the add-form we will get a list of available courses to select
-from. This list will contain all courses stored in the site, not only
-the ones from local department:
-
-  >>> ctrl = browser.getControl(name='form.course')
-  >>> ctrl.displayOptions
-  ['--', 'COURSE1 - Course 1', 'COURSE2 - Course 2']
-
-We select the first course and create our certificatecourse:
-
-  >>> ctrl.getControl('COURSE1').selected = True
-  >>> browser.getControl(name='form.level').value = ['100']
-  >>> browser.getControl('Add certificate course').click()
-
-Our certificatecourse will be linked on the parent certificate page:
-
-  >>> browser.open(cert_url)
-  >>> browser.getLink('COURSE1_100').click()
-  >>> browser.url
-  'http://localhost/my...sity/faculties/TF/TD/certificates/CERT1/COURSE1_100'
-
-We can't add the same certificatecourse twice:
-
-  >>> cert_url = dept_url + '/certificates/CERT1'
-  >>> browser.open(cert_url + '/manage')
-  >>> browser.getControl('Add certificate course').click()
-  >>> ctrl = browser.getControl(name='form.course')
-  >>> ctrl.getControl('COURSE1').selected = True
-  >>> browser.getControl(name='form.level').value = ['100']
-  >>> browser.getControl('Add certificate course').click()
-  >>> 'The chosen certificate course is already' in browser.contents
-  True
-
-When we started to add a new certificatecourse, we can also cancel the
-process before submitting. This will bring us back to the certificate
-page:
-
-  >>> browser.open(cert_url + '/addcertificatecourse')
-  >>> browser.getControl('Cancel').click()
-  >>> browser.url
-  'http://localhost/myuniversity/faculties/TF/TD/certificates/CERT1'
-
-
-Modifying certificatecourses
-----------------------------
-
-We can change the settings for a certcourse by clicking on the
-provided 'Edit certificate course' link:
-
-  >>> browser.open(cert_url + '/COURSE1_100')
-  >>> browser.getLink('Edit certificate course').click()
-
-If we just click 'Save and return' nothing will change:
-
-  >>> browser.getControl("Save and return").click()
-  >>> browser.getLink('COURSE1_100').click()
-  >>> browser.url
-  'http://localhost/myun.../TF/TD/certificates/CERT1/COURSE1_100'
-
-Let's set a new level (it was 100 before) and save the form. This will
-bring us to the certificate index page afterwards:
-
-  >>> browser.open(cert_url + '/COURSE1_100/manage')
-  >>> browser.getControl(name='form.level').value = ['200']
-  >>> browser.getControl("Save and return").click()
-
-As we changed the level, also the URL will change:
-
-  >>> browser.getLink('COURSE1_200').click()
-  >>> browser.url
-  'http://localhost/myun.../TF/TD/certificates/CERT1/COURSE1_200'
-
-If we go to the settings page and click ``Cancel`` nothing will be
-changed:
-
-  >>> browser.getLink('Edit certificate course').click()
-  >>> browser.getControl(name='form.level').value = ['400']
-  >>> browser.getControl('Cancel').click()
-
-Our certcourse provides a new level of 200 and not 400:
-
-  >>> browser.open(cert_url + '/COURSE1_200')
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  ...<td>Level:</td>
-  ...<td>200 (Year 2)</td>
-  ...
-
-Searching certificatecourses
-----------------------------
-
-  >>> browser.open('http://localhost/myuniversity/faculties/search')
-  >>> browser.getControl(name='query').value = "COURSE1"
-  >>> browser.getControl('Search').click()
-  >>> print browser.contents
-  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
-  ...faculties/TF/TD/certificates/CERT1/COURSE1_200">COURSE1</a>
-  ...
-
-  >>> browser.getControl(name='query').value = "*"
-  >>> browser.getControl('Search').click()
-  >>> 'Search string not allowed' in browser.contents
-  True
-
-Deleting certificatecourses
----------------------------
-
-We can delete certcourses by browsing the containing certificate manage page:
-
-  >>> browser.open(cert_url + '/manage#tab-2')
-  >>> 'COURSE1_200</a>' in browser.contents
-  True
-  >>> browser.getControl('Remove selected certificate courses').click()
-  >>> 'No item selected' in browser.contents
-  True
-  >>> browser.getControl(name='val_id').getControl(
-  ...    value='COURSE1_200').selected = True
-  >>> browser.getControl('Remove selected certificate courses').click()
-  >>> 'Successfully removed: COURSE1_200' in browser.contents
-  True
-
-  >>> 'COURSE1_200</a>' in browser.contents
-  False
-
-
-
 Data Center
 ===========
@@ -1276,65 +351,4 @@
   ['deleted', 'finished', 'logs', 'myfaculties_zope.mgr.csv', 'unfinished']
 
-We create and upload also a CSV file containing departments:
-
-  >>> open('departments.csv', 'wb').write(
-  ... """code,title,title_prefix,faculty_code
-  ... LIT,Literature,department,FA
-  ... SOC,Sociology,department,FA
-  ... PHY,Physics,department,FS
-  ... INF,Informatics,department,FS
-  ... MAT,Math,department,FS
-  ... """)
-
-  >>> browser.open('http://localhost/myuniversity/datacenter/upload')
-  >>> browser.getControl(name='uploadfile:file').add_file(
-  ...   cStringIO.StringIO(open('departments.csv', 'rb').read()),
-  ...   'text/plain', 'mydepartments.csv')
-  >>> browser.getControl(name='SUBMIT').click()
-
-We create and upload also a CSV file containing courses:
-
-  >>> open('courses.csv', 'wb').write(
-  ... """code,level,title,passmark,credits,semester,faculty,department
-  ... LI1,,Introduction to Literature I,40,2,1,FA,LIT
-  ... LI2,,Introduction to Literature II,40,2,2,FA,LIT
-  ... AN1,000,Analysis I,40,2,1,FS,MAT
-  ... AN2,000,Analysis II,40,2,2,FS,MAT
-  ... """)
-
-  >>> browser.open('http://localhost/myuniversity/datacenter/upload')
-  >>> browser.getControl(name='uploadfile:file').add_file(
-  ...   cStringIO.StringIO(open('courses.csv', 'rb').read()),
-  ...   'text/plain', 'mycourses.csv')
-  >>> browser.getControl(name='SUBMIT').click()
-
-We create and upload also a CSV file containing certificates:
-
-  >>> open('certificates.csv', 'wb').write(
-  ... """code,title,faculty_code,department_code,study_mode,end_level,m_prefix,start_level,application_category
-  ... LBA,BACHELOR OF LITERATURE,FA,LIT,UG,ug_ft,500,LIT,100,basic
-  ... LMA,MASTER OF LITERATURE,FA,LIT,UG,ug_pt,500,LIT,100,cest
-  ... DME,DIPLOMA OF MATH,FS,MAT,DP,dp_ft,200,DME,100,cest
-  ... """)
-
-  >>> browser.open('http://localhost/myuniversity/datacenter/upload')
-  >>> browser.getControl(name='uploadfile:file').add_file(
-  ...   cStringIO.StringIO(open('certificates.csv', 'rb').read()),
-  ...   'text/plain', 'mycertificates.csv')
-  >>> browser.getControl(name='SUBMIT').click()
-
-We create and upload also a CSV file containing certificate courses:
-
-  >>> open('certcourses.csv', 'wb').write(
-  ... """code,faculty_code,department_code,certificate_code,level,mandatory
-  ... LI1,FA,LIT,LBA,100,True
-  ... LI2,FA,LIT,LBA,200,True
-  ... """)
-
-  >>> browser.open('http://localhost/myuniversity/datacenter/upload')
-  >>> browser.getControl(name='uploadfile:file').add_file(
-  ...   cStringIO.StringIO(open('certcourses.csv', 'rb').read()),
-  ...   'text/plain', 'mycertcourses.csv')
-  >>> browser.getControl(name='SUBMIT').click()
 
 
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/interfaces.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/interfaces.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/interfaces.py	(revision 11947)
@@ -23,8 +23,4 @@
     IKofaObject, IUniversity, IUsersContainer, IDataCenter, validate_email)
 from waeup.kofa.interfaces import MessageFactory as _
-from waeup.kofa.university.interfaces import (
-    IFacultiesContainer, IFaculty, IDepartment,
-    ICoursesContainer, ICourse, ICertificatesContainer,
-    ICertificate, ICertificateCourse)
 
 class IBreadcrumb(Interface):
@@ -177,5 +173,5 @@
         title = _(u'Unique Identifier'),
         description = _(
-            u'User Name, Student or Applicant Id, Matriculation or '
+            u'User Name, Customer Id, or '
             u'Registration Number'),
         required = True,
@@ -188,14 +184,2 @@
         constraint=validate_email,
         )
-
-class IStudentNavigationBase(IKofaObject):
-    """Objects that provide student navigation (whatever it is) should
-       implement this interface.
-    """
-    student = Attribute('''Some student object that has a '''
-                        ''' `display_fullname` attribute.''')
-
-class IApplicantBase(IKofaObject):
-    """Some Applicant.
-    """
-    display_fullname = Attribute('''Fullname.''')
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/layout.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/layout.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/layout.py	(revision 11947)
@@ -35,6 +35,4 @@
 from waeup.kofa.interfaces import MessageFactory as _
 from waeup.kofa.utils.helpers import to_timezone
-from waeup.kofa.browser.interfaces import (
-    IStudentNavigationBase, IApplicantBase)
 from waeup.kofa.authentication import get_principal_role_manager
 
@@ -254,22 +252,9 @@
         return userid
 
-    def isStudent(self):
+    def isCustomer(self):
         usertype = getattr(self.request.principal, 'user_type', None)
         if not usertype:
             return False
-        return self.request.principal.user_type == 'student'
-
-    def isApplicant(self):
-        usertype = getattr(self.request.principal, 'user_type', None)
-        if not usertype:
-            return False
-        return self.request.principal.user_type == 'applicant'
-
-    def getStudentName(self):
-        """Return the student name.
-        """
-        if IStudentNavigationBase.providedBy(self.context):
-            return self.context.student.display_fullname
-        return
+        return self.request.principal.user_type == 'customer'
 
     def formatDatetime(self,datetimeobj):
@@ -301,5 +286,5 @@
 
     def render(self):
-        if self.isStudent() or self.isApplicant() or not self.isAuthenticated():
+        if self.isCustomer() or not self.isAuthenticated():
             return self.studenttemp.render(self)
         return self.stafftemp.render(self)
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pages.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pages.py	(revision 11947)
@@ -46,8 +46,5 @@
     KofaDisplayFormPage, NullValidator)
 from waeup.kofa.browser.interfaces import (
-    IUniversity, IFacultiesContainer, IFaculty,
-    IDepartment, ICourse, ICertificate,
-    ICertificateCourse,
-    ICaptchaManager, IChangePassword)
+    IUniversity, ICaptchaManager, IChangePassword)
 from waeup.kofa.browser.layout import jsaction, action, UtilityView
 from waeup.kofa.interfaces import MessageFactory as _
@@ -58,11 +55,9 @@
     ISessionConfiguration, ISessionConfigurationAdd, IJobManager,
     IPasswordValidator, IContactForm, IKofaUtils, ICSVExporter,
-    academic_sessions_vocab)
+    application_sessions_vocab)
 from waeup.kofa.permissions import (
     get_users_with_local_roles, get_all_roles, get_all_users,
     get_users_with_role)
 
-from waeup.kofa.university.catalog import search
-from waeup.kofa.university.vocabularies import course_levels
 from waeup.kofa.authentication import LocalRoleSetEvent
 from waeup.kofa.widgets.htmlwidget import HTMLDisplayWidget
@@ -70,7 +65,4 @@
 from waeup.kofa.mandates.mandate import PasswordMandate
 from waeup.kofa.datacenter import DataCenterFile
-
-from waeup.kofa.students.export import EXPORTER_NAMES as STUDENT_EXPORTERS
-from waeup.kofa.students.catalog import StudentQueryResultItem
 
 FORBIDDEN_CHARACTERS = (160,)
@@ -270,7 +262,4 @@
     login_button = label
 
-    def _comment(self, student):
-        return getattr(student, 'suspended_comment', None)
-
     def update(self, SUBMIT=None, camefrom=None):
         self.camefrom = camefrom
@@ -278,20 +267,14 @@
             if self.request.principal.id != 'zope.anybody':
                 self.flash(_('You logged in.'))
-                if self.request.principal.user_type == 'student':
-                    student = grok.getSite()['students'][
+                if self.request.principal.user_type == 'customer':
+                    student = grok.getSite()['customerss'][
                         self.request.principal.id]
-                    rel_link = '/students/%s' % self.request.principal.id
+                    rel_link = '/customers/%s' % self.request.principal.id
                     if student.personal_data_expired:
-                        rel_link = '/students/%s/edit_personal' % (
+                        rel_link = '/customerss/%s/edit_personal' % (
                             self.request.principal.id)
                         self.flash(
                           _('Your personal data record is outdated. Please update.'),
                           type='warning')
-                    self.redirect(self.application_url() + rel_link)
-                    return
-                elif self.request.principal.user_type == 'applicant':
-                    container, application_number = self.request.principal.id.split('_')
-                    rel_link = '/applicants/%s/%s' % (
-                        container, application_number)
                     self.redirect(self.application_url() + rel_link)
                     return
@@ -301,33 +284,4 @@
                 self.redirect(self.camefrom)
                 return
-            # Display appropriate flash message if credentials are correct
-            # but student has been deactivated or a temporary password
-            # has been set.
-            login = self.request.form['form.login']
-            if len(login) == 8 and login in grok.getSite()['students']:
-                student = grok.getSite()['students'][login]
-                password = self.request.form['form.password']
-                passwordmanager = getUtility(IPasswordManager, 'SSHA')
-                if student.password is not None and \
-                    passwordmanager.checkPassword(student.password, password):
-                    # The student entered valid credentials.
-                    # First we check if a temporary password has been set.
-                    delta = timedelta(minutes=10)
-                    now = datetime.utcnow()
-                    temp_password_dict = getattr(student, 'temp_password', None)
-                    if temp_password_dict is not None and \
-                        now < temp_password_dict.get('timestamp', now) + delta:
-                        self.flash(
-                            _('Your account has been temporarily deactivated.'),
-                            type='warning')
-                        return
-                    # Now we know that the student is suspended.
-                    comment = self._comment(student)
-                    if comment:
-                        self.flash(comment, type='warning')
-                    else:
-                        self.flash(_('Your account has been deactivated.'),
-                                   type='warning')
-                    return
             self.flash(_('You entered invalid credentials.'), type='danger')
             return
@@ -734,32 +688,4 @@
 
 #
-# Search pages...
-#
-
-class SearchPage(KofaPage):
-    """General search page for the academics section.
-    """
-    grok.context(IFacultiesContainer)
-    grok.name('search')
-    grok.template('searchpage')
-    grok.require('waeup.viewAcademics')
-    label = _(u"Search Academic Section")
-    pnav = 1
-    search_button = _(u'Search')
-
-    def update(self, *args, **kw):
-        form = self.request.form
-        self.hitlist = []
-        self.query = ''
-        if not 'query' in form:
-            return
-        query = form['query']
-        self.query = query
-        self.hitlist = search(query=self.query, view=self)
-        if not self.hitlist:
-            self.flash(_('No object found.'), type="warning")
-        return
-
-#
 # Configuration pages...
 #
@@ -856,5 +782,5 @@
             self.context.__parent__.logger.info(
                 '%s - added: %s' % (
-                ob_class, sessionconfiguration.academic_session))
+                ob_class, sessionconfiguration.application_session))
         except KeyError:
             self.flash(_('The session chosen already exists.'), type='danger')
@@ -1518,5 +1444,5 @@
         self.filename = logname
         self.query = query
-        if search is None or not query:
+        if not query:
             return
         try:
@@ -1582,9 +1508,5 @@
         utils = getUtilitiesFor(ICSVExporter)
         title_name_tuples = [
-            (util.title, name) for name, util in utils
-            if not name in STUDENT_EXPORTERS]
-        # The exporter for access codes requires a special permission.
-        if not checkPermission('waeup.manageACBatches', self.context):
-            title_name_tuples.remove((u'AccessCodes', u'accesscodes'))
+            (util.title, name) for name, util in utils]
         return sorted(title_name_tuples)
 
@@ -1643,678 +1565,4 @@
         return result
 
-class ExportXMLPage(grok.View):
-    """Deliver an XML representation of the context.
-    """
-    grok.name('export.xml')
-    grok.require('waeup.managePortal')
-
-    def render(self):
-        exporter = IKofaXMLExporter(self.context)
-        xml = exporter.export().read()
-        self.response.setHeader(
-            'Content-Type', 'text/xml; charset=UTF-8')
-        return xml
-
-class ImportXMLPage(KofaPage):
-    """Replace the context object by an object created from an XML
-       representation.
-
-       XXX: This does not work for ISite objects, i.e. for instance
-            for complete University objects.
-    """
-    grok.name('importxml')
-    grok.require('waeup.managePortal')
-
-    def update(self, xmlfile=None, CANCEL=None, SUBMIT=None):
-        if CANCEL is not None:
-            self.redirect(self.url(self.context))
-            return
-        if not xmlfile:
-            return
-        importer = IKofaXMLImporter(self.context)
-        obj = importer.doImport(xmlfile)
-        if type(obj) != type(self.context):
-            return
-        parent = self.context.__parent__
-        name = self.context.__name__
-        self.context = obj
-        if hasattr(parent, name):
-            setattr(parent, name, obj)
-        else:
-            del parent[name]
-            parent[name] = obj
-            pass
-        return
-
-
-#
-# FacultiesContainer pages...
-#
-
-class FacultiesContainerPage(KofaPage):
-    """ Index page for faculty containers.
-    """
-    grok.context(IFacultiesContainer)
-    grok.require('waeup.viewAcademics')
-    grok.name('index')
-    label = _('Academic Section')
-    pnav = 1
-    grok.template('facultypage')
-
-class FacultiesContainerManageFormPage(KofaEditFormPage):
-    """Manage the basic properties of a `Faculty` instance.
-    """
-    grok.context(IFacultiesContainer)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    grok.template('facultiescontainermanagepage')
-    pnav = 1
-    taboneactions = [_('Add faculty'), _('Remove selected'),_('Cancel')]
-    subunits = _('Faculties')
-
-    @property
-    def label(self):
-        return _('Manage academic section')
-
-    @jsaction(_('Remove selected'))
-    def delFaculties(self, **data):
-        if not checkPermission('waeup.managePortal', self.context):
-            self.flash(_('You are not allowed to remove entire faculties.'),
-                       type='warning')
-            return
-        delSubobjects(self, redirect='@@manage', tab='1')
-        return
-
-    @action(_('Add faculty'), validator=NullValidator)
-    def addFaculty(self, **data):
-        self.redirect(self.url(self.context, '@@add'))
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-
-class FacultyAddFormPage(KofaAddFormPage):
-    """ Page form to add a new faculty to a faculty container.
-    """
-    grok.context(IFacultiesContainer)
-    grok.require('waeup.manageAcademics')
-    grok.name('add')
-    label = _('Add faculty')
-    form_fields = grok.AutoFields(IFaculty)
-    pnav = 1
-
-    @action(_('Add faculty'), style='primary')
-    def addFaculty(self, **data):
-        faculty = createObject(u'waeup.Faculty')
-        self.applyData(faculty, **data)
-        try:
-            self.context.addFaculty(faculty)
-        except KeyError:
-            self.flash(_('The faculty code chosen already exists.'),
-                       type='danger')
-            return
-        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-        self.context.__parent__.logger.info(
-            '%s - added: %s' % (ob_class, faculty.code))
-        self.redirect(self.url(self.context, u'@@manage')+'#tab1')
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-
-#
-# Faculty pages
-#
-class FacultyPage(KofaPage):
-    """Index page of faculties.
-    """
-    grok.context(IFaculty)
-    grok.require('waeup.viewAcademics')
-    grok.name('index')
-    pnav = 1
-
-    @property
-    def label(self):
-        return _('Departments')
-
-class FacultyManageFormPage(KofaEditFormPage,
-                            LocalRoleAssignmentUtilityView):
-    """Manage the basic properties of a `Faculty` instance.
-    """
-    grok.context(IFaculty)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    grok.template('facultymanagepage')
-    pnav = 1
-    subunits = _('Departments')
-    taboneactions = [_('Save'),_('Cancel')]
-    tabtwoactions = [_('Add department'), _('Remove selected'),_('Cancel')]
-    tabthreeactions1 = [_('Remove selected local roles')]
-    tabthreeactions2 = [_('Add local role')]
-
-    form_fields = grok.AutoFields(IFaculty).omit('code')
-
-    @property
-    def label(self):
-        return _('Manage faculty')
-
-    @jsaction(_('Remove selected'))
-    def delDepartments(self, **data):
-        if not checkPermission('waeup.managePortal', self.context):
-            self.flash(_('You are not allowed to remove entire departments.'),
-                       type='danger')
-            return
-        delSubobjects(self, redirect='@@manage', tab='2')
-        return
-
-    @action(_('Save'), style='primary')
-    def save(self, **data):
-        return msave(self, **data)
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-    @action(_('Add department'), validator=NullValidator)
-    def addSubunit(self, **data):
-        self.redirect(self.url(self.context, '@@add'))
-        return
-
-    @action(_('Add local role'), validator=NullValidator)
-    def addLocalRole(self, **data):
-        return add_local_role(self,3,**data)
-
-    @action(_('Remove selected local roles'))
-    def delLocalRoles(self, **data):
-        return del_local_roles(self,3,**data)
-
-class FindStudentsPage(KofaPage):
-    """Search students in faculty.
-    """
-    grok.context(IFaculty)
-    grok.name('find_students')
-    grok.require('waeup.showStudents')
-    grok.template('findstudentspage')
-    search_button = _('Find student(s)')
-    pnav = 1
-
-    @property
-    def label(self):
-        return _('Find students in ') + ('%s' % self.context.longtitle)
-
-    def _find_students(self,query=None, searchtype=None, view=None):
-        hitlist = []
-        if searchtype in ('fullname',):
-            results = Query().searchResults(
-                Text(('students_catalog', searchtype), query) &
-                Eq(('students_catalog', 'faccode'), self.context.code)
-                )
-        else:
-            results = Query().searchResults(
-                Eq(('students_catalog', searchtype), query) &
-                Eq(('students_catalog', 'faccode'), self.context.code)
-                )
-        for result in results:
-            hitlist.append(StudentQueryResultItem(result, view=view))
-        return hitlist
-
-    def update(self, *args, **kw):
-        form = self.request.form
-        self.hitlist = []
-        if 'searchterm' in form and form['searchterm']:
-            self.searchterm = form['searchterm']
-            self.searchtype = form['searchtype']
-        elif 'old_searchterm' in form:
-            self.searchterm = form['old_searchterm']
-            self.searchtype = form['old_searchtype']
-        else:
-            if 'search' in form:
-                self.flash(_('Empty search string'), type='warning')
-            return
-        self.hitlist = self._find_students(query=self.searchterm,
-            searchtype=self.searchtype, view=self)
-        if not self.hitlist:
-            self.flash(_('No student found.'), type='warning')
-        return
-
-class DepartmentAddFormPage(KofaAddFormPage):
-    """Add a department to a faculty.
-    """
-    grok.context(IFaculty)
-    grok.name('add')
-    grok.require('waeup.manageAcademics')
-    label = _('Add department')
-    form_fields = grok.AutoFields(IDepartment)
-    pnav = 1
-
-    @action(_('Add department'), style='primary')
-    def addDepartment(self, **data):
-        department = createObject(u'waeup.Department')
-        self.applyData(department, **data)
-        try:
-            self.context.addDepartment(department)
-        except KeyError:
-            self.flash(_('The code chosen already exists in this faculty.'),
-                       type='danger')
-            return
-        self.status = self.flash(
-            _("Department ${a} added.", mapping = {'a':data['code']}))
-        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-        self.context.__parent__.__parent__.logger.info(
-            '%s - added: %s' % (ob_class, data['code']))
-        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-#
-# Department pages
-#
-class DepartmentPage(KofaPage):
-    """Department index page.
-    """
-    grok.context(IDepartment)
-    grok.require('waeup.viewAcademics')
-    grok.name('index')
-    pnav = 1
-    label = _('Courses and Certificates')
-
-    def update(self):
-        super(DepartmentPage, self).update()
-        return
-
-    def getCourses(self):
-        """Get a list of all stored courses.
-        """
-        for key, val in self.context.courses.items():
-            url = self.url(val)
-            yield(dict(url=url, name=key, container=val))
-
-    def getCertificates(self):
-        """Get a list of all stored certificates.
-        """
-        for key, val in self.context.certificates.items():
-            url = self.url(val)
-            yield(dict(url=url, name=key, container=val))
-
-class DepartmentManageFormPage(KofaEditFormPage,
-                               LocalRoleAssignmentUtilityView):
-    """Manage the basic properties of a `Department` instance.
-    """
-    grok.context(IDepartment)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    pnav = 1
-    grok.template('departmentmanagepage')
-    taboneactions = [_('Save'),_('Cancel')]
-    tabtwoactions = [_('Add course'), _('Remove selected courses'),_('Cancel')]
-    tabthreeactions = [_('Add certificate'), _('Remove selected certificates'),
-                       _('Cancel')]
-    tabfouractions1 = [_('Remove selected local roles')]
-    tabfouractions2 = [_('Add local role')]
-
-    form_fields = grok.AutoFields(IDepartment).omit('code')
-
-    @property
-    def label(self):
-        return _('Manage department')
-
-    def getCourses(self):
-        """Get a list of all stored courses.
-        """
-        for key, val in self.context.courses.items():
-            url = self.url(val)
-            yield(dict(url=url, name=key, container=val))
-
-    def getCertificates(self):
-        """Get a list of all stored certificates.
-        """
-        for key, val in self.context.certificates.items():
-            url = self.url(val)
-            yield(dict(url=url, name=key, container=val))
-
-    @action(_('Save'), style='primary')
-    def save(self, **data):
-        return msave(self, **data)
-
-    @jsaction(_('Remove selected courses'))
-    def delCourses(self, **data):
-        delSubobjects(
-            self, redirect='@@manage', tab='2', subcontainer='courses')
-        return
-
-    @jsaction(_('Remove selected certificates'))
-    def delCertificates(self, **data):
-        if not checkPermission('waeup.managePortal', self.context):
-            self.flash(_('You are not allowed to remove certificates.'),
-                       type='warning')
-            return
-        delSubobjects(
-            self, redirect='@@manage', tab='3', subcontainer='certificates')
-        return
-
-    @action(_('Add course'), validator=NullValidator)
-    def addCourse(self, **data):
-        self.redirect(self.url(self.context, 'addcourse'))
-        return
-
-    @action(_('Add certificate'), validator=NullValidator)
-    def addCertificate(self, **data):
-        self.redirect(self.url(self.context, 'addcertificate'))
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-    @action(_('Add local role'), validator=NullValidator)
-    def addLocalRole(self, **data):
-        return add_local_role(self,4,**data)
-
-    @action(_('Remove selected local roles'))
-    def delLocalRoles(self, **data):
-        return del_local_roles(self,4,**data)
-
-class CourseAddFormPage(KofaAddFormPage):
-    """Add-form to add course to a department.
-    """
-    grok.context(IDepartment)
-    grok.name('addcourse')
-    grok.require('waeup.manageAcademics')
-    label = _(u'Add course')
-    form_fields = grok.AutoFields(ICourse)
-    pnav = 1
-
-    @action(_('Add course'))
-    def addCourse(self, **data):
-        course = createObject(u'waeup.Course')
-        self.applyData(course, **data)
-        try:
-            self.context.courses.addCourse(course)
-        except DuplicationError, error:
-            # signals duplication error
-            entries = error.entries
-            for entry in entries:
-                # do not use error.msg but render a more detailed message instead
-                # and show links to all certs with same code
-                message = _('A course with same code already exists: ')
-                message += '<a href="%s">%s</a>' % (
-                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
-                self.flash(message, type='warning')
-            self.redirect(self.url(self.context, u'@@addcourse'))
-            return
-        message = _(u'Course ${a} successfully created.', mapping = {'a':course.code})
-        self.flash(message)
-        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-        self.context.__parent__.__parent__.__parent__.logger.info(
-            '%s - added: %s' % (ob_class, data['code']))
-        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-class CertificateAddFormPage(KofaAddFormPage):
-    """Add-form to add certificate to a department.
-    """
-    grok.context(IDepartment)
-    grok.name('addcertificate')
-    grok.require('waeup.manageAcademics')
-    label = _(u'Add certificate')
-    form_fields = grok.AutoFields(ICertificate)
-    pnav = 1
-
-    @action(_('Add certificate'))
-    def addCertificate(self, **data):
-        certificate = createObject(u'waeup.Certificate')
-        self.applyData(certificate, **data)
-        try:
-            self.context.certificates.addCertificate(certificate)
-        except DuplicationError, error:
-            # signals duplication error
-            entries = error.entries
-            for entry in entries:
-                # do not use error.msg but render a more detailed message instead
-                # and show links to all certs with same code
-                message = _('A certificate with same code already exists: ')
-                message += '<a href="%s">%s</a>' % (
-                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
-                self.flash(message, type='warning')
-            self.redirect(self.url(self.context, u'@@addcertificate'))
-            return
-        message = _(u'Certificate ${a} successfully created.', mapping = {'a':certificate.code})
-        self.flash(message)
-        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-        self.context.__parent__.__parent__.__parent__.logger.info(
-            '%s - added: %s' % (ob_class, data['code']))
-        self.redirect(self.url(self.context, u'@@manage')+'#tab3')
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self): #, **data):
-        self.redirect(self.url(self.context))
-        return
-
-#
-# Courses pages
-#
-class CoursePage(KofaDisplayFormPage):
-    """Course index page.
-    """
-    grok.context(ICourse)
-    grok.name('index')
-    grok.require('waeup.viewAcademics')
-    pnav = 1
-    form_fields = grok.AutoFields(ICourse)
-
-    @property
-    def label(self):
-        return '%s (%s)' % (self.context.title, self.context.code)
-
-class CourseManageFormPage(KofaEditFormPage,
-                           LocalRoleAssignmentUtilityView):
-    """Edit form page for courses.
-    """
-    grok.context(ICourse)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    grok.template('coursemanagepage')
-    label = _(u'Edit course')
-    pnav = 1
-    taboneactions = [_('Save'),_('Cancel')]
-    tabtwoactions1 = [_('Remove selected local roles')]
-    tabtwoactions2 = [_('Add local role')]
-
-    form_fields = grok.AutoFields(ICourse).omit('code')
-
-    @action(_('Save'), style='primary')
-    def save(self, **data):
-        return msave(self, **data)
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-    @action(_('Add local role'), validator=NullValidator)
-    def addLocalRole(self, **data):
-        return add_local_role(self,2,**data)
-
-    @action(_('Remove selected local roles'))
-    def delLocalRoles(self, **data):
-        return del_local_roles(self,2,**data)
-
-#
-# Certificate pages
-#
-class CertificatePage(KofaDisplayFormPage):
-    """Index page for certificates.
-    """
-    grok.context(ICertificate)
-    grok.name('index')
-    grok.require('waeup.viewAcademics')
-    pnav = 1
-    form_fields = grok.AutoFields(ICertificate)
-    grok.template('certificatepage')
-
-    @property
-    def label(self):
-        return "%s (%s)" % (self.context.title, self.context.code)
-
-    def update(self):
-        return super(CertificatePage, self).update()
-
-class CertificateManageFormPage(KofaEditFormPage,
-                                LocalRoleAssignmentUtilityView):
-    """Manage the properties of a `Certificate` instance.
-    """
-    grok.context(ICertificate)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    pnav = 1
-    label = _('Edit certificate')
-
-    form_fields = grok.AutoFields(ICertificate).omit('code')
-
-    pnav = 1
-    grok.template('certificatemanagepage')
-    taboneactions = [_('Save'),_('Cancel')]
-    tabtwoactions = [_('Add certificate course'),
-                     _('Remove selected certificate courses'),_('Cancel')]
-    tabthreeactions1 = [_('Remove selected local roles')]
-    tabthreeactions2 = [_('Add local role')]
-
-    @property
-    def label(self):
-        return _('Manage certificate')
-
-    @action(_('Save'), style='primary')
-    def save(self, **data):
-        return msave(self, **data)
-
-    @jsaction(_('Remove selected certificate courses'))
-    def delCertificateCourses(self, **data):
-        delSubobjects(self, redirect='@@manage', tab='2')
-        return
-
-    @action(_('Add certificate course'), validator=NullValidator)
-    def addCertificateCourse(self, **data):
-        self.redirect(self.url(self.context, 'addcertificatecourse'))
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-    @action(_('Add local role'), validator=NullValidator)
-    def addLocalRole(self, **data):
-        return add_local_role(self,3,**data)
-
-    @action(_('Remove selected local roles'))
-    def delLocalRoles(self, **data):
-        return del_local_roles(self,3,**data)
-
-
-class CertificateCourseAddFormPage(KofaAddFormPage):
-    """Add-page to add a course ref to a certificate
-    """
-    grok.context(ICertificate)
-    grok.name('addcertificatecourse')
-    grok.require('waeup.manageAcademics')
-    form_fields = grok.AutoFields(ICertificateCourse)
-    pnav = 1
-    label = _('Add certificate course')
-
-    @action(_('Add certificate course'))
-    def addCertcourse(self, **data):
-        try:
-            self.context.addCertCourse(**data)
-        except KeyError:
-            self.status = self.flash(_('The chosen certificate course is already '
-                                  'part of this certificate.'), type='warning')
-            return
-        self.status = self.flash(
-            _("certificate course ${a}_${b} added.",
-            mapping = {'a': data['course'].code, 'b': data['level']}))
-        code = "%s_%s" % (data['course'].code, data['level'])
-        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-        grok.getSite().logger.info('%s - added: %s' % (ob_class, code))
-        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-
-#
-# Certificate course pages...
-#
-class CertificateCoursePage(KofaPage):
-    """CertificateCourse index page.
-    """
-    grok.context(ICertificateCourse)
-    grok.name('index')
-    grok.require('waeup.viewAcademics')
-    pnav = 1
-    #form_fields = grok.AutoFields(ICertificateCourse)
-
-    @property
-    def label(self):
-        return '%s' % (self.context.longtitle)
-
-    @property
-    def leveltitle(self):
-        return course_levels.getTerm(self.context.level).title
-
-class CertificateCourseManageFormPage(KofaEditFormPage):
-    """Manage the basic properties of a `CertificateCourse` instance.
-    """
-    grok.context(ICertificateCourse)
-    grok.name('manage')
-    grok.require('waeup.manageAcademics')
-    form_fields = grok.AutoFields(ICertificateCourse).omit('code')
-    label = _('Edit certificate course')
-    pnav = 1
-
-    @action(_('Save and return'), style='primary')
-    def saveAndReturn(self, **data):
-        parent = self.context.__parent__
-        if self.context.level == data['level']:
-            msave(self, **data)
-        else:
-            # The level changed. We have to create a new certcourse as
-            # the key of the entry will change as well...
-            old_level = self.context.level
-            data['course'] = self.context.course
-            parent.addCertCourse(**data)
-            parent.delCertCourses(data['course'].code, level=old_level)
-            self.flash(_('Form has been saved.'))
-            old_code = "%s_%s" % (data['course'].code, old_level)
-            new_code = "%s_%s" % (data['course'].code, data['level'])
-            ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
-            grok.getSite().logger.info(
-                '%s - renamed: %s to %s' % (ob_class, old_code, new_code))
-        self.redirect(self.url(parent))
-        return
-
-    @action(_('Cancel'), validator=NullValidator)
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
 class ChangePasswordRequestPage(KofaForm):
     """Captcha'd page for all kind of users to request a password change.
@@ -2335,24 +1583,14 @@
 
     def _searchUser(self, identifier, email):
-        # Search student
-        cat = queryUtility(ICatalog, name='students_catalog')
-        results = cat.searchResults(
+        # Search customer
+        #cat = queryUtility(ICatalog, name='customers_catalog')
+        #results = cat.searchResults(
             #reg_number=(identifier, identifier),
-            email=(email,email))
-        for result in results:
-            if result.student_id == identifier or \
-                result.reg_number == identifier or \
-                result.matric_number == identifier:
-                return result
-        # Search applicant
-        cat = queryUtility(ICatalog, name='applicants_catalog')
-        if cat is not None:
-            results = cat.searchResults(
-                #reg_number=(identifier, identifier),
-                email=(email,email))
-            for result in results:
-                if result.applicant_id == identifier or \
-                    result.reg_number == identifier:
-                    return result
+        #    email=(email,email))
+        #for result in results:
+        #    if result.student_id == identifier or \
+        #        result.reg_number == identifier or \
+        #        result.matric_number == identifier:
+        #        return result
         # Search portal user
         user = grok.getSite()['users'].get(identifier, None)
@@ -2367,5 +1605,5 @@
             # No need to flash something.
             return
-        # Search student or applicant
+        # Search customer
         identifier = data['identifier']
         email = data['email']
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pdf.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pdf.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/pdf.py	(revision 11947)
@@ -566,37 +566,4 @@
 
     @classmethod
-    def _addCourse(cls, table_data, row_num, course_label, course_link,
-                   lang, domain):
-        """Add course data to `table_data`.
-        """
-        if not course_label or not course_link:
-            return table_data, row_num
-        f_label= translate(
-            _(course_label), domain, target_language=lang)
-        f_label = Paragraph(f_label, ENTRY1_STYLE)
-        f_text = Paragraph(course_link, ENTRY1_STYLE)
-        table_data.append([f_label, f_text])
-        row_num += 1
-        return table_data, row_num
-
-    @classmethod
-    def _addDeptAndFaculty(cls, table_data, row_num, dept, faculty,
-                           lang, domain):
-        """Add `dept` and `faculty` as table rows to `table_data`.
-
-        `dept` and `faculty` are expected to be strings or None. In
-        latter case they are not put into the table.
-        """
-        for label, text in (('Department:', dept), ('Faculty:', faculty)):
-            if text is None:
-                continue
-            label = translate(_(label), domain, target_language=lang)
-            table_data.append([
-                Paragraph(label, ENTRY1_STYLE),
-                Paragraph(text, ENTRY1_STYLE)])
-            row_num += 1
-        return table_data, row_num
-
-    @classmethod
     def _drawSignatureBoxes(cls, canvas, width, height, signatures=[]):
         """Draw signature boxes into canvas.
@@ -661,6 +628,5 @@
     def getWidgetsTable(self, form_fields, context, view, lang='en',
                         domain='waeup.kofa', separators=None,
-                        course_label=None, course_link=None, dept=None,
-                        faculty=None, colWidths=None, twoDataCols=False):
+                        colWidths=None, twoDataCols=False):
         """Return a reportlab `Table` instance, created from widgets
         determined by `form_fields` and `context`.
@@ -679,11 +645,4 @@
         - `separators`
            a list of separators.
-        - `course_label` and `course_link`
-           if a course should be added to the table, `course_label`
-           and `course_link` can be given, both being strings. They
-           will be rendered in an extra-row.
-        - `dept` and `faculty`
-           if these are given, we render extra rows with faculty and
-           department.
         - `colWidths`
            defines the the column widths of the data in the right column
@@ -699,12 +658,4 @@
         table_data, row_num = self._getWidgetsTableData(
             widgets, separators, domain, lang, twoDataCols)
-
-        # Add course (admitted, etc.) if applicable
-        table_data, row_num = self._addCourse(
-            table_data, row_num, course_label, course_link, lang, domain,)
-
-        ## Add dept. and faculty if applicable
-        table_data, row_num = self._addDeptAndFaculty(
-            table_data, row_num, dept, faculty, lang, domain)
 
         # render two-column table of tables if applicable
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatecoursepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatecoursepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<table i18n:domain="waeup.kofa" class="form-table">
-  <thead>
-  </thead>
-  <tbody>
-    <tr>
-      <td i18n:translate="">Code:</td>
-      <td tal:content="context/__name__">CODE</td>
-    </tr>
-    <tr>
-      <td i18n:translate="">Course Code:</td>
-      <td tal:content="context/getCourseCode">THE COURSE</td>
-    </tr>
-    <tr>
-      <td i18n:translate="">Course Title:</td>
-      <td tal:content="context/course/title">THE TITLE</td>
-    </tr>
-    <tr>
-      <td i18n:translate="">Provided by:</td>
-      <td>
-      <span tal:content="python: context.course.__parent__.__parent__.longtitle">DEPARTMENT</span>
-      <br />
-      <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle">FACULTY</span>
-      </td>
-    </tr>
-    <tr>
-      <td i18n:translate="">Level:</td>
-      <td tal:content="view/leveltitle">LEVEL</td>
-    </tr>
-    <tr>
-      <td i18n:translate="">Required course:</td>
-      <td tal:content="context/mandatory">REQUIRED</td>
-    </tr>
-  </tbody>
-</table>
-
-
-
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatemanagepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatemanagepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,153 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="POST"
-      enctype="multipart/form-data" i18n:domain="waeup.kofa">
-
-  <ul class="tabs nav nav-tabs" data-tabs="tabs">
-    <li class="active">
-      <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a>
-    </li>
-    <li>
-      <a href="#tab2" data-toggle="tab"
-         i18n:translate="">Certificate Courses</a>
-    </li>
-    <li>
-      <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a>
-    </li>
-  </ul>
-
-  <div class="tab-content">
-    <div id="tab1" class="active tab-pane">
-      <table class="form-table">
-        <tbody>
-          <tal:widgets content="structure provider:widgets" />
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions"
-              tal:omit-tag="">
-          <input tal:condition="python:action.label in view.taboneactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab2" class="tab-pane">
-      <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;</th>
-            <th i18n:translate="">Level</th>
-            <th i18n:translate="">Semester</th>
-            <th i18n:translate="">Cert. Course</th>
-            <th i18n:translate="">Dep. Course</th>
-            <th i18n:translate="">Title</th>
-            <th i18n:translate="">Required</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="cc context/values">
-            <td>
-              <input type="checkbox" name="val_id"
-                     tal:attributes="value cc/__name__" />
-            </td>
-            <td>
-              <span tal:content="cc/level">
-                LEVEL
-              </span>
-            </td>
-            <td tal:content="cc/course/semester">SEMESTER</td>
-            <td>
-              <a tal:attributes="href python: view.url(cc)"
-                 tal:content="cc/__name__">
-            	REFERRER CODE
-              </a>
-            </td>
-            <td>
-              <a tal:attributes="href python:view.url(cc.course)"
-                 tal:content="cc/course/code">
-            	COURSE CODE
-              </a>
-            </td>
-            <td>
-              <span tal:content="cc/course/title">
-                COURSE TITLE
-              </span>
-            </td>
-            <td>
-              <span tal:content="cc/mandatory">
-                REQUIRED
-              </span>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions"
-              tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabtwoactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab3" class="tab-pane">
-      <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">User Id
-            </th>
-            <th i18n:translate="">Name
-            </th>
-            <th i18n:translate="">Local Role
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
-            <input type="checkbox" name="role_id"
-                   tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
-            <td tal:content="entry/user_name"> USERNAME </td>
-            <td tal:content="entry/user_title"> USERTITLE </td>
-            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabthreeactions1"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div><br /><br />
-      <div class="form-inline">
-        <br />
-        <div class="form-group">
-          <select id="user" name="user" class="form-control">
-            <option tal:repeat="user view/getUsers"
-                    tal:attributes="value user/name">
-            <span tal:replace="user/val/title">USERTITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <select id="local_role" name="local_role" class="form-control">
-            <option tal:repeat="localrole view/getLocalRoles"
-                    tal:attributes="value localrole/name">
-            <span tal:replace="localrole/title">LOCALROLETITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <div tal:condition="view/availableActions">
-            <span tal:repeat="action view/actions" tal:omit-tag="">
-              <input tal:condition="python:action.label in view.tabthreeactions2"
-                     tal:replace="structure action/render"/>
-            </span>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</form>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/certificatepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,68 +1,0 @@
-<table class="form-table">
-<thead>
-</thead>
-<tbody>
-  <tal:block repeat="widget view/widgets">
-    <tr>
-      <td class="fieldname">
-        <span tal:content="widget/label">label</span>:
-      </td>
-      <td tal:on-error="default">
-        <div tal:content="structure widget">
-          <input type="text" />
-        </div>
-      </td>
-    </tr>
-  </tal:block>
-</tbody>
-</table>
-
-<h3>
-  <span tal:content="context/__name__">Code</span>
-  <span i18n:domain="waeup.kofa" i18n:translate="">Courses</span>
-</h3>
-<br />
-<table i18n:domain="waeup.kofa" class="kofa-data-table dataTable">
-<thead>
-  <tr>
-    <th i18n:translate="">Level</th>
-    <th i18n:translate="">Semester</th>
-    <th i18n:translate="">Cert. Course</th>
-    <th i18n:translate="">Dep. Course</th>
-    <th i18n:translate="">Title</th>
-    <th i18n:translate="">Required</th>
-  </tr>
-</thead>
-<tbody>
-  <tr tal:repeat="cc context/values">
-     <td>
-      <span tal:content="cc/level">
-	   LEVEL
-      </span>
-    </td>
-    <td tal:content="cc/course/semester">SEMESTER</td>
-    <td>
-      <a tal:attributes="href python: view.url(cc)"
-	     tal:content="cc/__name__">
-    	REFERRER CODE
-      </a>
-    </td>
-    <td>
-      <a tal:attributes="href python:view.url(cc.course)"
-	     tal:content="cc/course/code">
-    	COURSE CODE
-      </a>
-    <td>
-      <span tal:content="cc/course/title">
-	   COURSE TITLE
-      </span>
-    </td>
-    <td>
-      <span tal:content="cc/mandatory">
-	   REQUIRED
-      </span>
-    </td>
-  </tr>
-</tbody>
-</table>
-
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/coursemanagepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/coursemanagepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,90 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="POST"
-      enctype="multipart/form-data" i18n:domain="waeup.kofa">
-
-  <ul class="tabs nav nav-tabs" data-tabs="tabs">
-    <li class="active">
-      <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a>
-    </li>
-    <li>
-      <a href="#tab3" data-toggle="tab" i18n:translate="">Local Roles</a>
-    </li>
-  </ul>
-
-  <div class="tab-content">
-    <div id="tab1" class="tab-pane active">
-      <table class="form-table">
-        <tbody>
-          <tal:widgets content="structure provider:widgets" />
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions"
-              tal:omit-tag="">
-          <input tal:condition="python:action.label in view.taboneactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab3" class="tab-pane">
-      <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">User Id
-            </th>
-            <th i18n:translate="">Name
-            </th>
-            <th i18n:translate="">Local Role
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
-            <input type="checkbox" name="role_id"
-                   tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
-            <td tal:content="entry/user_name"> USERNAME </td>
-            <td tal:content="entry/user_title"> USERTITLE </td>
-            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabtwoactions1"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div><br /><br />
-      <div class="form-inline">
-        <br />
-        <div class="form-group">
-          <select id="user" name="user" class="form-control">
-            <option tal:repeat="user view/getUsers"
-                    tal:attributes="value user/name">
-            <span tal:replace="user/val/title">USERTITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <select id="local_role" name="local_role" class="form-control">
-            <option tal:repeat="localrole view/getLocalRoles"
-                    tal:attributes="value localrole/name">
-            <span tal:replace="localrole/title">LOCALROLETITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <div tal:condition="view/availableActions">
-                <span tal:repeat="action view/actions" tal:omit-tag="">
-                  <input tal:condition="python:action.label in view.tabtwoactions2"
-                         tal:replace="structure action/render"/>
-                </span>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</form>
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/datacenterexportpage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/datacenterexportpage.pt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/datacenterexportpage.pt	(revision 11947)
@@ -34,11 +34,4 @@
   </div>
 </form>
-
-<br />
-
-<p i18n:translate="">
-  Student data exports have to be further configured. You can create CSV files
-  on the <a href="@@exportconfig">student data export configuration page</a>.
-</p>
 
 <br /><br />
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/default_waeup_edit_form.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/default_waeup_edit_form.pt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/default_waeup_edit_form.pt	(revision 11947)
@@ -5,5 +5,4 @@
     <tbody>
       <tal:widgets content="structure provider:widgets" />
-      <tal:files content="structure provider:files" />
     </tbody>
   </table>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/departmentmanagepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/departmentmanagepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,153 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="POST"
-      i18n:domain="waeup.kofa" enctype="multipart/form-data">
-  <ul class="tabs nav nav-tabs" data-tabs="tabs">
-    <li class="active">
-      <a href="#tab1" data-toggle="tab">
-      <span i18n:translate="">Settings</span></a>
-    </li>
-    <li>
-      <a href="#tab2"  data-toggle="tab" i18n:translate="">Courses</a>
-    </li>
-    <li>
-      <a href="#tab3"  data-toggle="tab" i18n:translate="">Certificates</a>
-    </li>
-    <li>
-      <a href="#tab4"  data-toggle="tab" i18n:translate="">Local Roles</a>
-    </li>
-  </ul>
-  <div class="tab-content">
-    <div id="tab1" class="active tab-pane">
-      <table class="form-table">
-        <tbody>
-          <tal:widgets content="structure provider:widgets" />
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.taboneactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab2" class="tab-pane">
-      <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">Code
-            </th>
-            <th i18n:translate="">Title
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getCourses"> <td>
-            <input type="checkbox" name="val_id"
-                   tal:attributes="value entry/name" /> </td> <td>
-            <a href="" tal:attributes="href entry/url"
-               tal:content="entry/name">Name</a> </td>
-            <td tal:content="entry/container/title"> Title </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabtwoactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab3" class="tab-pane">
-      <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">Code
-            </th>
-            <th i18n:translate="">Title
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getCertificates"> <td>
-            <input type="checkbox" name="val_id"
-                   tal:attributes="value entry/name" /> </td> <td>
-            <a href="" tal:attributes="href entry/url"
-               tal:content="entry/name">Name</a> </td>
-            <td tal:content="entry/container/title"> Title  </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabthreeactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab4" class="tab-pane"> <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">User Id
-            </th>
-            <th i18n:translate="">Name
-            </th>
-            <th i18n:translate="">Local Role
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getUsersWithLocalRoles">
-            <td> <input type="checkbox" name="role_id"
-            tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
-            <td tal:content="entry/user_name"> USERNAME </td>
-            <td tal:content="entry/user_title"> USERTITLE </td>
-            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabfouractions1"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div> <br /><br />
-      <div class="form-inline">
-        <br />
-        <div class="form-group">
-          <select class="form-control" id="user" name="user">
-            <option tal:repeat="user view/getUsers"
-                    tal:attributes="value user/name">
-            <span tal:replace="user/val/title">USERTITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <select class="form-control" id="local_role" name="local_role">
-            <option tal:repeat="localrole view/getLocalRoles"
-                    tal:attributes="value localrole/name">
-            <span tal:replace="localrole/title">LOCALROLETITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <div tal:condition="view/availableActions">
-            <span tal:repeat="action view/actions" tal:omit-tag="">
-              <input tal:condition="python:action.label in view.tabfouractions2"
-                     tal:replace="structure action/render"/>
-            </span>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</form>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/departmentpage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/departmentpage.pt	(revision 11946)
+++ 	(revision )
@@ -1,56 +1,0 @@
-<ul i18n:domain="waeup.kofa" class="tabs nav nav-tabs" data-tabs="tabs">
-  <li class="active"><a href="#tab1" data-toggle="tab">
-    <span i18n:translate="">Courses</span></a>
-  </li>
-  <li><a href="#tab2" data-toggle="tab">
-    <span i18n:translate="">Certificates</span></a>
-  </li>
-</ul>
-<div i18n:domain="waeup.kofa" class="tab-content">
-  <div id="tab1" class="active tab-pane">
-    <br />
-    <table class="kofa-data-table dataTable">
-      <thead>
-        <tr>
-          <th i18n:translate="">Code</th>
-          <th i18n:translate="">Title</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr tal:repeat="entry view/getCourses">
-          <td>
-            <a href=""
-               tal:attributes="href entry/url"
-               tal:content="entry/name">Name</a>
-          </td>
-          <td tal:content="entry/container/title">
-            Title
-          </td>
-        </tr>
-      </tbody>
-    </table>
-  </div>
-  <div id="tab2" class="tab-pane">
-    <br />
-    <table class="kofa-data-table dataTable">
-      <thead>
-        <tr>
-          <th i18n:translate="">Code</th>
-          <th i18n:translate="">Title</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr tal:repeat="entry view/getCertificates">
-          <td>
-            <a href=""
-               tal:attributes="href entry/url"
-               tal:content="entry/name">Name</a>
-          </td>
-          <td tal:content="entry/container/title">
-            Title
-          </td>
-        </tr>
-      </tbody>
-    </table>
-  </div>
-</div>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/exportxmlaction.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/exportxmlaction.pt	(revision 11946)
+++ 	(revision )
@@ -1,8 +1,0 @@
-<span class="yui-button" noclass="actionbarlink">
-  <span class="first-child">
-    <a href="" id="linkbutton1"
-       tal:attributes="href python: view.url(context) + '/export.xml'">
-      <img alt="export as XML"
-	   tal:attributes="src static/actionicon_unpublish.png"/>
-  <span>Export as XML</span></a></span>
-</span>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultiescontainermanagepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultiescontainermanagepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,38 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="POST"
-      enctype="multipart/form-data">
-
-  <table class="table table-hover">
-    <thead>
-      <tr>
-        <th>&nbsp;</th><th>Code</th><th>Title</th>
-      </tr>
-    </thead>
-    <tbody>
-      <tr tal:repeat="dep context/values">
-        <td>
-          <input type="checkbox"
-                 name="val_id"
-                 tal:attributes="value dep/code" />
-        </td>
-        <td>
-          <a tal:attributes="href python: view.url(dep)"
-             tal:content="dep/__name__">
-            ID
-          </a>
-        </td>
-        <td>
-          <span tal:content="dep/title">
-            ID
-          </span>
-        </td>
-      </tr>
-    </tbody>
-  </table>
-  <div tal:condition="view/availableActions">
-    <span tal:repeat="action view/actions"
-          tal:omit-tag="">
-      <input tal:condition="python:action.label in view.taboneactions"
-             tal:replace="structure action/render"/>
-    </span>
-  </div>
-</form>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultymanagepage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultymanagepage.pt	(revision 11946)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<form action="." tal:attributes="action request/URL"
-  i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data">
-  <ul class="tabs nav nav-tabs" data-tabs="tabs">
-    <li class="active">
-    <a href="#tab1" data-toggle="tab">
-      <span i18n:translate="">Settings
-      </span></a>
-    </li>
-    <li>
-    <a href="#tab2" data-toggle="tab">
-      <span tal:content="view/subunits">CONTENTS
-      </span> </a>
-    </li>
-    <li>
-    <a href="#tab3" data-toggle="tab">
-      <span i18n:translate="">Local Roles
-      </span></a>
-    </li>
-  </ul>
-  <div class="tab-content">
-    <div id="tab1" class="active tab-pane">
-      <table class="form-table">
-        <tbody>
-          <tal:widgets content="structure provider:widgets" />
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.taboneactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab2" class="tab-pane">
-      <h3 tal:content="view/subunits">DEPARTMENTS</h3>
-      <table class="table table-hover">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">Code
-            </th>
-            <th i18n:translate="">Title
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="dep context/values"> <td>
-              <input type="checkbox" name="val_id"
-                     tal:attributes="value dep/code" /> </td> <td>
-              <a tal:attributes="href python: view.url(dep)"
-                 tal:content="dep/__name__"> ID</a> </td> <td>
-              <span tal:content="dep/title">ID
-              </span> </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabtwoactions"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div>
-    </div>
-    <div id="tab3" class="tab-pane"> <br />
-      <table class="kofa-data-table dataTableManage">
-        <thead>
-          <tr>
-            <th>&nbsp;
-            </th>
-            <th i18n:translate="">User Id
-            </th>
-            <th i18n:translate="">Name
-            </th>
-            <th i18n:translate="">Local Role
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="entry view/getUsersWithLocalRoles">
-            <td>
-              <input type="checkbox" name="role_id"
-              tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
-            <td tal:content="entry/user_name"> USERNAME </td>
-            <td tal:content="entry/user_title"> USERTITLE </td>
-            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
-          </tr>
-        </tbody>
-      </table>
-      <div tal:condition="view/availableActions">
-        <span tal:repeat="action view/actions" tal:omit-tag="">
-          <input tal:condition="python:action.label in view.tabthreeactions1"
-                 tal:replace="structure action/render"/>
-        </span>
-      </div><br /><br />
-      <div class="form-inline">
-        <br />
-        <div class="form-group">
-          <select id="user" name="user" class="form-control">
-            <option tal:repeat="user view/getUsers"
-                    tal:attributes="value user/name">
-            <span tal:replace="user/val/title">USERTITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group">
-          <select id="local_role" name="local_role" class="form-control">
-            <option tal:repeat="localrole view/getLocalRoles"
-                    tal:attributes="value localrole/name">
-            <span tal:replace="localrole/title">LOCALROLETITLE
-            </span>
-            </option>
-          </select>
-        </div>
-        <div class="form-group" tal:condition="view/availableActions">
-          <span tal:repeat="action view/actions" tal:omit-tag="">
-            <input tal:condition="python:action.label in view.tabthreeactions2"
-                   tal:replace="structure action/render"/>
-          </span>
-        </div>
-      </div>
-
-    </div>
-  </div>
-</form>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultypage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/facultypage.pt	(revision 11946)
+++ 	(revision )
@@ -1,19 +1,0 @@
-<div i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python: not len(context.keys())">
-There are no subobjects registered yet.
-</div>
-
-<table class="table table-hover" i18n:domain="waeup.kofa">
-  <thead>
-    <tr>
-      <th i18n:translate="">Code</th>
-      <th i18n:translate="">Title</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr tal:repeat="value context/values">
-      <td> <a tal:attributes="href python: view.url(value)">
-          <span tal:content="value/code">Name</span></a></td>
-      <td tal:content="value/longtitle">Title</td>
-    </tr>
-  </tbody>
-</table>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/findstudentspage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/findstudentspage.pt	(revision 11946)
+++ 	(revision )
@@ -1,53 +1,0 @@
-<form method="POST" i18n:domain="waeup.kofa" class="form-inline">
-<br />
-  <div class="form-group">
-    <input class="btn btn-primary" type="submit" name="search"
-      tal:attributes="value view/search_button" />
-  </div>
-  <div class="form-group">
-    <select name="searchtype" class="form-control">
-      <option i18n:translate="" value="student_id">with id</option>
-      <option i18n:translate="" value="fullname">with name</option>
-      <option i18n:translate="" value="reg_number">with registration number</option>
-      <option i18n:translate="" value="matric_number">with matriculation number</option>
-    </select>
-  </div>
-  <div class="form-group">
-    <input type="text" class="form-control" name="searchterm" />
-  </div>
-</form>
-
-<p>&nbsp;</p>
-<div tal:condition="view/hitlist">
-  <h3 i18n:translate="">Search Results</h3>
-  <input type="hidden" name="old_searchterm"
-       tal:attributes="value view/searchterm" />
-  <input type="hidden" name="old_searchtype"
-       tal:attributes="value view/searchtype" />
-  <table class="kofa-data-table dataTable">
-    <thead>
-    <tr>
-      <th i18n:translate="">Student Id</th>
-      <th i18n:translate="">Reg. Number</th>
-      <th i18n:translate="">Matric. Number</th>
-      <th i18n:translate="">State</th>
-      <th i18n:translate="">Full Name</th>
-    </tr>
-    </thead>
-    <tbody>
-    <tr tal:repeat="item view/hitlist">
-      <td> <a tal:attributes="href item/url">
-        <span tal:content="item/student_id">A123456</span></a>
-      </td>
-      <td class="center"> <a tal:attributes="href item/url">
-        <span tal:content="item/reg_number">9999999</span></a>
-      </td>
-      <td class="center"> <a tal:attributes="href item/url">
-        <span tal:content="item/matric_number">9999999</span></a>
-      </td>
-      <td tal:content="item/state">admitted</td>
-      <td tal:content="item/display_fullname">Bob</td>
-    </tr>
-    </tbody>
-  </table>
-</div>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/importxmlaction.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/importxmlaction.pt	(revision 11946)
+++ 	(revision )
@@ -1,9 +1,0 @@
-<span tal:condition="viewlet/can_import"
-      class="yui-button" noclass="actionbarlink">
-  <span class="first-child">
-    <a href="" id="linkbutton1"
-       tal:attributes="href python: view.url(context) + '/importxml'">
-      <img alt="import from XML"
-	   tal:attributes="src static/actionicon_submit.png"/>
-  <span>Import from XML</span></a></span>
-</span>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/importxmlpage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/importxmlpage.pt	(revision 11946)
+++ 	(revision )
@@ -1,17 +1,0 @@
-<div>
-  <h2>Import from XML source</h2>
-
-  <div>
-    Please specify an XML source file
-  </div>
-
-  <div>
-    <form method="post" enctype="multipart/form-data">
-      <input type="file" name="xmlfile:file" />
-      <div>
-	<input type="submit" name="SUBMIT" value="Upload" />
-	<input type="submit" name="CANCEL" value="Cancel" />
-      </div>
-    </form>
-  </div>
-</div>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/searchpage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/searchpage.pt	(revision 11946)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<form method="POST" class="form-inline">
-<br />
-  <div class="form-group">
-      <input type="text" name="query" class="form-control"
-    	 tal:attributes="value view/query" />
-  </div>
-  <div class="form-group">
-    <input class="btn btn-primary" type="submit" name="SUBMIT"
-      tal:attributes="value view/search_button"/>
-  </div>
-</form>
-<br />
-<span  i18n:domain="waeup.kofa" tal:condition="view/hitlist">
-    <h3 i18n:translate="">Search Results</h3>
-    <table class="kofa-data-table dataTable">
-        <thead>
-            <tr>
-                <th i18n:translate="">Code</th>
-                <th i18n:translate="">Title</th>
-                <th i18n:translate="">Faculty</th>
-                <th i18n:translate="">Department</th>
-                <th i18n:translate="">Type</th>
-            </tr>
-        </thead>
-        <tbody>
-            <tr tal:repeat="item view/hitlist"  class="gradeB">
-            <td>
-                <a href="" tal:attributes="href item/url"
-                           tal:content="item/code">CODE</a>
-            </td>
-            <td tal:content="item/title">
-                TITLE
-            </td>
-            <td tal:content="item/fac">
-                FACULTY
-            </td>
-            <td tal:content="item/dep">
-                DEPARTMENT
-            </td>
-            <td tal:content="item/type">
-                TTYPE
-            </td>
-            </tr>
-        </tbody>
-    </table>
-</span>
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/staffsitelayout.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/staffsitelayout.pt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/staffsitelayout.pt	(revision 11947)
@@ -73,25 +73,5 @@
 
     <!-- Diazo element-->
-    <span tal:condition="layout/getStudentName">
-      <div class="wfstatus">
-            <span tal:replace="python:context.student.student_id">
-              Id
-            </span>
-            &bull;
-            <span tal:replace="python:context.student.translated_state">
-              State
-            </span>
-      </div>
-    </span>
-    <!-- /Diazo element-->
-
-    <!-- Diazo element-->
     <div class="sidebar well">
-        <div tal:condition="layout/getStudentName">
-          <div class="kofa-sidebar-title" tal:content="layout/getStudentName">STUDENTNAME</div>
-          <ul class="nav">
-            <tal:left content="structure provider:left_studentmanage" />
-          </ul>
-        </div>
         <div tal:condition="layout/isAuthenticated">
           <div class="kofa-sidebar-title" tal:content="layout/getUserTitle">USERNAME</div>
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/studentsitelayout.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/studentsitelayout.pt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/studentsitelayout.pt	(revision 11947)
@@ -30,5 +30,4 @@
     <ul class="nav kofa-navbar-left">
         <tal:primary_nav content="structure provider:primary_nav" />
-        <tal:primary_nav content="structure provider:primary_nav_student" />
     </ul>
     <!-- /Diazo element-->
@@ -72,18 +71,4 @@
 
     <!-- Diazo element-->
-    <span tal:condition="layout/getStudentName">
-      <div class="wfstatus">
-            <span tal:replace="python:context.student.student_id">
-              Id
-            </span>
-            &bull;
-            <span tal:replace="python:context.student.translated_state">
-              State
-            </span>
-      </div>
-    </span>
-    <!-- /Diazo element-->
-
-    <!-- Diazo element-->
     <div class="kofa-content">
       <div class="actionbar" tal:condition="provider:actionbar">
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/usereditformpage.pt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/usereditformpage.pt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/templates/usereditformpage.pt	(revision 11947)
@@ -18,5 +18,4 @@
         </td>
       </tr>
-      <tal:files content="structure provider:files" />
     </tbody>
   </table>
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/tests/test_browser.py	(revision 11946)
+++ 	(revision )
@@ -1,422 +1,0 @@
-## $Id$
-## 
-## Copyright (C) 2011-2013 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
-##
-"""
-Extends the doctests in browser.txt and datacenter.txt.
-"""
-import shutil
-import tempfile
-import os
-from zc.async.testing import wait_for_result
-from zope.component import createObject, getUtility
-from zope.component.hooks import setSite, clearSite
-from zope.security.interfaces import Unauthorized
-from zope.securitypolicy.interfaces import IPrincipalRoleManager
-from zope.testbrowser.testing import Browser
-from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
-from waeup.kofa.app import University
-from waeup.kofa.interfaces import IJobManager
-from waeup.kofa.tests.test_async import FunctionalAsyncTestCase
-from waeup.kofa.university.faculty import Faculty
-from waeup.kofa.university.department import Department
-
-SAMPLE_FILE = os.path.join(os.path.dirname(__file__), 'test_file.csv')
-FORBIDDEN_FILE = os.path.join(os.path.dirname(__file__), 'forbidden_file.csv')
-
-class UniversitySetup(FunctionalTestCase):
-    # A test case that only contains a setup and teardown
-
-    layer = FunctionalLayer
-
-    def setUp(self):
-        super(UniversitySetup, self).setUp()
-
-        # Setup a sample site for each test
-        app = University()
-        self.dc_root = tempfile.mkdtemp()
-        app['datacenter'].setStoragePath(self.dc_root)
-
-        # Prepopulate the ZODB...
-        self.getRootFolder()['app'] = app
-        # we add the site immediately after creation to the
-        # ZODB. Catalogs and other local utilities are not setup
-        # before that step.
-        self.app = self.getRootFolder()['app']
-        # Set site here. Some of the following setup code might need
-        # to access grok.getSite() and should get our new app then
-        setSite(app)
-
-        # Populate university
-        self.certificate = createObject('waeup.Certificate')
-        self.certificate.code = u'CERT1'
-        self.certificate.application_category = 'basic'
-        self.certificate.study_mode = 'ug_ft'
-        self.certificate.start_level = 100
-        self.certificate.end_level = 500
-        self.certificate.school_fee_1 = 40000.0
-        self.certificate.school_fee_2 = 20000.0
-        self.app['faculties']['fac1'] = Faculty(code='fac1')
-        self.app['faculties']['fac1']['dep1'] = Department(code=u'dep1')
-        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
-            self.certificate)
-        self.course = createObject('waeup.Course')
-        self.course.code = 'COURSE1'
-        self.course.semester = 1
-        self.course.credits = 10
-        self.course.passmark = 40
-        self.app['faculties']['fac1']['dep1'].courses.addCourse(
-            self.course)
-        self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCertCourse(
-            self.course, level=100)
-
-        # Configure university and hostels
-        configuration = createObject('waeup.SessionConfiguration')
-        configuration.academic_session = 2004
-        configuration.clearance_fee = 3456.0
-        configuration.booking_fee = 123.4
-        self.app['configuration'].addSessionConfiguration(configuration)
-
-        # Put the prepopulated site into test ZODB and prepare test
-        # browser
-        self.browser = Browser()
-        self.browser.handleErrors = False
-
-        self.datacenter_path = 'http://localhost/app/datacenter'
-
-    def tearDown(self):
-        super(UniversitySetup, self).tearDown()
-        clearSite()
-        shutil.rmtree(self.dc_root)
-
-class DataCenterUITests(UniversitySetup):
-    # Tests for DataCenter class views and pages
-
-    layer = FunctionalLayer
-
-    def test_anonymous_access(self):
-        self.assertRaises(
-            Unauthorized, self.browser.open, self.datacenter_path)
-        return
-
-    def test_file_download_delete(self):
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.datacenter_path)
-        self.browser.getLink("Upload data").click()
-        file = open(SAMPLE_FILE)
-        ctrl = self.browser.getControl(name='uploadfile:file')
-        file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(file, filename='my_test_data.csv')
-        self.browser.getControl('Upload').click()
-        self.browser.open(self.datacenter_path)
-        self.browser.getLink('my_test_data_zope.mgr.csv').click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.headers['Content-Type'],
-                         'text/csv; charset=UTF-8')
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'datacenter.log')
-        logcontent = open(logfile).read()
-        self.assertTrue('zope.mgr - browser.pages.FileDownloadView - '
-                        'downloaded: my_test_data_zope.mgr.csv' in logcontent)
-        self.browser.open(self.datacenter_path)
-        ctrl = self.browser.getControl(name='val_id')
-        ctrl.getControl(value='my_test_data_zope.mgr.csv').selected = True
-        self.browser.getControl("Remove selected", index=0).click()
-        self.assertTrue('Successfully deleted: my_test_data_zope.mgr.csv'
-            in self.browser.contents)
-        logcontent = open(logfile).read()
-        self.assertTrue('zope.mgr - browser.pages.DatacenterPage - '
-                        'deleted: my_test_data_zope.mgr.csv' in logcontent)
-        return
-
-    def test_forbidden_file_upload(self):
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.datacenter_path)
-        self.browser.getLink("Upload data").click()
-        file = open(FORBIDDEN_FILE)
-        ctrl = self.browser.getControl(name='uploadfile:file')
-        file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(file, filename='my_corrupted_file.csv')
-        self.browser.getControl('Upload').click()
-        self.assertTrue(
-            'Your file contains forbidden characters or'
-            in self.browser.contents)
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'datacenter.log')
-        logcontent = open(logfile).read()
-        self.assertTrue('zope.mgr - browser.pages.DatacenterUploadPage - '
-            'invalid file uploaded:' in logcontent)
-        return
-
-class DataCenterUIExportTests(UniversitySetup, FunctionalAsyncTestCase):
-    # Tests for DataCenter class views and pages
-
-    layer = FunctionalLayer
-
-    def wait_for_export_job_completed(self):
-        # helper function waiting until the current export job is completed
-        manager = getUtility(IJobManager)
-        job_id = self.app['datacenter'].running_exports[0][0]
-        job = manager.get(job_id)
-        wait_for_result(job)
-        return job_id
-
-    def stored_in_datacenter(self, job_id):
-        # tell whether job_id is stored in datacenter's running jobs list
-        for entry in list(self.app['datacenter'].running_exports):
-            if entry[0] == job_id:
-                return True
-        return False
-
-    def trigger_export(self):
-        # helper to start an export. Make sure to remove the result file
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.browser.getLink("Export data").click()
-        self.browser.getControl(name="exporter").value = ['faculties']
-        self.browser.getControl("Create CSV file").click()
-        return
-
-    def cleanup_run_job(self):
-        # helper to remove any result file of an export
-        job_id = self.wait_for_export_job_completed()
-        manager = getUtility(IJobManager)
-        job = manager.get(job_id)
-        if os.path.exists(job.result):
-            shutil.rmtree(os.path.dirname(job.result))
-
-    def test_export_start(self):
-        # we can trigger export file creation
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.datacenter_path)
-        self.browser.getLink("Export data").click()
-        self.browser.getControl(name="exporter").value = ['faculties']
-        self.browser.getControl("Create CSV file").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.cleanup_run_job() # make sure to remove temp dirs
-        return
-
-    def test_export_download(self):
-        # we can download a generated export result
-        self.trigger_export()
-        # while the export file is created, we get a reload button
-        # (or a loading bar if javascript is enabled)...
-        self.assertTrue('Reload' in self.browser.contents)
-        # ...which is displayed as long as the job is not finished.
-        # When the job is finished and we reload the page...
-        job_id = self.wait_for_export_job_completed()
-        self.browser.open(self.datacenter_path + '/export')
-        self.assertFalse('Reload' in self.browser.contents)
-        # ...we can download the result
-        self.browser.getLink("Download").click()
-        self.assertEqual(self.browser.headers['content-type'],
-                         'text/csv; charset=UTF-8')
-        self.assertEqual(self.browser.headers['content-disposition'],
-            'attachment; filename="WAeUP.Kofa_faculties_%s.csv' % job_id)
-        self.assertEqual(self.browser.contents,
-            'code,title,title_prefix,users_with_local_roles\r\n'
-            'fac1,Unnamed Faculty,faculty,[]\r\n')
-        # Thew job can be discarded
-        self.browser.open(self.datacenter_path + '/export')
-        self.browser.getControl("Discard").click()
-        self.assertEqual(len(self.app['datacenter'].running_exports), 0)
-
-        # after download, the job and the result file are removed
-        #manager = getUtility(IJobManager)
-        #result = manager.get(job_id)
-        #self.assertEqual(result, None)
-        #self.assertEqual(self.stored_in_datacenter(job_id), False)
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'datacenter.log')
-        logcontent = open(logfile).read()
-        self.assertTrue('zope.mgr - browser.pages.ExportCSVPage - exported: '
-                        'faculties, job_id=' in logcontent)
-        self.assertTrue('zope.mgr - browser.pages.ExportCSVView - '
-                        'downloaded: WAeUP.Kofa_faculties_%s.csv, job_id=%s'
-                        % (job_id, job_id) in logcontent)
-        return
-
-    def test_export_accesscodes(self):
-        # Create portal manager and an ExportManager
-        self.app['users'].addUser('mrportal', 'mrportalsecret')
-        self.app['users']['mrportal'].email = 'mrportal@foo.ng'
-        self.app['users']['mrportal'].title = 'Carlo Pitter'
-        # Assign PortalManager role
-        prmlocal = IPrincipalRoleManager(self.app)
-        prmlocal.assignRoleToPrincipal('waeup.PortalManager', 'mrportal')
-        self.app['users'].addUser('mrexporter', 'mrexportersecret')
-        self.app['users']['mrexporter'].email = 'mrexporter@foo.ng'
-        self.app['users']['mrexporter'].title = 'Carlos Potter'
-        # Assign ExportManager role
-        prmlocal.assignRoleToPrincipal('waeup.ExportManager', 'mrexporter')
-
-        # Login as portal manager
-        self.browser.open('http://localhost/app/login')
-        self.browser.getControl(name="form.login").value = 'mrportal'
-        self.browser.getControl(name="form.password").value = 'mrportalsecret'
-        self.browser.getControl("Login").click()
-
-        self.browser.open(self.datacenter_path + '/export')
-        self.assertTrue(
-            '<option value="accesscodebatches">' in self.browser.contents)
-        self.assertTrue('<option value="accesscodes">' in self.browser.contents)
-        self.browser.getControl(name="exporter").value = ['accesscodes']
-        self.browser.getControl("Create CSV file").click()
-        job_id = self.wait_for_export_job_completed()
-        self.browser.open(self.datacenter_path + '/@@export')
-        self.browser.getLink("Download").click()
-        self.assertEqual(self.browser.headers['content-type'],
-                         'text/csv; charset=UTF-8')
-        self.assertEqual(
-            'batch_num,batch_prefix,batch_serial,cost,history,owner,'
-            'random_num,representation,state\r\n',
-            self.browser.contents)
-
-        # Thew job can be discarded
-        self.browser.open(self.datacenter_path + '/export')
-        self.browser.getControl("Discard").click()
-        self.assertEqual(len(self.app['datacenter'].running_exports), 0)
-
-        # Login as officer who is not allowed to download accesscodes
-        self.browser.open('http://localhost/app/login')
-        self.browser.getControl(name="form.login").value = 'mrexporter'
-        self.browser.getControl(name="form.password").value = 'mrexportersecret'
-        self.browser.getControl("Login").click()
-
-        self.browser.open(self.datacenter_path + '/export')
-        # The Export Manager can see the accesscodebatches exporter ...
-        self.assertTrue(
-            '<option value="accesscodebatches">' in self.browser.contents)
-        # ... but not the accesscodes exporter.
-        self.assertFalse('<option value="accesscodes">'
-                         in self.browser.contents)
-
-    def test_export_students(self):
-        # we can trigger export file creation
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.datacenter_path)
-        self.browser.getLink("Export data").click()
-        self.browser.getLink("configuration page").click()
-        self.browser.getControl(name="exporter").value = ['students']
-        self.browser.getControl(name="session").value = ['all']
-        self.browser.getControl(name="level").value = ['all']
-        self.browser.getControl(name="mode").value = ['all']
-        self.browser.getControl("Create CSV file").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        job_id = self.wait_for_export_job_completed()
-        self.browser.open(self.datacenter_path + '/export')
-        self.browser.getLink("Download").click()
-        self.assertEqual(self.browser.headers['content-type'],
-          'text/csv; charset=UTF-8')
-        self.assertEqual(self.browser.headers['content-disposition'],
-          'attachment; filename="WAeUP.Kofa_students_%s.csv' % job_id)
-        # No students yet
-        self.assertEqual(self.browser.contents,
-            'adm_code,clearance_locked,clr_code,date_of_birth,email,'
-            'employer,firstname,lastname,matric_number,middlename,'
-            'nationality,officer_comment,perm_address,personal_updated,'
-            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
-            'transcript_comment,'
-            'password,state,history,certcode,is_postgrad,current_level,'
-            'current_session\r\n')
-        self.cleanup_run_job()
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'datacenter.log')
-        logcontent = open(logfile).read()
-        self.assertTrue(
-            'zope.mgr - students.browser.DatacenterExportJobContainerJobConfig '
-            '- exported: students (None, None, None, None, None, None, None), '
-            'job_id=%s'
-            % job_id in logcontent)
-        self.assertTrue(
-            'zope.mgr - browser.pages.ExportCSVView '
-            '- downloaded: WAeUP.Kofa_students_%s.csv, job_id=%s'
-            % (job_id, job_id) in logcontent)
-        return
-
-    def test_export_discard(self):
-        # we can discard a generated export result
-        self.trigger_export()
-        self.wait_for_export_job_completed()
-        self.browser.open(self.datacenter_path + '/@@export')
-        self.browser.getControl("Discard").click()
-        self.assertTrue('Discarded export' in self.browser.contents)
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'datacenter.log')
-        logcontent = open(logfile).read()
-        self.assertTrue(
-            'zope.mgr - browser.pages.ExportCSVPage - discarded: job_id='
-            in logcontent)
-        return
-
-    def test_skeleton_download(self):
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.datacenter_path)
-        self.browser.getLink("Upload data").click()
-        self.browser.getLink(url='skeleton?name=facultyprocessor').click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.headers['Content-Type'],
-                         'text/csv; charset=UTF-8')
-        self.assertEqual(self.browser.contents,
-            'code,local_roles,title,title_prefix\r\n')
-        return
-
-class SupplementaryBrowserTests(UniversitySetup):
-    # These are additional tests to browser.txt
-
-    def test_set_former_course(self):
-        # A certificate course will be automatically removed when the
-        # former_course attribute of the corresponding course is set.
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.assertTrue('COURSE1_100' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        self.browser.open(
-            'http://localhost/app/faculties/fac1/dep1/courses/COURSE1/manage')
-        self.browser.getControl(name="form.former_course").value = ['selected']
-        self.browser.getControl("Save").click()
-        self.assertFalse('COURSE1_100' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        return
-
-    def test_remove_course(self):
-        # We add a second certificate course which refers
-        # to the same course but at a different level.
-        self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCertCourse(
-            self.course, level=210)
-        # Both certificate courses will be automatically removed when
-        # the corresponding course is removed.
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.assertTrue('COURSE1_100' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        self.assertTrue('COURSE1_210' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        self.browser.open('http://localhost/app/faculties/fac1/dep1/manage')
-        ctrl = self.browser.getControl(name='val_id')
-        ctrl.getControl(value='COURSE1').selected = True
-        self.browser.getControl("Remove selected", index=0).click()
-        self.assertFalse('COURSE1_100' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        self.assertFalse('COURSE1_210' in self.app[
-            'faculties']['fac1']['dep1'].certificates['CERT1'])
-        return
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/tests/test_permissions.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/tests/test_permissions.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/tests/test_permissions.py	(revision 11947)
@@ -38,23 +38,9 @@
 manager_pages = [
     # The pages that should only be accessible by manager...
-    '/@@manage', '/@@administration', '/faculties/@@search',
+    '/@@manage', '/@@administration',
     '/users/@@index', '/users/@@add', '/users/alice/@@manage',
     '/datacenter/@@index', '/datacenter/@@upload', '/datacenter/@@import1',
     '/datacenter/@@import2', '/datacenter/@@import3', '/datacenter/@@import4',
     '/datacenter/@@logs', '/datacenter/@@show', '/datacenter/@@manage',
-    '/faculties/@@index', '/faculties/@@add', '/faculties/@@manage',
-    '/faculties/fac1/@@index', '/faculties/fac1/@@manage',
-    '/faculties/fac1/@@add',
-    '/faculties/fac1/dept1/@@index',
-    '/faculties/fac1/dept1/@@manage',
-    '/faculties/fac1/dept1/@@addcourse',
-    '/faculties/fac1/dept1/@@addcertificate',
-    '/faculties/fac1/dept1/courses/crs1/@@index',
-    '/faculties/fac1/dept1/courses/crs1/@@manage',
-    '/faculties/fac1/dept1/certificates/cert1/@@index',
-    '/faculties/fac1/dept1/certificates/cert1/@@manage',
-    '/faculties/fac1/dept1/certificates/cert1/@@addcertificatecourse',
-    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@index',
-    '/faculties/fac1/dept1/certificates/cert1/crs1_100/@@manage',
     ]
 public_pages = [
@@ -79,17 +65,4 @@
         app['datacenter'].setStoragePath(self.dc_root)
         app['users'].addUser('alice', 'alice')
-        fac1 = createObject('waeup.Faculty')
-        fac1.code = "fac1"
-        app['faculties'].addFaculty(fac1)
-        dept = createObject('waeup.Department')
-        dept.code = 'dept1'
-        fac1.addDepartment(dept)
-        course = createObject('waeup.Course')
-        course.code = 'crs1'
-        dept.courses.addCourse(course)
-        cert = createObject('waeup.Certificate')
-        cert.code = 'cert1'
-        dept.certificates.addCertificate(cert)
-        cert.addCertCourse(course)
 
         self.browser = Browser()
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/viewlets.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/viewlets.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/browser/viewlets.py	(revision 11947)
@@ -24,10 +24,8 @@
 from zope.traversing.browser import absoluteURL
 from waeup.kofa.browser.pages import (
-    UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage,
-    DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage,
+    UniversityPage, DatacenterPage,
     UsersContainerPage, UserManageFormPage)
 from waeup.kofa.browser.interfaces import (
-    IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate,
-    ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer)
+    IBreadcrumbContainer, IUniversity, IUsersContainer)
 from waeup.kofa.interfaces import (
     IKofaUtils, IKofaObject, IKofaXMLExporter,
@@ -399,181 +397,4 @@
     grok.order(1)
 
-class ManageFacultiesContainerActionButton(ManageActionButton):
-    """ 'Manage settings' button for faculties.
-    """
-    grok.context(IFacultiesContainer)
-    grok.view(FacultiesContainerPage)
-    text = _('Manage academic section')
-
-class ExportFacultiesStudentsActionButton(ManageActionButton):
-    """ 'Export student data' button for faculties.
-    """
-    grok.context(IFacultiesContainer)
-    grok.view(FacultiesContainerPage)
-    grok.name('exportfacultystudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_down.png'
-    text = _('Export student data')
-    target = 'exports'
-    grok.order(3)
-
-class SearchFacultiesContainerActionButton(ManageActionButton):
-    """ 'Manage settings' button for faculties.
-    """
-    grok.context(IFacultiesContainer)
-    grok.view(FacultiesContainerPage)
-    text = _('Search academic section')
-    icon = 'actionicon_search.png'
-    target = '@@search'
-    
-class ManageFacultyActionButton(ManageActionButton):
-    """ 'Manage settings' button for faculties.
-    """
-    grok.context(IFaculty)
-    grok.view(FacultyPage)
-    text = _('Manage faculty')
-
-class StudentSearchActionButton(ManageActionButton):
-    grok.order(2)
-    grok.context(IFaculty)
-    grok.view(FacultyPage)
-    grok.name('findstudents')
-    grok.require('waeup.showStudents')
-    text = _('Find students')
-    icon = 'actionicon_search.png'
-    target = 'find_students'
-
-class ManageDepartmentActionButton(ManageActionButton):
-    """ 'Manage settings' button for departments.
-    """
-    grok.context(IDepartment)
-    grok.view(DepartmentPage)
-    text = _('Manage department')
-    grok.order(1)
-
-class ShowDepartmentStudentsActionButton(ManageActionButton):
-    """ 'Show students' button for departments.
-    """
-    grok.context(IDepartment)
-    grok.view(DepartmentPage)
-    grok.name('showdepartmentstudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_student.png'
-    text = _('Show students')
-    target = 'students'
-    grok.order(2)
-
-class ExportDepartmentStudentsActionButton(ManageActionButton):
-    """ 'Export student data' button for departments.
-    """
-    grok.context(IDepartment)
-    grok.view(DepartmentPage)
-    grok.name('exportdepartmentstudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_down.png'
-    text = _('Export student data')
-    target = 'exports'
-    grok.order(3)
-
-class ClearDepartmentStudentsActionButton(ManageActionButton):
-    """ 'Clear all students' button for departments.
-    """
-    grok.context(IDepartment)
-    grok.view(DepartmentPage)
-    grok.name('cleardepartmentstudents')
-    grok.require('waeup.clearAllStudents')
-    icon = 'actionicon_accept.png'
-    text = _('Clear all students')
-    target = 'clearallstudents'
-    grok.order(4)
-
-    @property
-    def onclick(self):
-        return "return window.confirm(%s);" % _(
-            "'All students, who requested clearance in this department, will be cleared. Are you sure?'")
-
-class ManageCourseActionButton(ManageActionButton):
-    """ 'Edit settings' button for courses.
-    """
-    grok.context(ICourse)
-    grok.view(CoursePage)
-    text = _('Edit course')
-    grok.order(1)
-    
-class ShowCourseStudentsActionButton(ManageActionButton):
-    """ 'Show students' button in course.
-    """
-    grok.context(ICourse)
-    grok.view(CoursePage)
-    grok.name('showcoursestudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_student.png'
-    text = _('Show students')
-    target = 'students'
-    grok.order(2)
-
-class ExportCourseStudentsActionButton(ManageActionButton):
-    """ 'Export student data' button for courses.
-    """
-    grok.context(ICourse)
-    grok.view(CoursePage)
-    grok.name('exportcoursestudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_down.png'
-    text = _('Export student data')
-    target = 'exports'
-    grok.order(3)
-
-class UpdateScoresActionButton(ManageActionButton):
-    """ 'Update scores' button in course.
-    """
-    grok.context(ICourse)
-    grok.view(CoursePage)
-    grok.name('updatescores')
-    grok.require('waeup.editScores')
-    icon = 'actionicon_scores.png'
-    text = _('Update scores')
-    target = 'edit_scores'
-    grok.order(4)
-
-class ManageCertificateActionButton(ManageActionButton):
-    """ 'Manage settings' button for certificates.
-    """
-    grok.context(ICertificate)
-    grok.view(CertificatePage)
-    text = _('Manage certificate')
-    grok.order(1)
-
-class ShowCertificateStudentsActionButton(ManageActionButton):
-    """ 'Show students' button for certificates.
-    """
-    grok.context(ICertificate)
-    grok.view(CertificatePage)
-    grok.name('showcertificatestudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_student.png'
-    text = _('Show students')
-    target = 'students'
-    grok.order(2)
-
-class ExportCertificateStudentsActionButton(ManageActionButton):
-    """ 'Export student data' button for certificates.
-    """
-    grok.context(ICertificate)
-    grok.view(CertificatePage)
-    grok.name('exportcertificatestudents')
-    grok.require('waeup.showStudents')
-    icon = 'actionicon_down.png'
-    text = _('Export student data')
-    target = 'exports'
-    grok.order(3)
-
-class ManageCertificateCourseActionButton(ManageActionButton):
-    """ 'Manage settings' button for certificate courses.
-    """
-    grok.context(ICertificateCourse)
-    grok.view(CertificateCoursePage)
-    text = _('Edit certificate course')
-
 class AddUserActionButton(AddActionButton):
     grok.require('waeup.manageUsers')
@@ -676,18 +497,5 @@
 #    tab_title = u'Home'
 
-class FacultiesTab(PrimaryNavTab):
-    """Faculties-tab in primary navigation.
-    """
-    grok.order(2)
-    grok.require('waeup.viewAcademics')
-
-    pnav = 1
-    tab_title = _(u'Academics')
-
-    @property
-    def link_target(self):
-        return self.view.application_url('faculties')
-
-    
+
 class EnquiriesTab(PrimaryNavTab):
     """Contact tab in primary navigation.
@@ -793,50 +601,2 @@
         super(SubobjectLister, self).update()
         return
-
-
-class FacultiesContainerListHead(grok.Viewlet):
-    """The header line of faculty container subobject lists.
-    """
-    grok.order(1)
-    grok.viewletmanager(SubobjectLister)
-    grok.context(IFacultiesContainer)
-    grok.require('waeup.viewAcademics')
-
-    def render(self):
-        return u'<th>Code</th><th>Title</th><th></th>'
-
-class FacultyListName(grok.Viewlet):
-    """Display a the title of a faculty as link in a list.
-    """
-    grok.order(1)
-    grok.viewletmanager(SubobjectLister)
-    grok.context(IFaculty)
-    grok.require('waeup.viewAcademics')
-
-    def render(self):
-        return u'<a href="%s">%s</a>' % (
-            self.view.url(self.context), self.context.__name__)
-
-class FacultyListTitle(grok.Viewlet):
-    """Display the title of a faculty in a list.
-    """
-    grok.order(2)
-    grok.viewletmanager(SubobjectLister)
-    grok.context(IFaculty)
-    grok.require('waeup.viewAcademics')
-
-    def render(self):
-        return self.context.title
-
-class FacultyRemoveButton(grok.Viewlet):
-    """Render a remove button for faculty lists.
-    """
-    grok.order(3)
-    grok.viewletmanager(SubobjectLister)
-    grok.context(IFaculty)
-    grok.require('waeup.manageAcademics')
-
-    def render(self):
-        return u'<div class="text-right"><form method="POST">' + \
-            '<input class="text-right" type="submit" value="remove" />' + \
-            '</form></div>'
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/configuration.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/configuration.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/configuration.py	(revision 11947)
@@ -24,5 +24,5 @@
 from waeup.kofa.interfaces import (
     ISessionConfiguration, IConfigurationContainer, ISessionConfigurationAdd,
-    academic_sessions_vocab)
+    application_sessions_vocab)
 from waeup.kofa.utils.helpers import attrs_to_fields
 
@@ -41,5 +41,5 @@
                 'ConfigurationContainers contain only '
                 'ISessionConfiguration instances')
-        code = unicode(sessionconfiguration.academic_session)
+        code = unicode(sessionconfiguration.application_session)
         self[code] = sessionconfiguration
         return
@@ -55,5 +55,5 @@
 
     def getSessionString(self):
-        return academic_sessions_vocab.getTerm(self.academic_session).title
+        return application_sessions_vocab.getTerm(self.application_session).title
 
 SessionConfiguration = attrs_to_fields(SessionConfiguration)
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/imagestorage.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/imagestorage.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/imagestorage.py	(revision 11947)
@@ -20,5 +20,5 @@
 A few words about storing files with ``waeup.kofa``. The need for this
 feature arised initially from the need to store passport files for
-applicants and students. These files are dynamic (can be changed
+customers. These files are dynamic (can be changed
 anytime), mean a lot of traffic and cost a lot of memory/disk space.
 
@@ -97,6 +97,6 @@
 
 The file store supports special handling for certain files. For
-example we want applicant images to be stored in a different directory
-than student images, etc. Because the file store cannot know all
+example we want some customer images to be stored in a different directory
+than other customer images, etc. Because the file store cannot know all
 details about these special treatment of certain files, it looks up
 helpers (handlers) to provide the information it needs for really
@@ -120,5 +120,5 @@
 
 Examples for such a file store handler can be found in the
-:mod:`waeup.kofa.applicants.applicant` module. Please see also the
+:mod:`waeup.kofa.customers.customer` module. Please see also the
 :class:`DefaultFileStoreHandler` class below for more details.
 
@@ -169,14 +169,14 @@
 
 Often the internal filename or file id of a file depends on a
-context. For example when we store passport photographs of applicants,
-then each image belongs to a certain applicant instance. It is not
-difficult to maintain such a connection manually: Say every applicant
+context. For example when we store passport photographs of customers,
+then each image belongs to a certain customer instance. It is not
+difficult to maintain such a connection manually: Say every customer
 had an id, then we could put this id into the filename as well and
 would build the filename to store/get the connected file by using that
 filename. You then would create filenames of a format like this::
 
-  __<MARKER-STRING>__applicant0001
-
-where ``applicant0001`` would tell exactly which applicant you can see
+  __<MARKER-STRING>__customer0001
+
+where ``customer0001`` would tell exactly which customer you can see
 on the photograph. You notice that the internal file id might have
 nothing to do with once uploaded filenames. The id above could have
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/interfaces.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/interfaces.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/interfaces.py	(revision 11947)
@@ -84,10 +84,10 @@
             SimpleTerm(value, value, title) for title, value in terms])
 
-def academic_sessions():
+def application_sessions():
     curr_year = datetime.now().year
     year_range = range(1995, curr_year + 2)
     return [('%s/%s' % (year,year+1), year) for year in year_range]
 
-academic_sessions_vocab = SimpleKofaVocabulary(*academic_sessions())
+application_sessions_vocab = SimpleKofaVocabulary(*application_sessions())
 
 registration_states_vocab = SimpleKofaVocabulary(
@@ -145,10 +145,4 @@
         return dict(getUtility(IKofaUtils).EXAM_GRADES)[value]
 
-class DisablePaymentGroupSource(ContextualDictSourceFactoryBase):
-    """A source for filtering groups of students
-    """
-    #: name of dict to deliver from kofa utils.
-    DICT_NAME = 'DISABLE_PAYMENT_GROUP_DICT'
-
 # Define a validation method for email addresses
 class NotAnEmailAddress(schema.ValidationError):
@@ -278,5 +272,5 @@
         """Send credentials as email.
 
-        Input is the applicant for which credentials are sent and the
+        Input is the customer for which credentials are sent and the
         password.
 
@@ -531,5 +525,5 @@
         title = _(u'Public Name'),
         description = u"Substitute for officer's real name "
-                       "in student object histories.",
+                       "in object histories.",
         required = False,)
 
@@ -655,26 +649,4 @@
         )
 
-    carry_over = schema.Bool(
-        title = _(u'Carry-over Course Registration'),
-        default = False,
-        )
-
-    current_academic_session = schema.Choice(
-        title = _(u'Current Academic Session'),
-        description = _(u'Session for which score editing is allowed'),
-        source = academic_sessions_vocab,
-        default = None,
-        required = False,
-        readonly = False,
-        )
-
-    next_matric_integer = schema.Int(
-        title = _(u'Next Matriculation Number Integer'),
-        description = _(u'Integer used for constructing the next '
-                         'matriculation number'),
-        default = 0,
-        readonly = False,
-        required = False,
-        )
 
 class ISessionConfiguration(IKofaObject):
@@ -682,7 +654,7 @@
     """
 
-    academic_session = schema.Choice(
-        title = _(u'Academic Session'),
-        source = academic_sessions_vocab,
+    application_session = schema.Choice(
+        title = _(u'Period'),
+        source = application_sessions_vocab,
         default = None,
         required = True,
@@ -690,47 +662,4 @@
         )
 
-    application_fee = schema.Float(
-        title = _(u'Application Fee'),
-        default = 0.0,
-        required = False,
-        )
-
-    clearance_fee = schema.Float(
-        title = _(u'Acceptance Fee'),
-        default = 0.0,
-        required = False,
-        )
-
-    booking_fee = schema.Float(
-        title = _(u'Bed Booking Fee'),
-        default = 0.0,
-        required = False,
-        )
-
-    maint_fee = schema.Float(
-        title = _(u'Rent (fallback)'),
-        default = 0.0,
-        required = False,
-        )
-
-    transcript_fee = schema.Float(
-        title = _(u'Transcript Fee'),
-        default = 0.0,
-        required = False,
-        )
-
-    clearance_enabled = schema.Bool(
-        title = _(u'Clearance enabled'),
-        default = False,
-        )
-
-    payment_disabled = schema.List(
-        title = _(u'Payment disabled'),
-        value_type = schema.Choice(
-            source = DisablePaymentGroupSource(),
-            ),
-        required = False,
-        default = [],
-        )
 
     def getSessionString():
@@ -743,7 +672,7 @@
     """
 
-    academic_session = schema.Choice(
+    application_session = schema.Choice(
         title = _(u'Academic Session'),
-        source = academic_sessions_vocab,
+        source = application_sessions_vocab,
         default = None,
         required = True,
@@ -751,6 +680,6 @@
         )
 
-ISessionConfigurationAdd['academic_session'].order =  ISessionConfiguration[
-    'academic_session'].order
+ISessionConfigurationAdd['application_session'].order =  ISessionConfiguration[
+    'application_session'].order
 
 class IDataCenter(IKofaObject):
@@ -873,5 +802,5 @@
     needing to know about that parts. The site simply collects all
     available plugins, calls them and the plugins care for their
-    respective subarea like the applicants area or the datacenter
+    respective subarea like the cutomers area or the datacenter
     area.
 
@@ -1112,5 +1041,5 @@
         interpret `attr` as a hint for what type of file for a given
         context should be stored if there are several types
-        possible. For instance for a certain student some file could
+        possible. For instance for a certain customer some file could
         be the connected passport photograph or some certificate scan
         or whatever. Each of them has to be stored in a different
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/container.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/container.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/container.py	(revision 11947)
@@ -56,5 +56,5 @@
     def setup(self, site, name, logger):
         if 'mandates' in site.keys():
-            logger.warn('Could not create container for faculties in Kofa.')
+            logger.warn('Could not create container for mandates in Kofa.')
             return
         site['mandates'] = MandatesContainer()
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/tests.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/tests.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/mandates/tests.py	(revision 11947)
@@ -85,5 +85,5 @@
         shutil.rmtree(self.dc_root)
 
-    def test_set_student_password(self):
+    def xx_test_set_student_password(self):
         student = createObject('waeup.Student')
         # Add and execute a mandate with missing parameters.
@@ -129,20 +129,4 @@
         self.assertTrue('system - PasswordMandate used: bob' in logcontent)
 
-    def test_set_applicant_password(self):
-        applicant = createObject('waeup.Applicant')
-        applicant.applicant_id = u'abc'
-        mandate = PasswordMandate()
-        mandate.params['user'] = applicant
-        mandate.params['password'] = 'mypwd1'
-        self.app['mandates'].addMandate(mandate)
-        msg = mandate.execute()
-        # Password has been set.
-        self.assertEqual(msg, 'Password has been successfully set. Login with your new password.')
-        self.assertTrue(IUserAccount(applicant).checkPassword('mypwd1'))
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'main.log')
-        logcontent = open(logfile).read()
-        self.assertTrue('system - PasswordMandate used: abc' in logcontent)
-
     def test_remove_expired(self):
         # mandate1 is an old mandate which just expired.
@@ -159,5 +143,5 @@
         self.assertEqual([i for i in self.app['mandates'].keys()], [u'23456'])
 
-    def test_browser(self):
+    def xx_test_browser(self):
         student = createObject('waeup.Student')
         self.app['students'].addStudent(student)
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/payments/interfaces.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/payments/interfaces.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/payments/interfaces.py	(revision 11947)
@@ -19,5 +19,5 @@
 from zope import schema
 from waeup.kofa.interfaces import (
-    IKofaObject, SimpleKofaVocabulary, academic_sessions_vocab,
+    IKofaObject, SimpleKofaVocabulary, application_sessions_vocab,
     ContextualDictSourceFactoryBase)
 from waeup.kofa.interfaces import MessageFactory as _
@@ -68,5 +68,5 @@
     p_session = schema.Choice(
         title = _(u'Payment Session'),
-        source = academic_sessions_vocab,
+        source = application_sessions_vocab,
         required = True,
         )
@@ -133,18 +133,2 @@
     def approve():
         "Approve an online payment and set to paid."
-
-class IPayer(IKofaObject):
-    """An interface for an adapter to publish student and applicant data
-    through a simple webservice.
-
-    """
-    display_fullname = Attribute('Name of  payer')
-    id = Attribute('Id of payer')
-    reg_number = Attribute('Reg number of payer')
-    matric_number = Attribute('Matric number of payer')
-    faculty = Attribute('Faculty of payer')
-    department = Attribute('Department of payer')
-    email= Attribute('Email of payer')
-    phone= Attribute('Phone number of payer')
-    current_mode= Attribute('Current study mode of payer')
-    current_level= Attribute('Current level of payer')
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.py	(revision 11947)
@@ -44,9 +44,9 @@
     grok.name('waeup.Authenticated')
 
-class ViewAcademicsPermission(grok.Permission):
-    grok.name('waeup.viewAcademics')
-
-class ManageAcademicsPermission(grok.Permission):
-    grok.name('waeup.manageAcademics')
+class ViewProductsPermission(grok.Permission):
+    grok.name('waeup.viewProducts')
+
+class ManageProductsPermission(grok.Permission):
+    grok.name('waeup.manageProducts')
 
 class ManagePortal(grok.Permission):
@@ -56,13 +56,4 @@
     grok.name('waeup.manageUsers')
 
-class ShowStudents(grok.Permission):
-    grok.name('waeup.showStudents')
-
-class ClearAllStudents(grok.Permission):
-    grok.name('waeup.clearAllStudents')
-
-class EditScores(grok.Permission):
-    grok.name('waeup.editScores')
-
 class EditUser(grok.Permission):
     grok.name('waeup.editUser')
@@ -104,166 +95,4 @@
 
 # Local Roles
-class ApplicationsManager(grok.Role):
-    grok.name('waeup.local.ApplicationsManager')
-    grok.title(u'Applications Manager')
-    grok.permissions('waeup.viewAcademics')
-
-class DepartmentManager(grok.Role):
-    grok.name('waeup.local.DepartmentManager')
-    grok.title(u'Department Manager')
-    grok.permissions('waeup.manageAcademics',
-                     'waeup.showStudents',
-                     'waeup.exportData')
-
-class DepartmentOfficer(grok.Role):
-    grok.name('waeup.local.DepartmentOfficer')
-    grok.title(u'Department Officer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportPaymentsOverview')
-
-class ClearanceOfficer(grok.Role):
-    """The clearance officer role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.ClearanceOfficer')
-    grok.title(u'Clearance Officer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData',
-                     'waeup.clearAllStudents')
-
-class LocalStudentsManager(grok.Role):
-    """The local students manager role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.LocalStudentsManager')
-    grok.title(u'Students Manager')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class LocalWorkflowManager(grok.Role):
-    """The local workflow manager role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.LocalWorkflowManager')
-    grok.title(u'Student Workflow Manager')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class UGClearanceOfficer(grok.Role):
-    """The clearance officer role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.UGClearanceOfficer')
-    grok.title(u'UG Clearance Officer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData',
-                     'waeup.clearAllStudents')
-
-class PGClearanceOfficer(grok.Role):
-    """The clearance officer role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.PGClearanceOfficer')
-    grok.title(u'PG Clearance Officer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData',
-                     'waeup.clearAllStudents')
-
-class CourseAdviser100(grok.Role):
-    """The 100 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser100')
-    grok.title(u'Course Adviser 100L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser200(grok.Role):
-    """The course 200 level adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser200')
-    grok.title(u'Course Adviser 200L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser300(grok.Role):
-    """The 300 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser300')
-    grok.title(u'Course Adviser 300L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser400(grok.Role):
-    """The 400 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser400')
-    grok.title(u'Course Adviser 400L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser500(grok.Role):
-    """The 500 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser500')
-    grok.title(u'Course Adviser 500L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser600(grok.Role):
-    """The 600 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser600')
-    grok.title(u'Course Adviser 600L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser700(grok.Role):
-    """The 700 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser700')
-    grok.title(u'Course Adviser 700L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class CourseAdviser800(grok.Role):
-    """The 800 level course adviser role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.CourseAdviser800')
-    grok.title(u'Course Adviser 800L')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
-
-class Lecturer(grok.Role):
-    """The lecturer role is meant for the
-    assignment of dynamic roles only.
-    """
-    grok.name('waeup.local.Lecturer')
-    grok.title(u'Lecturer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.editScores',
-                     'waeup.viewAcademics',
-                     'waeup.exportData')
 
 class Owner(grok.Role):
@@ -273,19 +102,14 @@
 
 # Site Roles
-class AcademicsOfficer(grok.Role):
-    grok.name('waeup.AcademicsOfficer')
-    grok.title(u'Academics Officer (view only)')
-    grok.permissions('waeup.viewAcademics')
-
-class AcademicsManager(grok.Role):
-    grok.name('waeup.AcademicsManager')
-    grok.title(u'Academics Manager')
-    grok.permissions('waeup.viewAcademics',
-                     'waeup.manageAcademics')
-
-class ACManager(grok.Role):
-    grok.name('waeup.ACManager')
-    grok.title(u'Access Code Manager')
-    grok.permissions('waeup.manageACBatches')
+class ProductsOfficer(grok.Role):
+    grok.name('waeup.ProductsOfficer')
+    grok.title(u'Products Officer (view only)')
+    grok.permissions('waeup.viewProducts')
+
+class ProductssManager(grok.Role):
+    grok.name('waeup.ProductsManager')
+    grok.title(u'Products Manager')
+    grok.permissions('waeup.viewProducts',
+                     'waeup.manageProducts')
 
 class DataCenterManager(grok.Role):
@@ -306,11 +130,4 @@
                      'waeup.exportData')
 
-class BursaryOfficer(grok.Role):
-    grok.name('waeup.BursaryOfficer')
-    grok.title(u'Bursary Officer')
-    grok.permissions('waeup.showStudents',
-                     'waeup.viewAcademics',
-                     'waeup.exportBursaryData')
-
 class UsersManager(grok.Role):
     grok.name('waeup.UsersManager')
@@ -329,5 +146,5 @@
     grok.permissions('waeup.managePortal',
                      'waeup.manageUsers',
-                     'waeup.viewAcademics', 'waeup.manageAcademics',
+                     'waeup.viewProducts', 'waeup.manageProducts',
                      'waeup.manageACBatches',
                      'waeup.manageDataCenter',
@@ -335,19 +152,6 @@
                      'waeup.exportData',
                      'waeup.viewTranscript',
-                     'waeup.managePortalConfiguration', 'waeup.viewApplication',
-                     'waeup.manageApplication', 'waeup.handleApplication',
-                     'waeup.viewApplicantsTab', 'waeup.payApplicant',
-                     'waeup.viewApplicationStatistics',
-                     'waeup.viewStudent', 'waeup.manageStudent',
-                     'waeup.clearStudent', 'waeup.payStudent',
-                     'waeup.uploadStudentFile', 'waeup.showStudents',
-                     'waeup.clearAllStudents',
-                     'waeup.editScores',
-                     'waeup.triggerTransition',
-                     'waeup.viewStudentsContainer','waeup.viewStudentsTab',
-                     'waeup.handleAccommodation',
-                     'waeup.viewHostels', 'waeup.manageHostels',
+                     'waeup.managePortalConfiguration',
                      'waeup.editUser',
-                     'waeup.loginAsStudent',
                      'waeup.manageReports',
                      'waeup.manageJobs',
@@ -363,5 +167,5 @@
     grok.permissions(#'waeup.managePortal',
                      #'waeup.manageUsers',
-                     'waeup.viewAcademics', 'waeup.manageAcademics',
+                     'waeup.viewProducts', 'waeup.manageProducts',
                      #'waeup.manageACBatches',
                      'waeup.manageDataCenter',
@@ -369,19 +173,6 @@
                      'waeup.exportData',
                      'waeup.viewTranscript',
-                     'waeup.managePortalConfiguration', 'waeup.viewApplication',
-                     'waeup.manageApplication', 'waeup.handleApplication',
-                     'waeup.viewApplicantsTab', 'waeup.payApplicant',
-                     'waeup.viewApplicationStatistics',
-                     'waeup.viewStudent', 'waeup.manageStudent',
-                     'waeup.clearStudent', 'waeup.payStudent',
-                     'waeup.uploadStudentFile', 'waeup.showStudents',
-                     'waeup.clearAllStudents',
-                     'waeup.editScores',
-                     #'waeup.triggerTransition',
-                     'waeup.viewStudentsContainer','waeup.viewStudentsTab',
-                     'waeup.handleAccommodation',
-                     'waeup.viewHostels', 'waeup.manageHostels',
+                     'waeup.managePortalConfiguration',
                      #'waeup.editUser',
-                     #'waeup.loginAsStudent',
                      'waeup.manageReports',
                      #'waeup.manageJobs',
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.txt
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.txt	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/permissions.txt	(revision 11947)
@@ -29,5 +29,5 @@
 
     >>> sorted(list(get_all_roles()))
-    [(u'waeup.ACManager', <waeup.kofa.permissions.ACManager object at 0x...]
+    [(u'waeup.DataCenterManager', <waeup.kofa.permissions.DataCenterManager object at 0x...]
 
 :func:`get_waeup_roles`
@@ -39,8 +39,8 @@
     >>> from waeup.kofa.permissions import get_waeup_roles
     >>> len(list(get_waeup_roles()))
-    22
+    9
 
     >>> len(list(get_waeup_roles(also_local=True)))
-    42
+    10
 
 
@@ -53,26 +53,13 @@
     >>> from waeup.kofa.permissions import get_waeup_role_names
     >>> list(get_waeup_role_names())
-    [u'waeup.ACManager',
-     u'waeup.AcademicsManager',
-     u'waeup.AcademicsOfficer',
-     u'waeup.AccommodationOfficer',
-     u'waeup.Applicant',
-     u'waeup.ApplicationsManager',
-     u'waeup.ApplicationsOfficer',
-     u'waeup.BursaryOfficer',
-     u'waeup.DataCenterManager',
-     u'waeup.ExportManager',
-     u'waeup.ImportManager',
-     u'waeup.PortalManager',
-     u'waeup.Student',
-     u'waeup.StudentImpersonator',
-     u'waeup.StudentsClearanceOfficer',
-     u'waeup.StudentsCourseAdviser',
-     u'waeup.StudentsManager',
-     u'waeup.StudentsOfficer',
-     u'waeup.TranscriptOfficer',
-     u'waeup.UsersManager',
-     u'waeup.WorkflowManager',
-     u'waeup.xmlrpcusers1']
+    [u'waeup.DataCenterManager',
+    u'waeup.ExportManager',
+    u'waeup.ImportManager',
+    u'waeup.PortalManager',
+    u'waeup.ProductsManager',
+    u'waeup.ProductsOfficer',
+    u'waeup.UsersManager',
+    u'waeup.WorkflowManager',
+    u'waeup.xmlrpcusers1']
 
 :func:`get_users_with_local_roles`
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/tests/test_app.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/tests/test_app.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/tests/test_app.py	(revision 11947)
@@ -57,12 +57,4 @@
         return
 
-    def test_update_plugins(self):
-        # We can update plugins
-        setSite(self.app)
-        del self.app['accesscodes']
-        self.app.updatePlugins()
-        self.assertTrue('accesscodes' in self.app.keys())
-        return
-
     def test_jobs(self):
         # We can get the global job manager when traversing to it...
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/batching.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/batching.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/batching.py	(revision 11947)
@@ -338,5 +338,5 @@
                 obj = self.callFactory()
                 # Override all values in row, also
-                # student_ids and applicant_ids which have been
+                # customer ids which have been
                 # generated in the respective __init__ methods before.
                 self.updateEntry(obj, row, site, base)
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/browser.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/browser.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/browser.py	(revision 11947)
@@ -26,43 +26,4 @@
 
 from waeup.kofa.interfaces import IUniversity
-
-def replaceStudentMessages(old, new):
-    students = grok.getSite()['students']
-    for student in students.values():
-        history = IObjectHistory(student)
-        history.modifyMessages(old, new)
-    return
-
-def replaceApplicantMessages(old, new):
-    applicants = grok.getSite()['applicants']
-    for container in applicants.values():
-        for applicant in container.values():
-            history = IObjectHistory(applicant)
-            history.modifyMessages(old, new)
-    return
-
-def removeStudentMessage(student_id, number):
-    students = grok.getSite()['students']
-    student = students.get(student_id, None)
-    if student:
-        history = IObjectHistory(student)
-        success, text = history.removeMessage(number)
-    return success, text
-
-def removeApplicantMessage(applicant_id, number):
-    applicants = grok.getSite()['applicants']
-    try:
-        container, application_number = applicant_id.split('_')
-    except:
-        return False, 'applicant_id is wrong'
-    container = applicants.get(container, None)
-    if not container:
-        return False, 'No such container'
-    applicant = container.get(application_number, None)
-    if applicant is None:
-        return False, 'No such applicant'
-    history = IObjectHistory(applicant)
-    success, text = history.removeMessage(number)
-    return success, text
 
 class ReindexPage(UtilityView, grok.View):
@@ -95,106 +56,2 @@
         self.redirect(self.url(self.context, '@@index'))
         return
-
-class ModifyAllStudentHistory(UtilityView, grok.View):
-    """ View to modify all student histories.
-
-    """
-    grok.context(IUniversity)
-    grok.name('modify_student_history')
-    grok.require('waeup.managePortal')
-
-    def update(self,old=None, new=None):
-        if None in (old, new):
-            self.flash('Syntax: /modify_student_history?old=[old string]&new=[new string]')
-            return
-        replaceStudentMessages(old, new)
-        self.context.logger.info(
-            "'%s' replaced by '%s' in all student histories." % (old, new))
-        self.flash('Finished')
-        return
-
-    def render(self):
-        self.redirect(self.url(self.context, '@@index'))
-        return
-
-class RemoveStudentHistoryMessage(UtilityView, grok.View):
-    """ View to remove a single student history entry.
-
-    """
-    grok.context(IUniversity)
-    grok.name('remove_student_history_message')
-    grok.require('waeup.managePortal')
-
-    def update(self,student_id=None, number=None):
-        if None in (student_id, number):
-            self.flash('Syntax: /remove_student_history_message?student_id=[id]&number=[line number, starting with 0]')
-            return
-        try:
-            number=int(number)
-        except:
-            self.flash('Error')
-            return
-        success, text = removeStudentMessage(student_id, number)
-        if not success:
-            self.flash('Error: %s' % text)
-            return
-        self.context.logger.info(
-            "line '%s' removed in %s history" % (text, student_id))
-        self.flash('Finished')
-        return
-
-    def render(self):
-        self.redirect(self.url(self.context, '@@index'))
-        return
-
-class ModifyAllApplicantHistory(UtilityView, grok.View):
-    """ View to modify all student histories.
-
-    """
-    grok.context(IUniversity)
-    grok.name('modify_applicant_history')
-    grok.require('waeup.managePortal')
-
-    def update(self,old=None, new=None):
-        if None in (old, new):
-            self.flash('Syntax: /modify_applicant_history?old=[old string]&new=[new string]')
-            return
-        replaceApplicantMessages(old, new)
-        self.context.logger.info(
-            "'%s' replaced by '%s' in all applicant histories." % (old, new))
-        self.flash('Finished')
-        return
-
-    def render(self):
-        self.redirect(self.url(self.context, '@@index'))
-        return
-
-class RemoveApplicantHistoryMessage(UtilityView, grok.View):
-    """ View to remove a single applicant history entry.
-
-    """
-    grok.context(IUniversity)
-    grok.name('remove_applicant_history_message')
-    grok.require('waeup.managePortal')
-
-    def update(self,applicant_id=None, number=None):
-        if None in (applicant_id, number):
-            self.flash('Syntax: /remove_applicant_history_message?applicant_id=[id]&number=[line number, starting with 0]')
-            return
-        try:
-            number=int(number)
-        except:
-            self.flash('Error')
-            return
-        success, text = removeApplicantMessage(applicant_id, number)
-        if not success:
-            self.flash('Error: %s' % text)
-            return
-        self.context.logger.info(
-            "line '%s' removed in %s history" % (text, applicant_id))
-        self.flash('Finished')
-        return
-
-    def render(self):
-        self.redirect(self.url(self.context, '@@index'))
-        return
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/helpers.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/helpers.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/helpers.py	(revision 11947)
@@ -235,5 +235,5 @@
     grok.name(u'waeup.Factory')
     title = u"Create instances of ``factory``.",
-    description = u"This factory instantiates new applicant instances."
+    description = u"This factory instantiates new e.g. applicant instances."
     factory = None
 
Index: in/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/tests/test_browser.py	(revision 11946)
+++ 	(revision )
@@ -1,139 +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
-##
-"""
-Test the student-related UI components.
-"""
-import shutil
-import tempfile
-import pytz
-from datetime import datetime, timedelta
-from StringIO import StringIO
-import os
-import grok
-from zope.event import notify
-from zope.component import createObject, queryUtility
-from zope.component.hooks import setSite, clearSite
-from zope.catalog.interfaces import ICatalog
-from zope.security.interfaces import Unauthorized
-from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
-
-from waeup.kofa.utils.browser import replaceStudentMessages
-from waeup.kofa.students.tests.test_browser import StudentsFullSetup
-from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
-
-class StudentUtilsUITests(StudentsFullSetup):
-
-    layer = FunctionalLayer
-
-    def test_replace_student_messages(self):
-        self.assertTrue('Record created by system' in
-            self.student.history.messages[0])
-        replaceStudentMessages('system', 'me')
-        self.assertTrue('Record created by me' in
-            self.student.history.messages[0])
-
-    def test_modify_all_student_history(self):
-        self.assertTrue('Record created by system' in
-            self.student.history.messages[0])
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open('http://localhost/app/modify_student_history')
-        self.assertTrue(
-            'Syntax: /modify_student_history?old=[old string]&new=[new string]'
-            in self.browser.contents)
-        self.browser.open(
-            'http://localhost/app/modify_student_history?old=by system&new=by me')
-        self.assertTrue('Finished' in self.browser.contents)
-        self.assertTrue('Record created by me' in
-            self.student.history.messages[0])
-
-    def test_remove_student_history_message(self):
-        self.assertTrue('Record created by system' in
-            self.student.history.messages[0])
-        self.assertEqual(len(self.student.history.messages),1)
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open('http://localhost/app/remove_student_history_message')
-        self.assertTrue(
-            'Syntax: /remove_student_history_message?student_id=[id]&number=[line number, starting with 0]'
-            in self.browser.contents)
-        self.browser.open(
-            'http://localhost/app/remove_student_history_message?student_id=%s&number=0' % self.student.student_id)
-        self.assertTrue('Finished' in self.browser.contents)
-        self.assertEqual(len(self.student.history.messages),0)
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'main.log')
-        logcontent = open(logfile).read()
-        self.assertMatches(
-            "...zope.mgr - line '<YYYY-MM-DD hh:mm:ss> UTC - "
-            "Record created by system' removed in K1000000 history",
-            logcontent)
-
-    def test_reindex(self):
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open('http://localhost/app/reindex')
-        self.assertTrue('No catalog name provided' in self.browser.contents)
-        self.browser.open('http://localhost/app/reindex?ctlg=xyz')
-        self.assertTrue('xyz_catalog does not exist' in self.browser.contents)
-        cat = queryUtility(ICatalog, name='students_catalog')
-        results = cat.searchResults(student_id=(None, None))
-        self.assertEqual(len(results),1)
-        cat.clear()
-        results = cat.searchResults(student_id=(None, None))
-        self.assertEqual(len(results),0)
-        self.browser.open('http://localhost/app/reindex?ctlg=students')
-        self.assertTrue('1 students re-indexed' in self.browser.contents)
-        results = cat.searchResults(student_id=(None, None))
-        self.assertEqual(len(results),1)
-
-class ApplicantUtilsUITests(ApplicantsFullSetup):
-
-    layer = FunctionalLayer
-
-    def test_modify_all_applicant_history(self):
-        self.assertTrue('Application initialized by system' in
-            self.applicant.history.messages[0])
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open('http://localhost/app/modify_applicant_history')
-        self.assertTrue(
-            'Syntax: /modify_applicant_history?old=[old string]&new=[new string]'
-            in self.browser.contents)
-        self.browser.open(
-            'http://localhost/app/modify_applicant_history?old=by system&new=by me')
-        self.assertTrue('Finished' in self.browser.contents)
-        self.assertTrue('Application initialized by me' in
-            self.applicant.history.messages[0])
-
-    def test_remove_applicant_history_message(self):
-        self.assertTrue('Application initialized by system' in
-            self.applicant.history.messages[0])
-        self.assertEqual(len(self.applicant.history.messages),1)
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open('http://localhost/app/remove_applicant_history_message')
-        self.assertTrue(
-            'Syntax: /remove_applicant_history_message?applicant_id=[id]&number=[line number, starting with 0]'
-            in self.browser.contents)
-        self.browser.open(
-            'http://localhost/app/remove_applicant_history_message?applicant_id=%s&number=0' % self.applicant.applicant_id)
-        self.assertTrue('Finished' in self.browser.contents)
-        self.assertEqual(len(self.applicant.history.messages),0)
-        logfile = os.path.join(
-            self.app['datacenter'].storage, 'logs', 'main.log')
-        logcontent = open(logfile).read()
-        self.assertMatches(
-            "...zope.mgr - line '<YYYY-MM-DD hh:mm:ss> UTC - "
-            "Application initialized by system' removed in %s history"
-            % self.applicant.applicant_id, logcontent)
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/tests/test_converters.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/tests/test_converters.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/tests/test_converters.py	(revision 11947)
@@ -38,5 +38,4 @@
     DELETION_MARKER, IGNORE_MARKER)
 from waeup.kofa.schoolgrades import ResultEntryField
-from waeup.kofa.university import Faculty
 from waeup.kofa.utils.converters import (
     IObjectConverter, IFieldConverter, DefaultFieldConverter,
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/utils.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/utils.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/utils/utils.py	(revision 11947)
@@ -258,5 +258,5 @@
         """Send credentials as email.
 
-        Input is the applicant for which credentials are sent and the
+        Input is the customer for which credentials are sent and the
         password.
 
Index: /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/webservices.py
===================================================================
--- /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/webservices.py	(revision 11946)
+++ /main/waeup.kofa/branches/henrik-regista/src/waeup/kofa/webservices.py	(revision 11947)
@@ -20,67 +20,5 @@
 from zope.component import getUtility
 from zope.catalog.interfaces import ICatalog
-from waeup.kofa.payments.interfaces import IPayer
-from waeup.kofa.interfaces import IUniversity, academic_sessions_vocab
-
-class PaymentDataWebservice(grok.View):
-    """A simple webservice to publish payment and payer details on request from
-    accepted IP addresses without authentication.
-
-    """
-    grok.context(IUniversity)
-    grok.name('paymentrequest')
-    grok.require('waeup.Public')
-
-    #ACCEPTED_IP = ('174.36.230.28', )
-    ACCEPTED_IP = ('127.0.0.1', )
-
-    def update(self, P_ID=None):
-        if P_ID == None:
-            self.output = '-1'
-            return
-        real_ip = self.request.get('HTTP_X_FORWARDED_FOR', None)
-        if real_ip:
-            self.context.logger.info('PaymentDataWebservice called: %s' % real_ip)
-        if real_ip and self.ACCEPTED_IP:
-            if real_ip not in  self.ACCEPTED_IP:
-                self.output = '-4'
-                return
-        cat = getUtility(ICatalog, name='payments_catalog')
-        results = list(
-            cat.searchResults(p_id=(P_ID, P_ID), p_state=('paid', 'paid')))
-        if len(results) != 1:
-            self.output = '-1'
-            return
-        try:
-            owner = IPayer(results[0])
-            full_name = owner.display_fullname
-            reg_number = owner.reg_number
-            matric_number = owner.matric_number
-            faculty = owner.faculty
-            department = owner.department
-        except (TypeError, AttributeError):
-            self.output = '-3'
-            return
-        amount = results[0].amount_auth
-        payment_category = results[0].category
-        payment_item = results[0].p_item
-        academic_session = academic_sessions_vocab.getTerm(
-            results[0].p_session).title
-        self.output = (
-            'FULL_NAME=%s&' +
-            'FACULTY=%s&' +
-            'DEPARTMENT=%s&' +
-            'PAYMENT_ITEM=%s&' +
-            'PAYMENT_CATEGORY=%s&' +
-            'ACADEMIC_SESSION=%s&' +
-            'MATRIC_NUMBER=%s&' +
-            'REG_NUMBER=%s&' +
-            'FEE_AMOUNT=%s') % (full_name, faculty,
-            department, payment_item, payment_category,
-            academic_session, matric_number, reg_number, amount)
-        return
-
-    def render(self):
-        return self.output
+from waeup.kofa.interfaces import IUniversity, application_sessions_vocab
 
 class XMLRPCPermission(grok.Permission):
