Ignore:
Timestamp:
17 Nov 2017, 16:12:06 (7 years ago)
Author:
Henrik Bettermann
Message:

Add ´is_student´ property attribute to student objects.

File:
1 edited

Legend:

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

    r14835 r14902  
    135135                       'phone', 'adm_code', 'email', 'date_of_birth',
    136136                       'flash_notice')
    137         if self.context.faccode == 'JUPEB':
     137        if self.context.is_jupeb:
    138138            omit_fields += ('faculty', 'department')
    139139        return omit_fields
     
    143143        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    144144        line0 = ''
    145         if self.context.faccode == 'JUPEB':
     145        if self.context.is_jupeb:
    146146            line0 = 'Joint Universities Preliminary Examinations Board (JUPEB)\n'
    147147        line1 = translate(_('Clearance Slip of'),
     
    307307
    308308    def update(self):
    309         if not self.context.flash_notice or self.context.faccode != 'JUPEB' \
     309        if not self.context.flash_notice or not self.context.is_jupeb \
    310310            or not 'results' in self.context.flash_notice.lower():
    311311            self.flash(_('Forbidden'), type="warning")
Note: See TracChangeset for help on using the changeset viewer.