Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16465)
@@ -43,5 +43,5 @@
 from waeup.kofa.browser.interfaces import ICaptchaManager
 from waeup.kofa.browser.layout import (
-    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
+    KofaPage, KofaFormPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     NullValidator, jsaction, action, UtilityView)
 from waeup.kofa.browser.pages import (
@@ -56,5 +56,5 @@
 from waeup.kofa.mandates.mandate import PasswordMandate, ParentsPasswordMandate
 from waeup.kofa.university.interfaces import (
-    IDepartment, ICertificate, ICourse)
+    IDepartment, ICertificate, ICourse, IFlashNotice)
 from waeup.kofa.university.certificate import (
     VirtualCertificateExportJobContainer)
@@ -3796,12 +3796,43 @@
         return
 
-class RemoveFlashNoticeAllStudentsInDepartmentView(UtilityView, grok.View):
-    """ Remove flash notices of all students in a department.
+#class RemoveFlashNoticeAllStudentsInDepartmentView(UtilityView, grok.View):
+#    """ Remove flash notices of all students in a department.
+#    """
+#    grok.context(IDepartment)
+#    grok.name('removeflash')
+#    grok.require('waeup.manageStudent')
+
+#    def update(self):
+#        cat = queryUtility(ICatalog, name='students_catalog')
+#        students = cat.searchResults(
+#            depcode=(self.context.code, self.context.code),
+#            )
+#        num = 0
+#        for student in students:
+#            student.flash_notice = u''
+#            num += 1
+#        self.flash(_('%d flash notices have been removed.' % num))
+#        self.redirect(self.url(self.context))
+#        return
+
+#    def render(self):
+#        return
+
+class EditFlashNoticesFormPage(KofaFormPage):
+    """Edit all flash notices of students in a department.
     """
     grok.context(IDepartment)
-    grok.name('removeflash')
+    grok.name('edit_flash_notices')
+    grok.template('editflashnotices')
     grok.require('waeup.manageStudent')
-
-    def update(self):
+    form_fields = grok.AutoFields(IFlashNotice)
+    pnav = 0
+
+    def label(self):
+        return _(u'Set flash notices for all students in ${a}',
+            mapping = {'a':self.context.longtitle})
+
+    @action('Save flash notices', style='primary')
+    def save(self, *args, **data):
         cat = queryUtility(ICatalog, name='students_catalog')
         students = cat.searchResults(
@@ -3810,12 +3841,17 @@
         num = 0
         for student in students:
-            student.flash_notice = u''
+            student.flash_notice = data['flash_notice']
             num += 1
-        self.flash(_('%d flash notices have been removed.' % num))
+        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
+        grok.getSite().logger.info(
+            '%s - %s - saved flash notice: %s'
+            % (ob_class, self.context.__name__, data['flash_notice']))
+        self.flash(_('%d flash notices have been edited.' % num))
         self.redirect(self.url(self.context))
         return
 
-    def render(self):
-        return
+    @action(_('Cancel'), validator=NullValidator)
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
 
 class EditScoresPage(KofaPage):
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 16459)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 16465)
@@ -1882,11 +1882,35 @@
         return
 
-    def test_remove_all_flash_notices(self):
+    #def test_remove_all_flash_notices(self):
+    #    self.student.flash_notice = u'test'
+    #    self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+    #    self.browser.open('http://localhost/app/faculties/fac1/dep1')
+    #    self.browser.getLink("Remove all flash notices").click()
+    #    self.assertTrue('1 flash notices have been removed' in self.browser.contents)
+    #    self.assertEqual(self.student.flash_notice, '')
+    #    return
+
+    def test_edit_all_flash_notices(self):
         self.student.flash_notice = u'test'
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open('http://localhost/app/faculties/fac1/dep1')
-        self.browser.getLink("Remove all flash notices").click()
-        self.assertTrue('1 flash notices have been removed' in self.browser.contents)
-        self.assertEqual(self.student.flash_notice, '')
+        self.browser.getLink("Edit all flash notices").click()
+        self.browser.getControl(name="form.flash_notice").value = 'Hello'
+        self.browser.getControl("Save flash notices").click()
+        self.assertTrue('1 flash notices have been edited' in self.browser.contents)
+        self.assertEqual(self.student.flash_notice, 'Hello')
+        self.browser.getLink("Edit all flash notices").click()
+        self.browser.getControl("Save flash notices").click()
+        self.assertTrue('1 flash notices have been edited' in self.browser.contents)
+        self.assertEqual(self.student.flash_notice, None)
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'main.log')
+        logcontent = open(logfile).read()
+        self.assertTrue(
+            'zope.mgr - students.browser.EditFlashNoticesFormPage - dep1 - '
+            'saved flash notice: Hello' in logcontent)
+        self.assertTrue(
+            'zope.mgr - students.browser.EditFlashNoticesFormPage - dep1 - '
+            'saved flash notice: None' in logcontent)
         return
 
