Changeset 6814


Ignore:
Timestamp:
21 Sep 2011, 16:44:12 (13 years ago)
Author:
uli
Message:

Make student certificates better accessible, for instance by catalog.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py

    r6786 r6814  
    2222    matric_number = index.Field(attribute='matric_number')
    2323    state = index.Field(attribute='state')
     24    certificate = index.Field(attribute='certificate')
    2425
    2526class StudentQueryResultItem(object):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py

    r6806 r6814  
    9292    state = Attribute('Returns the registration state of a student')
    9393    password = Attribute('Encrypted password of a student')
     94    certificate = Attribute('The certificate of any chosen study course')
    9495
    9596    def loggerInfo(ob_class, comment):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/student.py

    r6769 r6814  
    6666        return self
    6767
     68    @property
     69    def certificate(self):
     70        cert = getattr(self.get('studycourse', None), 'certificate', None)
     71        return cert
     72
    6873# Set all attributes of Student required in IStudent as field
    6974# properties. Doing this, we do not have to set initial attributes
Note: See TracChangeset for help on using the changeset viewer.