Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 15544)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 15545)
@@ -3729,7 +3729,10 @@
     doclink = DOCLINK + '/datacenter/export.html#student-data-exporters'
 
-    def update(self, CREATE=None, DISCARD=None, job_id=None):
-        if CREATE:
+    def update(self, CREATE1=None, CREATE2=None, DISCARD=None, job_id=None):
+        if CREATE1:
             self.redirect(self.url('@@exportconfig'))
+            return
+        if CREATE2:
+            self.redirect(self.url('@@exportselected'))
             return
         if DISCARD and job_id:
@@ -3749,5 +3752,4 @@
     """
     grok.baseclass()
-    grok.name('exportconfig')
     grok.require('waeup.showStudents')
     grok.template('exportconfig')
@@ -3912,4 +3914,5 @@
 
     """
+    grok.name('exportconfig')
     grok.context(IDataCenter)
     redirect_target = '@@export'
@@ -3923,5 +3926,4 @@
     redirect_target = '@@export'
     grok.template('exportselected')
-    label = _('Configure student data export')
 
     def update(self, START=None, students=None, exporter=None):
@@ -3949,16 +3951,26 @@
         return
 
-class FacultiesExportJobContainerJobConfig(ExportJobContainerJobConfig):
+class FacultiesExportJobContainerJobConfig(
+    DatacenterExportJobContainerJobConfig):
     """Page that configures a students export job in facultiescontainer.
 
     """
     grok.context(VirtualFacultiesExportJobContainer)
-
-
-class FacultyExportJobContainerJobConfig(ExportJobContainerJobConfig):
+    redirect_target = ''
+
+class FacultiesExportJobContainerSelectStudents(
+    DatacenterExportJobContainerSelectStudents):
+    """Page that configures a students export job in facultiescontainer.
+
+    """
+    grok.context(VirtualFacultiesExportJobContainer)
+    redirect_target = ''
+
+class FacultyExportJobContainerJobConfig(DatacenterExportJobContainerJobConfig):
     """Page that configures a students export job in faculties.
 
     """
     grok.context(VirtualFacultyExportJobContainer)
+    redirect_target = ''
 
     @property
@@ -3966,9 +3978,11 @@
         return self.context.__parent__.code
 
-class DepartmentExportJobContainerJobConfig(ExportJobContainerJobConfig):
+class DepartmentExportJobContainerJobConfig(
+    DatacenterExportJobContainerJobConfig):
     """Page that configures a students export job in departments.
 
     """
     grok.context(VirtualDepartmentExportJobContainer)
+    redirect_target = ''
 
     @property
@@ -3976,5 +3990,6 @@
         return self.context.__parent__.code
 
-class CertificateExportJobContainerJobConfig(ExportJobContainerJobConfig):
+class CertificateExportJobContainerJobConfig(
+    DatacenterExportJobContainerJobConfig):
     """Page that configures a students export job for certificates.
 
@@ -3982,4 +3997,5 @@
     grok.context(VirtualCertificateExportJobContainer)
     grok.template('exportconfig_certificate')
+    redirect_target = ''
 
     @property
@@ -3987,5 +4003,6 @@
         return self.context.__parent__.code
 
-class CourseExportJobContainerJobConfig(ExportJobContainerJobConfig):
+class CourseExportJobContainerJobConfig(
+    DatacenterExportJobContainerJobConfig):
     """Page that configures a students export job for courses.
 
@@ -3996,4 +4013,5 @@
     grok.context(VirtualCourseExportJobContainer)
     grok.template('exportconfig_course')
+    redirect_target = ''
 
     def _set_exporter_values(self):
@@ -4005,4 +4023,5 @@
             exporters.append((util.title, name),)
         self.exporters = exporters
+        return
 
     def _set_session_values(self):
@@ -4018,4 +4037,8 @@
     def update(self, START=None, session=None, level=None, mode=None,
                exporter=None):
+        if not checkPermission('waeup.exportData', self.context):
+            self.flash(_('Not permitted.'), type='danger')
+            self.redirect(self.url(self.context))
+            return
         self._set_session_values()
         self._set_level_values()
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsindex.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsindex.pt	(revision 15544)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportjobsindex.pt	(revision 15545)
@@ -55,6 +55,10 @@
 
 <form method="POST" i18n:domain="waeup.kofa">
-  <input class="btn btn-primary" type="submit" name="CREATE"
-         value="Configure new export"
+  <input class="btn btn-primary" type="submit" name="CREATE1"
+         value="Set export parameters"
+          />
+  <input tal:condition="python:context.__parent__.__name__ == 'faculties'"
+         class="btn btn-primary" type="submit" name="CREATE2"
+         value="Enter student ids or matric numbers"
           />
 </form>
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 15544)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 15545)
@@ -3812,5 +3812,5 @@
         self.browser.open(facs_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['bursary']
         self.browser.getControl(name="session").value = ['2004']
@@ -3861,4 +3861,25 @@
             '- discarded: job_id=%s' % job_id in logcontent
             )
+        # Officer can also enter student id and gets the same export file
+        self.browser.open(facs_path)
+        self.browser.getLink("Export student data").click()
+        self.browser.getControl("Enter student ids or matric numbers").click()
+        self.browser.getControl(name="exporter").value = ['bursary']
+        self.browser.getControl(name="students").value = 'K1000000'
+        self.browser.getControl("Create CSV file").click()
+        # When the job is finished and we reload the page...
+        job_id = self.wait_for_export_job_completed()
+        # ... the csv file can be downloaded ...
+        self.browser.open('http://localhost/app/faculties/exports')
+        self.browser.getLink("Download").click()
+        self.assertEqual(self.browser.headers['content-type'],
+            'text/csv; charset=UTF-8')
+        self.assertTrue(
+            'filename="WAeUP.Kofa_bursary_%s.csv' % job_id in
+            self.browser.headers['content-disposition'])
+        self.assertTrue(
+            '666,12.12,2012-12-13 00:00:00#,schoolfee,1,my-id,p-item,100,2013,'
+            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
+            'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
 
     def test_faculty_export(self):
@@ -3867,5 +3888,5 @@
         self.browser.open(fac1_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['students']
         self.browser.getControl(name="session").value = ['2004']
@@ -3877,5 +3898,4 @@
         self.browser.getControl(name="payments_end").value = '14/12/2012'
         self.browser.getControl("Create CSV file").click()
-
         # When the job is finished and we reload the page...
         job_id = self.wait_for_export_job_completed()
@@ -3922,4 +3942,11 @@
             '- discarded: job_id=%s' % job_id in logcontent
             )
+        # Officer can set export parameters but cannot enter student id
+        # at faculty level
+        self.browser.open(fac1_path + '/exports')
+        self.assertTrue("Set export parameters"
+                         in self.browser.contents)
+        self.assertFalse("Enter student ids or matric numbers"
+                         in self.browser.contents)
 
     def test_department_export(self):
@@ -3928,5 +3955,5 @@
         self.browser.open(dep1_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['students']
         self.browser.getControl(name="session").value = ['2004']
@@ -3980,5 +4007,5 @@
         self.browser.open(cert1_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['students']
         self.browser.getControl(name="session").value = ['2004']
@@ -4028,5 +4055,5 @@
         self.browser.open(course1_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['students']
         self.browser.getControl(name="session").value = ['2004']
@@ -4081,10 +4108,10 @@
         self.browser.open(course1_path)
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.assertTrue(
             'Academic session not set. Please contact the administrator.'
             in self.browser.contents)
         self.app['configuration'].current_academic_session = 2004
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.browser.getControl(name="exporter").value = ['lecturer']
         self.browser.getControl(name="session").value = ['2004']
@@ -4148,5 +4175,5 @@
         self.browser.open("http://localhost/app/faculties/fac1/dep1")
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         # Only the sfpaymentsoverview exporter is available for department officers
         self.assertFalse('<option value="students">' in self.browser.contents)
@@ -4166,4 +4193,5 @@
 
     def test_export_bursary_officers(self):
+        self.add_payment(self.student)
         # Create bursary officer
         self.app['users'].addUser('mrbursary', SECRET)
@@ -4180,5 +4208,5 @@
         self.browser.getLink("Academics").click()
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         # Only the bursary exporter is available for bursary officers
         # not only at facultiescontainer level ...
@@ -4193,13 +4221,47 @@
         self.browser.open('http://localhost/app/faculties/fac1/dep1')
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.assertFalse('<option value="students">' in self.browser.contents)
         self.assertTrue('<option value="bursary">' in self.browser.contents)
-        # Thew job can be discarded
+        # Thew job can be downloaded
         self.assertEqual(len(self.app['datacenter'].running_exports), 1)
-        self.wait_for_export_job_completed()
+        job_id = self.wait_for_export_job_completed()
+        self.browser.open('http://localhost/app/faculties/exports')
+        self.browser.getLink("Download").click()
+        self.assertEqual(self.browser.headers['content-type'],
+            'text/csv; charset=UTF-8')
+        self.assertTrue(
+            'filename="WAeUP.Kofa_bursary_%s.csv' % job_id in
+            self.browser.headers['content-disposition'])
+        self.assertTrue(
+            '666,12.12,2012-12-13 00:00:00#,schoolfee,1,my-id,p-item,100,2013,'
+            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
+            'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
+        # ... and discarded
         self.browser.open('http://localhost/app/faculties/exports')
         self.browser.getControl("Discard").click()
         self.assertEqual(len(self.app['datacenter'].running_exports), 0)
+        # At Academics level bursary officers can also enter student ids
+        self.browser.getLink("Academics").click()
+        self.browser.getLink("Export student data").click()
+        self.browser.getControl("Enter student ids or matric numbers").click()
+        self.assertFalse('<option value="students">' in self.browser.contents)
+        self.browser.getControl(name="exporter").value = ['bursary']
+        self.browser.getControl(name="students").value = 'K1000000'
+        self.browser.getControl("Create CSV file").click()
+        # When the job is finished and we reload the page...
+        job_id = self.wait_for_export_job_completed()
+        # ... the csv file can be downloaded ...
+        self.browser.open('http://localhost/app/faculties/exports')
+        self.browser.getLink("Download").click()
+        self.assertEqual(self.browser.headers['content-type'],
+            'text/csv; charset=UTF-8')
+        self.assertTrue(
+            'filename="WAeUP.Kofa_bursary_%s.csv' % job_id in
+            self.browser.headers['content-disposition'])
+        self.assertTrue(
+            '666,12.12,2012-12-13 00:00:00#,schoolfee,1,my-id,p-item,100,2013,'
+            'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,'
+            'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents)
 
     def test_export_accommodation_officers(self):
@@ -4218,5 +4280,5 @@
         self.browser.getLink("Academics").click()
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         # accommodationpayments and beds exporters are available
         # not only at facultiescontainer level ...
@@ -4234,5 +4296,5 @@
         self.browser.open('http://localhost/app/faculties/fac1/dep1')
         self.browser.getLink("Export student data").click()
-        self.browser.getControl("Configure new export").click()
+        self.browser.getControl("Set export parameters").click()
         self.assertFalse('<option value="students">' in self.browser.contents)
         self.assertTrue('<option value="accommodationpayments">'
