Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 8491)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 8494)
@@ -41,13 +41,14 @@
         exporter.export([self.student], self.outfile)
         result = open(self.outfile, 'rb').read()
-        self.assertEqual(
-            result,
+        self.assertTrue(
             'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
             'firstname,lastname,matric_number,middlename,nationality,'
-            'perm_address,phone,reg_number,sex,student_id\r\n'
-
-            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,'
-            'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
-            '+234-123-12345,123456,f,A111111\r\n'
+            'perm_address,phone,reg_number,sex,student_id,password,'
+            'state,history,certcode\r\n'
+
+            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
+            'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
+            '+234-123-12345,123456,f,A111111,,created'
+            in result
             )
         return
@@ -60,13 +61,14 @@
         exporter.export_all(self.app, self.outfile)
         result = open(self.outfile, 'rb').read()
-        self.assertEqual(
-            result,
+        self.assertTrue(
             'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
             'firstname,lastname,matric_number,middlename,nationality,'
-            'perm_address,phone,reg_number,sex,student_id\r\n'
-
-            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,'
-            'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
-            '+234-123-12345,123456,f,A111111\r\n'
+            'perm_address,phone,reg_number,sex,student_id,password,'
+            'state,history,certcode\r\n'
+
+            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
+            'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
+            '+234-123-12345,123456,f,A111111,,created'
+            in result
             )
         return
@@ -78,13 +80,14 @@
         exporter.export_student(self.student, self.outfile)
         result = open(self.outfile, 'rb').read()
-        self.assertEqual(
-            result,
+        self.assertTrue(
             'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
             'firstname,lastname,matric_number,middlename,nationality,'
-            'perm_address,phone,reg_number,sex,student_id\r\n'
-
-            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,'
-            'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
-            '+234-123-12345,123456,f,A111111\r\n'
+            'perm_address,phone,reg_number,sex,student_id,password,'
+            'state,history,certcode\r\n'
+
+            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
+            'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",'
+            '+234-123-12345,123456,f,A111111,,created'
+            in result
             )
         return
@@ -122,7 +125,7 @@
             result,
             'certificate,current_level,current_session,current_verdict,'
-            'entry_mode,entry_session,previous_verdict\r\n'
-
-            ',,,0,,,0\r\n'
+            'entry_mode,entry_session,previous_verdict,student_id\r\n'
+
+            ',,,0,,,0,\r\n'
             )
         return
@@ -139,7 +142,7 @@
             result,
             'certificate,current_level,current_session,current_verdict,'
-            'entry_mode,entry_session,previous_verdict\r\n'
-
-            'CERT1,200,2012,0,ug_ft,2010,0\r\n'
+            'entry_mode,entry_session,previous_verdict,student_id\r\n'
+
+            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
             )
         return
@@ -155,7 +158,7 @@
             result,
             'certificate,current_level,current_session,current_verdict,'
-            'entry_mode,entry_session,previous_verdict\r\n'
-
-            'CERT1,200,2012,0,ug_ft,2010,0\r\n'
+            'entry_mode,entry_session,previous_verdict,student_id\r\n'
+
+            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
             )
         return
@@ -170,7 +173,7 @@
             result,
             'certificate,current_level,current_session,current_verdict,'
-            'entry_mode,entry_session,previous_verdict\r\n'
-
-            'CERT1,200,2012,0,ug_ft,2010,0\r\n'
+            'entry_mode,entry_session,previous_verdict,student_id\r\n'
+
+            'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n'
             )
         return
@@ -206,6 +209,6 @@
         self.assertEqual(
             result,
-            'level,level_session,level_verdict,matric_number,reg_number\r\n'
-            ',,0,,\r\n'
+            'level,level_session,level_verdict,student_id\r\n'
+            ',,0,\r\n'
             )
         return
@@ -222,6 +225,6 @@
         self.assertEqual(
             result,
-            'level,level_session,level_verdict,matric_number,reg_number\r\n'
-            '100,2012,A,M123456,123456\r\n'
+            'level,level_session,level_verdict,student_id\r\n'
+            '100,2012,A,A111111\r\n'
             )
         return
@@ -236,6 +239,6 @@
         self.assertEqual(
             result,
-            'level,level_session,level_verdict,matric_number,reg_number\r\n'
-            '100,2012,A,M123456,123456\r\n'
+            'level,level_session,level_verdict,student_id\r\n'
+            '100,2012,A,A111111\r\n'
             )
         return
@@ -249,6 +252,6 @@
         self.assertEqual(
             result,
-            'level,level_session,level_verdict,matric_number,reg_number\r\n'
-            '100,2012,A,M123456,123456\r\n'
+            'level,level_session,level_verdict,student_id\r\n'
+            '100,2012,A,A111111\r\n'
             )
         return
@@ -285,6 +288,6 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
-            'matric_number,passmark,reg_number,score,semester,title\r\n'
-            '0,0,,,,,,0,,,,0,,\r\n'
+            'passmark,score,semester,title,student_id\r\n'
+            '0,0,,,,,,0,,0,,,\r\n'
             )
         return
@@ -303,6 +306,6 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
-            'matric_number,passmark,reg_number,score,semester,title\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,M123456,100,123456,0,2,Course 1\r\n'
+            'passmark,score,semester,title,student_id\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n'
             )
         return
@@ -318,6 +321,6 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
-            'matric_number,passmark,reg_number,score,semester,title\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,M123456,100,123456,0,2,Course 1\r\n'
+            'passmark,score,semester,title,student_id\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n'
             )
         return
@@ -332,6 +335,6 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,'
-            'matric_number,passmark,reg_number,score,semester,title\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,0,M123456,100,123456,0,2,Course 1\r\n'
+            'passmark,score,semester,title,student_id\r\n'
+            '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n'
             )
         return
@@ -368,9 +371,9 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,matric_number,p_category,p_id,'
+            'ac,amount_auth,creation_date,p_category,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
-            'r_code,r_desc,reg_number\r\n'
-
-            ',0.0,2012-04-01 13:12:01,,schoolfee,,,,,unpaid,,0.0,,,\r\n'
+            'r_code,r_desc,student_id\r\n'
+
+            ',0.0,2012-04-01 13:12:01,schoolfee,,,,,unpaid,,0.0,,,\r\n'
             )
         return
@@ -386,11 +389,11 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,matric_number,p_category,p_id,'
+            'ac,amount_auth,creation_date,p_category,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
-            'r_code,r_desc,reg_number\r\n'
-
-            '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,'
+            'r_code,r_desc,student_id\r\n'
+
+            '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,'
             'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
-            'r-code,,123456\r\n'
+            'r-code,,A111111\r\n'
             )
         return
@@ -405,11 +408,11 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,matric_number,p_category,p_id,'
+            'ac,amount_auth,creation_date,p_category,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
-            'r_code,r_desc,reg_number\r\n'
-
-            '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,'
+            'r_code,r_desc,student_id\r\n'
+
+            '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,'
             'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
-            'r-code,,123456\r\n'
+            'r-code,,A111111\r\n'
             )
         return
@@ -424,11 +427,11 @@
         self.assertEqual(
             result,
-            'ac,amount_auth,creation_date,matric_number,p_category,p_id,'
+            'ac,amount_auth,creation_date,p_category,p_id,'
             'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
-            'r_code,r_desc,reg_number\r\n'
-
-            '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,'
+            'r_code,r_desc,student_id\r\n'
+
+            '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,'
             'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
-            'r-code,,123456\r\n'
-            )
-        return
+            'r-code,,A111111\r\n'
+            )
+        return
