Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 13200)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 13201)
@@ -260,4 +260,21 @@
             return True
     return False
+
+def exports_not_allowed(view):
+    """Return flash message if exports are not allowed.
+    """
+    utils = queryUtility(IKofaUtils)
+    if utils.export_disabled_message():
+        view.entries = doll_up(view, user=None)
+        return utils.export_disabled_message()
+    if not utils.expensive_actions_allowed():
+        view.entries = doll_up(view, user=None)
+        return _("Currently, exporters cannot be started due to high "
+                 "system load. Please try again later.")
+    if running_jobs(view):
+        view.entries = doll_up(view, user=None)
+        return _("Sorry, another export job is running. "
+                 "Please try again later.")
+    return
 
 def getImporters(context):
@@ -1755,21 +1772,8 @@
             return
         if CREATE:
-            utils = queryUtility(IKofaUtils)
-            if utils.export_disabled_message():
-                self.flash(utils.export_disabled_message(), type='danger')
-                self.entries = doll_up(self, user=None)
-                return
-            if not utils.expensive_actions_allowed():
-                self.flash(_(
-                    "Currently, exporters cannot be started due to high "
-                    "system load. Please try again later."), type='danger')
-                self.entries = doll_up(self, user=None)
-                return
-            if running_jobs(self):
-                self.flash(_(
-                    "Sorry, another export job is running. "
-                    "Please try again later."), type='danger')
-                self.entries = doll_up(self, user=None)
-                return
+            ena = exports_not_allowed(self)
+            if ena:
+                self.flash(ena, type='danger')
+                return 
             job_id = self.context.start_export_job(
                 exporter, self.request.principal.id)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13200)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 13201)
@@ -39,5 +39,5 @@
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
 from waeup.kofa.browser.pages import (
-    ContactAdminFormPage, ExportCSVView, doll_up, running_jobs)
+    ContactAdminFormPage, ExportCSVView, doll_up, exports_not_allowed)
 from waeup.kofa.browser.interfaces import ICaptchaManager
 from waeup.kofa.hostels.hostel import NOT_OCCUPIED
@@ -3236,19 +3236,7 @@
         if START is None:
             return
-        utils = queryUtility(IKofaUtils)
-        if utils.export_disabled_message():
-            self.flash(utils.export_disabled_message(), type='danger')
-            self.entries = doll_up(self, user=None)
-            return
-        if not utils.expensive_actions_allowed():
-            self.flash(_(
-                "Currently, exporters cannot be started due to high "
-                "system load. Please try again later."), type='danger')
-            return
-        if running_jobs(self):
-            self.flash(_(
-                "Sorry, another export job is running. "
-                "Please try again later."), type='danger')
-            self.entries = doll_up(self, user=None)
+        ena = exports_not_allowed(self)
+        if ena:
+            self.flash(ena, type='danger')
             return
         if payments_start or payments_end:
@@ -3346,19 +3334,7 @@
         if START is None:
             return
-        utils = queryUtility(IKofaUtils)
-        if utils.export_disabled_message():
-            self.flash(utils.export_disabled_message(), type='danger')
-            self.entries = doll_up(self, user=None)
-            return
-        if not utils.expensive_actions_allowed():
-            self.flash(_(
-                "Currently, exporters cannot be started due to high "
-                "system load. Please try again later."), type='danger')
-            return
-        if running_jobs(self):
-            self.flash(_(
-                "Sorry, another export job is running. "
-                "Please try again later."), type='danger')
-            self.entries = doll_up(self, user=None)
+        ena = exports_not_allowed(self)
+        if ena:
+            self.flash(ena, type='danger')
             return
         try:
@@ -3442,19 +3418,7 @@
         if START is None:
             return
-        utils = queryUtility(IKofaUtils)
-        if utils.export_disabled_message():
-            self.flash(utils.export_disabled_message(), type='danger')
-            self.entries = doll_up(self, user=None)
-            return
-        if not utils.expensive_actions_allowed():
-            self.flash(_(
-                "Currently, exporters cannot be started due to high "
-                "system load. Please try again later."), type='danger')
-            return
-        if running_jobs(self):
-            self.flash(_(
-                "Sorry, another export job is running. "
-                "Please try again later."), type='danger')
-            self.entries = doll_up(self, user=None)
+        ena = exports_not_allowed(self)
+        if ena:
+            self.flash(ena, type='danger')
             return
         if session == 'all':
