Changeset 13528


Ignore:
Timestamp:
2 Dec 2015, 17:26:21 (9 years ago)
Author:
Henrik Bettermann
Message:

All pg certificates are 'special'.

File:
1 edited

Legend:

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

    r9357 r13528  
    3030
    3131class CustomStudentStudyCourse(NigeriaStudentStudyCourse):
    32     """This is a container for study levels.
     32    """This is a container for study levels. All pg students
     33    must register courses. Thus all pg certificates are 'special'
     34    and the property method `ICertificate.check_pg_conditions`
     35    is not applied.
    3336    """
    3437    grok.implements(ICustomStudentStudyCourse, IStudentNavigation)
    3538    grok.provides(ICustomStudentStudyCourse)
    3639
     40    @property
     41    def is_postgrad(self):
     42        if self.certificate is None:
     43            return False
     44        return self.certificate.study_mode.startswith('special_pg')
    3745
     46    @property
     47    def is_special_postgrad(self):
     48        return self.is_postgrad
    3849
    3950CustomStudentStudyCourse = attrs_to_fields(CustomStudentStudyCourse)
Note: See TracChangeset for help on using the changeset viewer.