Index: main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 8287)
@@ -64,5 +64,5 @@
         return sorted(list(set(
             ['student_id','reg_number','matric_number',
-            'password', 'reg_state'] + getFields(
+            'password', 'state'] + getFields(
                 self.iface).keys())))
 
@@ -133,7 +133,7 @@
         parent = self.getParent(row, site)
         parent.addStudent(obj)
-        # We have to log this if reg_state is provided. If not,
+        # We have to log this if state is provided. If not,
         # logging is done by the event handler handle_student_added
-        if row.has_key('reg_state'):
+        if row.has_key('state'):
             parent.logger.info('%s - Student record created' % obj.student_id)
         history = IObjectHistory(obj)
@@ -166,12 +166,12 @@
 
         # Update registration state
-        reg_state = row.get('reg_state', IGNORE_MARKER)
-        if reg_state not in (IGNORE_MARKER, ''):
-            value = row['reg_state']
+        state = row.get('state', IGNORE_MARKER)
+        if state not in (IGNORE_MARKER, ''):
+            value = row['state']
             IWorkflowState(obj).setState(value)
             msg = _("State '${a}' set", mapping = {'a':value})
             history = IObjectHistory(obj)
             history.addMessage(msg)
-            row.pop('reg_state')
+            row.pop('state')
 
         # apply other values...
@@ -219,10 +219,12 @@
         errs, inv_errs, conv_dict =  converter.fromStringDict(
             row, self.factory_name, mode=mode)
-        if row.has_key('reg_state') and \
-            not row['reg_state'] in IMPORTABLE_STATES:
-            if row['reg_state'] not in (IGNORE_MARKER, ''):
-                errs.append(('reg_state','not allowed'))
-            #else:
-            #    errs.append(('reg_state','no value provided'))
+        if row.has_key('state') and \
+            not row['state'] in IMPORTABLE_STATES:
+            if row['state'] not in (IGNORE_MARKER, ''):
+                errs.append(('state','not allowed'))
+            else:
+                # state is an attribute of Student and must not
+                # be changed if empty
+                conv_dict['state'] = IGNORE_MARKER
         return errs, inv_errs, conv_dict
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 8287)
@@ -156,6 +156,6 @@
     message.
     """
-    reg_state = IWorkflowState(student).getState()
-    if reg_state == CLEARANCE:
+    state = IWorkflowState(student).getState()
+    if state == CLEARANCE:
         student.clearance_locked = False
     else:
@@ -174,5 +174,5 @@
     role_manager.assignRoleToPrincipal(
         'waeup.local.StudentRecordOwner', student.student_id)
-    if reg_state is None:
+    if state is None:
         IWorkflowInfo(student).fireTransition('create')
     return
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 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv	(revision 8287)
@@ -1,3 +1,3 @@
-student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,reg_state
+student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,state
 X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,courses validated
 Y777777,Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,courses validated
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 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv	(revision 8287)
@@ -1,3 +1,3 @@
-student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,reg_state
+student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,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
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_update.csv
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_update.csv	(revision 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_update.csv	(revision 8287)
@@ -1,3 +1,3 @@
-reg_number,date_of_birth,matric_number,reg_state
+reg_number,date_of_birth,matric_number,state
 1,1980-01-02,10,admitted
 2,1980-01-03,11,
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 8286)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 8287)
@@ -220,15 +220,15 @@
     def test_checkConversion(self):
         errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(reg_number='1', reg_state='admitted'))
-        self.assertEqual(len(errs),0)
-        # Empty reg_state is allowed
-        errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(reg_number='1', reg_state=''))
-        self.assertEqual(len(errs),0)
-        #self.assertTrue(('reg_state', 'no value provided') in errs)
-        errs, inv_errs, conv_dict = self.processor.checkConversion(
-            dict(reg_number='1', reg_state='nonsense'))
+            dict(reg_number='1', state='admitted'))
+        self.assertEqual(len(errs),0)
+        # Empty state is allowed
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(reg_number='1', state=''))
+        self.assertEqual(len(errs),0)
+        #self.assertTrue(('state', 'no value provided') in errs)
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(reg_number='1', state='nonsense'))
         self.assertEqual(len(errs),1)
-        self.assertTrue(('reg_state', 'not allowed') in errs)
+        self.assertTrue(('state', 'not allowed') in errs)
 
     def test_delEntry(self):
@@ -254,7 +254,7 @@
             self.csv_file_update, STUDENT_HEADER_FIELDS_UPDATE, 'update')
         self.assertEqual(num_warns,0)
-        # reg_state has changed
+        # state has changed
         self.assertEqual(self.app['students']['X666666'].state,'admitted')
-        # reg_state has not changed
+        # state has not changed
         self.assertEqual(self.app['students']['Y777777'].state,'courses validated')
         shutil.rmtree(os.path.dirname(fin_file))
@@ -301,7 +301,7 @@
         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\r\n'
+            'reg_number,firstname,student_id,sex,email,phone,state,date_of_birth,lastname,password,matric_number,--ERRORS--\r\n'
+            '4,John,D123456,m,aa@aa.ng,1234,nonsense,1990-01-05,Wolter,mypw1,100003,state: not allowed\r\n'
+            '5,John,E123456,x,aa@aa.ng,1234,,1990-01-06,Kennedy,,100004,sex: Invalid value\r\n'
             )
         self.assertTrue('A123456' in self.app['students'].keys())
@@ -317,5 +317,5 @@
         self.assertTrue(
             "State 'clearance started' set by system" in history)
-        # reg_state was empty and student is thus in state created
+        # state was empty and student is thus in state created
         self.assertEqual(self.app['students']['F123456'].state,'created')
         shutil.rmtree(os.path.dirname(fin_file))
