Index: main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 7982)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 7983)
@@ -177,5 +177,4 @@
         title = _(u'Sex'),
         source = GenderSource(),
-        default = u'm',
         required = True,
         )
@@ -190,5 +189,4 @@
     matric_number = TextLineChoice(
         title = _(u'Matriculation Number'),
-        #default = u'',
         required = False,
         readonly = False,
@@ -198,5 +196,4 @@
     adm_code = schema.TextLine(
         title = _(u'PWD Activation Code'),
-        default = u'',
         required = False,
         readonly = True,
@@ -230,5 +227,4 @@
     clr_code = schema.TextLine(
         title = _(u'CLR Activation Code'),
-        default = u'',
         required = False,
         readonly = True,
@@ -239,5 +235,5 @@
         title = _(u'Nationality'),
         default = 'nigeria',
-        required = True,
+        required = False,
         )
 
@@ -262,5 +258,4 @@
     reg_number = schema.TextLine(
         title = _(u'Registration Number'),
-        default = None,
         required = False,
         )
@@ -272,5 +267,4 @@
     matric_number = schema.TextLine(
         title = _(u'Matriculation Number'),
-        default = None,
         required = False,
         )
@@ -283,5 +277,4 @@
         title = _(u'Certificate'),
         source = CertificateSource(),
-        default = None,
         required = False,
         )
@@ -290,5 +283,4 @@
         title = _(u'Entry Mode'),
         source = StudyModeSource(),
-        default = u'ug_ft',
         required = True,
         readonly = False,
@@ -299,5 +291,4 @@
         source = academic_sessions_vocab,
         #default = datetime.now().year,
-        default = None,
         required = True,
         readonly = False,
@@ -307,5 +298,4 @@
         title = _(u'Current Session'),
         source = academic_sessions_vocab,
-        default = None,
         required = True,
         readonly = False,
@@ -315,5 +305,4 @@
         title = _(u'Current Level'),
         source = StudyLevelSource(),
-        default = None,
         required = False,
         readonly = False,
@@ -348,5 +337,4 @@
         title = _(u'Current Session'),
         source = academic_sessions_vocab,
-        default = None,
         required = True,
         )
@@ -355,5 +343,4 @@
         title = _(u'Current Level'),
         source = StudyLevelSource(),
-        default = None,
         required = True,
         )
@@ -370,5 +357,4 @@
         title = _(u'Session'),
         source = academic_sessions_vocab,
-        default = None,
         required = True,
         )
@@ -452,5 +438,4 @@
     bed_coordinates = schema.TextLine(
         title = _(u'Bed Coordinates'),
-        default = None,
         required = False,
         readonly = False,
@@ -459,5 +444,4 @@
     bed_type = schema.TextLine(
         title = _(u'Bed Type'),
-        default = None,
         required = False,
         readonly = False,
@@ -467,5 +451,4 @@
         title = _(u'Session'),
         source = academic_sessions_vocab,
-        default = None,
         required = True,
         readonly = True,
@@ -480,5 +463,4 @@
     booking_code = schema.TextLine(
         title = _(u'Booking Activation Code'),
-        default = u'',
         required = False,
         readonly = True,
@@ -515,5 +497,4 @@
     reg_number = schema.TextLine(
         title = _(u'Registration Number'),
-        default = None,
         required = True,
         readonly = False,
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')
