Changeset 13035


Ignore:
Timestamp:
5 Jun 2015, 08:25:11 (9 years ago)
Author:
Henrik Bettermann
Message:

Activate late course registration payment.

Location:
main/waeup.aaue/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/CHANGES.txt

    r12975 r13035  
    441.2dev (unreleased)
    55===================
     6
     7* Activate late course registration payment.
    68
    79* To guarantee that cleared students pay both acceptance fees and
  • main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py

    r11653 r13035  
    9595
    9696    maint_fee = schema.Float(
    97         title = _(u'Maintenance Fee (ignored)'),
     97        title = _(u'Maintenance Fee'),
    9898        default = 0.0,
    9999        required = True,
     
    124124        )
    125125
    126     late_fee = schema.Float(
    127         title = _(u'Late Registration Fee'),
     126    late_registration_fee = schema.Float(
     127        title = _(u'Late Course Reg. Fee'),
    128128        default = 0.0,
    129129        required = True,
    130130        )
     131
     132    coursereg_deadline = schema.Datetime(
     133        title = _(u'Course Reg. Deadline'),
     134        required = False,
     135        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
     136        )
     137
    131138
    132139    def getSessionString():
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r12504 r13035  
    1919import shutil
    2020import tempfile
     21import pytz
    2122import grok
     23from datetime import datetime, timedelta, date
    2224from mechanize import LinkNotFoundError
    2325from hurry.workflow.interfaces import IWorkflowState
     
    255257          'Add previous session payment ticket' in self.browser.contents)
    256258        return
     259
     260    def test_late_registration(self):
     261        # Login
     262        delta = timedelta(days=10)
     263        self.app['configuration'][
     264            '2004'].coursereg_deadline = datetime.now(pytz.utc) - delta
     265        IWorkflowState(self.student).setState('school fee paid')
     266        self.browser.open(self.login_path)
     267        self.browser.getControl(name="form.login").value = self.student_id
     268        self.browser.getControl(name="form.password").value = 'spwd'
     269        self.browser.getControl("Login").click()
     270        self.browser.open(self.payments_path)
     271        self.browser.open(self.payments_path + '/addop')
     272        self.browser.getControl(name="form.p_category").value = ['late_registration']
     273        self.browser.getControl("Create ticket").click()
     274        self.assertMatches('...ticket created...',
     275                           self.browser.contents)
     276        self.browser.open(self.payments_path)
     277        ctrl = self.browser.getControl(name='val_id')
     278        value = ctrl.options[0]
     279        self.browser.getLink("Study Course").click()
     280        self.browser.getLink("Add course list").click()
     281        self.assertMatches('...Add current level 100 (Year 1)...',
     282                           self.browser.contents)
     283        self.browser.getControl("Create course list now").click()
     284        self.browser.getLink("100").click()
     285        self.browser.getLink("Edit course list").click()
     286        self.browser.getControl("Register course list").click()
     287        self.assertTrue('Course registration has ended. Please pay' in self.browser.contents)
     288        self.student['payments'][value].approve()
     289        self.browser.getControl("Register course list").click()
     290        self.assertTrue('Course list has been registered' in self.browser.contents)
     291        self.assertEqual(self.student.state, 'courses registered')
    257292
    258293    def deactivated_test_student_course_registration(self):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r12975 r13035  
    152152            p_item = student['studycourse'].certificate.code
    153153        elif category == 'late_registration':
    154             amount = academic_session.late_fee
     154            amount = academic_session.late_registration_fee
    155155        elif category == 'schoolfee':
    156156            try:
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r12504 r13035  
    3838        'transfer': 'Transfer Fee',
    3939        'transcript': 'Transcript Fee',
    40         'late_registration': 'Late Registration Fee',
     40        'late_registration': 'Late Course Registration Fee',
    4141        }
    4242
     
    5252        #'transfer': 'Transfer Fee',
    5353        'transcript': 'Transcript Fee',
    54         'late_registration': 'Late Registration Fee',
     54        'late_registration': 'Late Course Registration Fee',
    5555        }
    5656
Note: See TracChangeset for help on using the changeset viewer.