Index: /main/waeup.aaue/trunk/CHANGES.txt
===================================================================
--- /main/waeup.aaue/trunk/CHANGES.txt	(revision 13034)
+++ /main/waeup.aaue/trunk/CHANGES.txt	(revision 13035)
@@ -4,4 +4,6 @@
 1.2dev (unreleased)
 ===================
+
+* Activate late course registration payment.
 
 * To guarantee that cleared students pay both acceptance fees and
Index: /main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py	(revision 13034)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py	(revision 13035)
@@ -95,5 +95,5 @@
 
     maint_fee = schema.Float(
-        title = _(u'Maintenance Fee (ignored)'),
+        title = _(u'Maintenance Fee'),
         default = 0.0,
         required = True,
@@ -124,9 +124,16 @@
         )
 
-    late_fee = schema.Float(
-        title = _(u'Late Registration Fee'),
+    late_registration_fee = schema.Float(
+        title = _(u'Late Course Reg. Fee'),
         default = 0.0,
         required = True,
         )
+
+    coursereg_deadline = schema.Datetime(
+        title = _(u'Course Reg. Deadline'),
+        required = False,
+        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
+        )
+
 
     def getSessionString():
Index: /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13034)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13035)
@@ -19,5 +19,7 @@
 import shutil
 import tempfile
+import pytz
 import grok
+from datetime import datetime, timedelta, date
 from mechanize import LinkNotFoundError
 from hurry.workflow.interfaces import IWorkflowState
@@ -255,4 +257,37 @@
           'Add previous session payment ticket' in self.browser.contents)
         return
+
+    def test_late_registration(self):
+        # Login
+        delta = timedelta(days=10)
+        self.app['configuration'][
+            '2004'].coursereg_deadline = datetime.now(pytz.utc) - delta
+        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.payments_path)
+        self.browser.open(self.payments_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['late_registration']
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...ticket created...',
+                           self.browser.contents)
+        self.browser.open(self.payments_path)
+        ctrl = self.browser.getControl(name='val_id')
+        value = ctrl.options[0]
+        self.browser.getLink("Study Course").click()
+        self.browser.getLink("Add course list").click()
+        self.assertMatches('...Add current level 100 (Year 1)...',
+                           self.browser.contents)
+        self.browser.getControl("Create course list now").click()
+        self.browser.getLink("100").click()
+        self.browser.getLink("Edit course list").click()
+        self.browser.getControl("Register course list").click()
+        self.assertTrue('Course registration has ended. Please pay' in self.browser.contents)
+        self.student['payments'][value].approve()
+        self.browser.getControl("Register course list").click()
+        self.assertTrue('Course list has been registered' in self.browser.contents)
+        self.assertEqual(self.student.state, 'courses registered')
 
     def deactivated_test_student_course_registration(self):
Index: /main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 13034)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 13035)
@@ -152,5 +152,5 @@
             p_item = student['studycourse'].certificate.code
         elif category == 'late_registration':
-            amount = academic_session.late_fee
+            amount = academic_session.late_registration_fee
         elif category == 'schoolfee':
             try:
Index: /main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
===================================================================
--- /main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py	(revision 13034)
+++ /main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py	(revision 13035)
@@ -38,5 +38,5 @@
         'transfer': 'Transfer Fee',
         'transcript': 'Transcript Fee',
-        'late_registration': 'Late Registration Fee',
+        'late_registration': 'Late Course Registration Fee',
         }
 
@@ -52,5 +52,5 @@
         #'transfer': 'Transfer Fee',
         'transcript': 'Transcript Fee',
-        'late_registration': 'Late Registration Fee',
+        'late_registration': 'Late Course Registration Fee',
         }
 
