Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 14948)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 14949)
@@ -29,4 +29,5 @@
 from zope.catalog.interfaces import ICatalog
 from zope.i18n import translate
+from zope.security import checkPermission
 from hurry.workflow.interfaces import (
     IWorkflowInfo, IWorkflowState, InvalidTransitionError)
@@ -430,4 +431,10 @@
     @action(_('Create students from selected'))
     def createStudents(self, **data):
+        if not checkPermission('waeup.createStudents', self.context):
+            self.flash(
+                _('You don\'t have permission to create student records.'),
+                type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
+            return
         form = self.request.form
         if 'val_id' in form:
@@ -697,4 +704,5 @@
         results = list(cat.searchResults(state=(ADMITTED, ADMITTED)))
         created = []
+        failed = []
         container_only = False
         applicants_root = grok.getSite()['applicants']
@@ -708,4 +716,5 @@
                 created.append(result.applicant_id)
             else:
+                failed.append('%s (%s)' % (result.applicant_id, msg))
                 ob_class = self.__implemented__.__name__.replace(
                     'waeup.kofa.','')
@@ -716,6 +725,9 @@
             self.flash(_('${a} students successfully created.',
                 mapping = {'a': len(created)}))
-        else:
-            self.flash(_('No student could be created.'), type='warning')
+        if len(failed):
+            self.flash(_('Student creation failed: ${a}',
+                mapping = {'a':', '.join(failed)}), type='danger')
+        if not len(created) and not len(failed):
+            self.flash(_('No record found.'), type='warning')
         self.redirect(self.url(self.context))
         return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 14948)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 14949)
@@ -160,9 +160,9 @@
         self.prepare_applicant()
         self.browser.open(self.container_path + '/createallstudents')
-        self.assertTrue('No student could be created' in self.browser.contents)
+        self.assertTrue('No record found' in self.browser.contents)
         IWorkflowState(self.applicant).setState('admitted')
         notify(grok.ObjectModifiedEvent(self.applicant))
         self.browser.open(self.container_path + '/createallstudents')
-        self.assertTrue('No student could be created' in self.browser.contents)
+        self.assertTrue('No course admitted provided' in self.browser.contents)
         logcontent = open(logfile).read()
         self.assertTrue('No course admitted provided' in logcontent)
@@ -173,5 +173,5 @@
         self.applicant.date_of_birth = None
         self.browser.open(self.container_path + '/createallstudents')
-        self.assertTrue('No student could be created' in self.browser.contents)
+        self.assertTrue('RequiredMissing: date_of_birth' in self.browser.contents)
         logcontent = open(logfile).read()
         self.assertTrue('RequiredMissing: date_of_birth' in logcontent)
@@ -194,5 +194,5 @@
         notify(grok.ObjectModifiedEvent(self.applicant))
         self.browser.open(self.root_path + '/createallstudents')
-        self.assertTrue('No student could be created' in self.browser.contents)
+        self.assertTrue('No course admitted provided' in self.browser.contents)
         logcontent = open(logfile).read()
         self.assertTrue('No course admitted provided' in logcontent)
@@ -238,8 +238,12 @@
         self.assertTrue('No student could be created.' in self.browser.contents)
         self.browser.open(self.container_path + '/createallstudents')
-        self.assertTrue('No student could be created' in self.browser.contents)
-        logfile = os.path.join(self.app['datacenter'].storage, 'logs', 'applicants.log')
-        logcontent = open(logfile).read()
-        self.assertTrue('IOError: Application Slip could not be created.' in logcontent)
+        self.assertTrue(
+            'IOError: Application Slip could not be created.'
+            in self.browser.contents)
+        logfile = os.path.join(
+            self.app['datacenter'].storage, 'logs', 'applicants.log')
+        logcontent = open(logfile).read()
+        self.assertTrue(
+            'IOError: Application Slip could not be created.' in logcontent)
 
     def disabled_test_delay(self):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 14948)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 14949)
@@ -536,4 +536,29 @@
         self.assertEqual(self.applicantscontainer.counts[1], 0)
         return
+
+    def init_officer(self):
+        # Create application officer
+        self.app['users'].addUser('mrappl', 'mrapplsecret')
+        self.app['users']['mrappl'].email = 'mrappl@foo.ng'
+        self.app['users']['mrappl'].title = 'Carlo Pitter'
+        prmglobal = IPrincipalRoleManager(self.app)
+        prmglobal.assignRoleToPrincipal('waeup.ApplicationsManager', 'mrappl')
+        # Login as officer
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = 'mrappl'
+        self.browser.getControl(name="form.password").value = 'mrapplsecret'
+        self.browser.getControl("Login").click()
+
+    def test_student_creation_permission(self):
+        self.init_officer()
+        self.browser.open(self.container_path + '/manage')
+        self.browser.getControl("Create students").click()
+        self.assertTrue('You don\'t have permission to create student records'
+            in self.browser.contents)
+        prmglobal = IPrincipalRoleManager(self.app)
+        prmglobal.assignRoleToPrincipal('waeup.StudentsCreator', 'mrappl')
+        self.browser.getControl("Create students").click()
+        self.assertTrue('No applicant selected' in self.browser.contents)
+
 
 class ApplicantUITests(ApplicantsFullSetup):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/permissions.py	(revision 14948)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/permissions.py	(revision 14949)
@@ -566,5 +566,6 @@
                      'waeup.clearStudentFinancially',  # not used in base pkg
                      'waeup.uploadStudentFile', 'waeup.showStudents',
-                     'waeup.clearAllStudents', 'waeup.createStudents',
+                     'waeup.clearAllStudents',
+                     'waeup.createStudents',
                      'waeup.editScores',
                      'waeup.triggerTransition',
@@ -614,5 +615,6 @@
         'waeup.clearStudent', 'waeup.payStudent',
         'waeup.uploadStudentFile', 'waeup.showStudents',
-        'waeup.clearAllStudents', 'waeup.createStudents',
+        'waeup.clearAllStudents',
+        # 'waeup.createStudents',
         'waeup.editScores',
         # 'waeup.triggerTransition',
