Ignore:
Timestamp:
21 May 2012, 10:01:37 (13 years ago)
Author:
Henrik Bettermann
Message:

next_session_allowed is False if certificate is None.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py

    r8472 r8483  
    4545    @property
    4646    def next_session_allowed(self):
     47        certificate = getattr(self, 'certificate', None)
     48        if certificate == None:
     49            return False
    4750        if self.getStudent().state in (CLEARED, RETURNING):
    4851            return True
     
    5154            return True
    5255        return False
     56
     57    @property
     58    def is_postgrad(self):
     59        return self.certificate.study_mode.startswith('pg')
     60        #return cert.start_level == 999 or cert.end_level == 999
    5361
    5462    def addStudentStudyLevel(self, cert, studylevel):
     
    105113        return
    106114
    107     @property
    108     def is_postgrad(self):
    109         cert = getattr(self, 'certificate', None)
    110         if cert is not None:
    111             return cert.study_mode.startswith('pg')
    112             #return cert.start_level == 999 or cert.end_level == 999
    113         return False
    114 
    115115StudentStudyCourse = attrs_to_fields(StudentStudyCourse)
    116116
Note: See TracChangeset for help on using the changeset viewer.