Ignore:
Timestamp:
12 Oct 2015, 07:43:56 (9 years ago)
Author:
Henrik Bettermann
Message:

It's the student's previous verdict which allows to book accommodation.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r13303 r13309  
    131131    def omit_fields(self):
    132132        omit_fields = ('password', 'suspended', 'suspended_comment',
    133                 'phone', 'adm_code', 'email', 'date_of_birth')
     133                       'phone', 'adm_code', 'email', 'date_of_birth')
    134134        if self.context.faccode == 'JUPEB':
    135135            omit_fields += ('faculty', 'department')
     
    141141        line0 = ''
    142142        if self.context.faccode == 'JUPEB':
    143             line0 = 'Joint Universities Preliminary Examinations Board (JUPEB)\n'
     143            line0 = 'Joint Universities Preliminary Examinations Board (JUPEB)'
    144144        line1 = translate(_('Clearance Slip of'),
    145145            'waeup.kofa', target_language=portal_language) \
    146146            + ' %s' % self.context.display_fullname
    147         return '%s%s' % (line0, line1)
     147        return '%s\n%s' % (line0, line1)
    148148
    149149    def _sigsInFooter(self):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r13296 r13309  
    967967        self.assertMatches('...Your are not eligible...',
    968968            self.browser.contents)
    969         self.student['studycourse'].current_verdict = 'A'
     969        self.student['studycourse'].previous_verdict = 'A'
    970970        self.browser.getLink("Book accommodation").click()
    971971        self.assertMatches('...Activation Code:...',
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r13298 r13309  
    7777        if stage not in ('fr', 'fi'):
    7878            return _("Only fresh and final year students are allowed to book accommodation.")
    79         if stage != 'fr' and not student.current_verdict in ('A', 'B'):
     79        if stage != 'fr' and not student['studycourse'].previous_verdict in ('A', 'B'):
    8080            return _("Your are not eligible to book accommodation.")
    8181        if str(acc_details['booking_session']) in student['accommodation'].keys():
     
    183183            if stage == 'fr':
    184184                amount += 500.0
    185             elif stage == 'fi' and student.current_verdict in ('A', 'B'):
     185            elif stage == 'fi' and student[
     186                'studycourse'].previous_verdict in ('A', 'B'):
    186187                amount += 300.0
    187188            else:
Note: See TracChangeset for help on using the changeset viewer.