Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv	(revision 7982)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv	(revision 7983)
@@ -1,5 +1,5 @@
-student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,reg_state
-X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,courses validated
-,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,courses validated
-,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,courses validated
-,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234,courses registered
+student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,reg_state
+X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,courses validated
+,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,courses validated
+,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,m,courses validated
+,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234,f,courses registered
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv	(revision 7982)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv	(revision 7983)
@@ -1,6 +1,6 @@
-student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,reg_state
-A123456,Aaren,Pieri,1,1990-01-02#,100000,aa@aa.ng,1234,mypw1,clearance started
-B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1,cleared
-C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1,admitted
-D123456,John,Wolter,4,1990-01-05,100003,aa@aa.ng,1234,mypw1,nonsense
-E123456,John,Kennedy,5,1990-01-06,100004,aa@aa.ng,1234,
+student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,reg_state
+A123456,Aaren,Pieri,1,1990-01-02#,100000,aa@aa.ng,1234,mypw1,m,clearance started
+B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1,m,cleared
+C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1,m,admitted
+D123456,John,Wolter,4,1990-01-05,100003,aa@aa.ng,1234,mypw1,m,nonsense
+E123456,John,Kennedy,5,1990-01-06,100004,aa@aa.ng,1234,,x
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 7982)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 7983)
@@ -277,4 +277,11 @@
         self.assertEqual(num_warns,2)
         assert len(self.app['students'].keys()) == 4
+        content = open(fail_file).read()
+        self.assertEqual(
+            content,
+            'reg_number,firstname,student_id,sex,email,phone,date_of_birth,reg_state,lastname,password,matric_number,--ERRORS--\r\n'
+            '4,John,D123456,m,aa@aa.ng,1234,1990-01-05,nonsense,Wolter,mypw1,100003,reg_state: not allowed\r\n'
+            '5,John,E123456,x,aa@aa.ng,1234,1990-01-06,,Kennedy,,100004,sex: Invalid value; reg_state: not allowed\r\n'
+            )
         self.assertTrue('A123456' in self.app['students'].keys())
         self.assertEqual(self.app['students']['A123456'].state,'clearance started')
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 7982)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 7983)
@@ -618,4 +618,5 @@
         self.browser.getControl(name="form.current_session").value = ['2004']
         self.browser.getControl(name="form.current_verdict").value = ['A']
+        self.browser.getControl(name="form.entry_mode").value = ['ug_ft']
         self.browser.getControl("Save").click()
         # Now we can save also the current level which depends on start and end
@@ -725,8 +726,8 @@
         # Prepare a csv file for students
         open('students.csv', 'wb').write(
-"""firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password
-Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,mypwd1
-Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypwd1
-Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234,mypwd1
+"""firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,password
+Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,mypwd1
+Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,mypwd1
+Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234,m,mypwd1
 """)
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
