Ignore:
Timestamp:
17 Jul 2022, 08:50:14 (2 years ago)
Author:
Henrik Bettermann
Message:

Add continuous assessment (ca) field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/studylevel.py

    r16949 r17025  
    8181    grok.provides(ICustomCourseTicket)
    8282
     83    @property
     84    def total_score(self):
     85        """Returns ca + score or imported total score.
     86        """
     87        if self.outstanding:
     88            return None
     89        # Override total_score if value has been imported
     90        if getattr(self, 'imported_ts', None):
     91            return self.imported_ts
     92        if self.score == -1:
     93            return 0
     94        if not None in (self.score, self.ca):
     95            return self.score + self.ca
     96        return None
    8397
    8498CustomCourseTicket = attrs_to_fields(CustomCourseTicket)
Note: See TracChangeset for help on using the changeset viewer.