Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 9010)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 9011)
@@ -67,5 +67,5 @@
 from waeup.kofa.widgets.htmlwidget import HTMLDisplayWidget
 from waeup.kofa.authentication import get_principal_role_manager
-from waeup.kofa.utils.helpers import get_user_account, msave
+from waeup.kofa.utils.helpers import get_user_account
 from waeup.kofa.mandates.mandate import PasswordMandate
 
@@ -157,4 +157,17 @@
     return
 
+# Save function used for save methods in pages
+def msave(view, **data):
+    changed_fields = view.applyData(view.context, **data)
+    # Turn list of lists into single list
+    if changed_fields:
+        changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
+    fields_string = ' + '.join(changed_fields)
+    view.flash(_('Form has been saved.'))
+    ob_class = view.__implemented__.__name__.replace('waeup.kofa.','')
+    if fields_string:
+        grok.getSite().logger.info('%s - saved: %s' % (ob_class, fields_string))
+    return
+
 #
 # Login/logout and language switch pages...
@@ -373,34 +386,4 @@
     def entries(self):
         return ()
-
-class ReindexPage(UtilityView, grok.View):
-    """ Reindex view.
-
-    Reindexes a catalog. For managers only.
-    """
-    grok.context(IUniversity)
-    grok.name('reindex')
-    grok.require('waeup.managePortal')
-
-    def update(self,ctlg=None):
-        if ctlg is None:
-            self.flash('No catalog name provided.')
-            return
-        cat = queryUtility(ICatalog, name='%s_catalog' % ctlg)
-        if cat is None:
-            self.flash('%s_catalog does not exist' % ctlg)
-            return
-        self.context.logger.info(
-            'Catalog `%s_catalog` re-indexing started.' % ctlg)
-        cat.updateIndexes()
-        no_of_entries = cat.values()[0].documentCount()
-        self.flash('%d %s re-indexed.' % (no_of_entries,ctlg))
-        self.context.logger.info(
-            'Re-indexing of %d objects finished.' % no_of_entries)
-        return
-
-    def render(self):
-        self.redirect(self.url(self.context, '@@index'))
-        return
 
 #
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9010)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 9011)
@@ -1868,21 +1868,4 @@
         self.assertTrue('An email with' in self.browser.contents)
 
-    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)
-
     def test_change_current_mode(self):
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/browser.py	(revision 9011)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/browser.py	(revision 9011)
@@ -0,0 +1,56 @@
+## $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
+##
+"""UI components for utilities and helpers.
+"""
+
+import grok
+from zope.catalog.interfaces import ICatalog
+from zope.component import queryUtility, getUtility, createObject
+from waeup.kofa.browser.layout import UtilityView
+
+from waeup.kofa.interfaces import IUniversity
+
+class ReindexPage(UtilityView, grok.View):
+    """ Reindex view.
+
+    Reindexes a catalog. For managers only.
+    """
+    grok.context(IUniversity)
+    grok.name('reindex')
+    grok.require('waeup.managePortal')
+
+    def update(self,ctlg=None):
+        if ctlg is None:
+            self.flash('No catalog name provided.')
+            return
+        cat = queryUtility(ICatalog, name='%s_catalog' % ctlg)
+        if cat is None:
+            self.flash('%s_catalog does not exist' % ctlg)
+            return
+        self.context.logger.info(
+            'Catalog `%s_catalog` re-indexing started.' % ctlg)
+        cat.updateIndexes()
+        no_of_entries = cat.values()[0].documentCount()
+        self.flash('%d %s re-indexed.' % (no_of_entries,ctlg))
+        self.context.logger.info(
+            'Re-indexing of %d objects finished.' % no_of_entries)
+        return
+
+    def render(self):
+        self.redirect(self.url(self.context, '@@index'))
+        return
Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py	(revision 9010)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py	(revision 9011)
@@ -683,15 +683,2 @@
         writer.writerow(row)
     return tmp_path
-
-# Save function used for save methods in pages
-def msave(view, **data):
-    changed_fields = view.applyData(view.context, **data)
-    # Turn list of lists into single list
-    if changed_fields:
-        changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
-    fields_string = ' + '.join(changed_fields)
-    view.flash(_('Form has been saved.'))
-    ob_class = view.__implemented__.__name__.replace('waeup.kofa.','')
-    if fields_string:
-        grok.getSite().logger.info('%s - saved: %s' % (ob_class, fields_string))
-    return
Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_browser.py	(revision 9011)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_browser.py	(revision 9011)
@@ -0,0 +1,57 @@
+## $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.students.tests.test_browser import StudentsFullSetup
+
+class UtilsUITests(StudentsFullSetup):
+    # Tests for Student class views and pages
+
+    layer = FunctionalLayer
+
+    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)
