Ignore:
Timestamp:
12 Nov 2023, 07:45:02 (12 months ago)
Author:
Henrik Bettermann
Message:

… only ute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py

    r17632 r17638  
    615615        course3_in_form = self.request.form.get('form.course3', None)
    616616        cat = queryUtility(ICatalog, name='certificates_catalog')
    617         if course2_in_form:
    618             if  not self.context.jamb_score:
    619                 self.flash(("Total JAMB score not set."), type='danger')
    620                 self.redirect(self.url(self.context))
    621                 return
    622             results = list(
    623                 cat.searchResults(code=(course2_in_form, course2_in_form)))
    624             cutoff = getattr(results[0], 'custom_float_1')
    625             if cutoff and cutoff > self.context.jamb_score:
    626                 self.flash("You do not meet the minimum cutoff mark for your 2nd choice course. Please consider selecting an alternative choice.",
    627                     type='danger')
    628                 self.redirect(self.url(self.context))
    629                 return
    630         if course3_in_form:
    631             if  not self.context.jamb_score:
    632                 self.flash(("Total JAMB score not set."), type='danger')
    633                 self.redirect(self.url(self.context))
    634                 return
    635             results = list(
    636                 cat.searchResults(code=(course3_in_form, course3_in_form)))
    637             cutoff = getattr(results[0], 'custom_float_1')
    638             if cutoff and cutoff > self.context.jamb_score:
    639                 self.flash("You do not meet the minimum cutoff mark for your 3rd choice course. Please consider selecting an alternative choice.",
    640                     type='danger')
    641                 self.redirect(self.url(self.context))
    642                 return
     617        if self.target is not None and self.target == 'utme':
     618            if course2_in_form:
     619                if  not self.context.jamb_score:
     620                    self.flash(("Total JAMB score not set."), type='danger')
     621                    self.redirect(self.url(self.context))
     622                    return
     623                results = list(
     624                    cat.searchResults(code=(course2_in_form, course2_in_form)))
     625                cutoff = getattr(results[0], 'custom_float_1')
     626                if cutoff and cutoff > self.context.jamb_score:
     627                    self.flash("You do not meet the minimum cutoff mark for your 2nd choice course. Please consider selecting an alternative choice.",
     628                        type='danger')
     629                    self.redirect(self.url(self.context))
     630                    return
     631            if course3_in_form:
     632                if  not self.context.jamb_score:
     633                    self.flash(("Total JAMB score not set."), type='danger')
     634                    self.redirect(self.url(self.context))
     635                    return
     636                results = list(
     637                    cat.searchResults(code=(course3_in_form, course3_in_form)))
     638                cutoff = getattr(results[0], 'custom_float_1')
     639                if cutoff and cutoff > self.context.jamb_score:
     640                    self.flash("You do not meet the minimum cutoff mark for your 3rd choice course. Please consider selecting an alternative choice.",
     641                        type='danger')
     642                    self.redirect(self.url(self.context))
     643                    return
    643644        if getattr(self.context.course1, 'code', 'nocourse') == course2_in_form:
    644645            self.flash(_('2nd choice course must differ from 1st choice course.'),
Note: See TracChangeset for help on using the changeset viewer.