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 14553)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py	(revision 14574)
@@ -2576,4 +2576,41 @@
         return
 
+    def test_student_course_registration_outstanding(self):
+        self.course = createObject('waeup.Course')
+        self.course.code = 'COURSE2'
+        self.course.semester = 1
+        self.course.credits = 45
+        self.course.passmark = 40
+        self.app['faculties']['fac1']['dep1'].courses.addCourse(
+            self.course)
+        IWorkflowState(self.student).setState('school fee paid')
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.open(self.student_path + '/studycourse/add')
+        self.browser.getControl("Create course list now").click()
+        self.assertEqual(self.student['studycourse']['100'].number_of_tickets, 1)
+        self.student['studycourse'].current_level = 200
+        self.browser.getLink("Study Course").click()
+        self.browser.getLink("Add course list").click()
+        self.assertMatches('...Add current level 200 (Year 2)...',
+                           self.browser.contents)
+        self.browser.getControl("Create course list now").click()
+        self.browser.getLink("200").click()
+        self.browser.getLink("Edit course list").click()
+        self.browser.getLink("here").click()
+        self.browser.getControl(name="form.course").value = ['COURSE2']
+        self.browser.getControl("Add course ticket").click()
+        # Carryover COURSE1 in level 200 already has 10 credits
+        self.assertMatches(
+            '...Total credits exceed 50...', self.browser.contents)
+        # If COURSE1 is outstanding, its credits won't be considered
+        self.student['studycourse']['200']['COURSE1'].outstanding = True
+        self.browser.getControl("Add course ticket").click()
+        self.assertMatches(
+            '...Successfully added COURSE2...', self.browser.contents)
+        return
+
     def test_postgraduate_student_access(self):
         self.certificate.study_mode = 'pg_ft'
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 14553)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py	(revision 14574)
@@ -492,5 +492,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,,,0,0,,,,0,\r\n'
+            '0.00,,,0,0,,,,0,\r\n'
             )
         return
@@ -510,5 +510,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
+            '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n'
             )
         return
@@ -526,5 +526,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
+            '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n'
             )
         return
@@ -541,5 +541,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
+            '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n'
             )
         return
@@ -560,5 +560,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
+            '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n'
             )
         return
@@ -579,5 +579,5 @@
             'validated_by,validation_date,'
             'student_id,number_of_tickets,certcode\r\n'
-            '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'
+            '0.00,100,2012,A,100,,,A111111,1,CERT1\r\n'
             )
         return
@@ -614,7 +614,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '0,0,,,,,,,0,,,,,,,\r\n'
+            '0,0,,,,,,,0,0,,,,,,,\r\n'
             )
         return
@@ -633,7 +633,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
@@ -650,7 +650,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
@@ -666,7 +666,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
@@ -686,7 +686,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
@@ -700,7 +700,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,100,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
@@ -711,5 +711,5 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
             )
@@ -724,7 +724,7 @@
             result,
             'automatic,carry_over,code,credits,dcode,fcode,level,level_session,'
-            'mandatory,passmark,score,semester,title,student_id,certcode,'
+            'mandatory,outstanding,passmark,score,semester,title,student_id,certcode,'
             'display_fullname\r\n'
-            '1,1,CRS1,100,DEP1,FAC1,110,2012,0,100,,2,Course 1,A111111,CERT1,'
+            '1,1,CRS1,100,DEP1,FAC1,110,2012,0,0,100,,2,Course 1,A111111,CERT1,'
             'Anna M. Tester\r\n'
             )
