Changeset 14133 for main


Ignore:
Timestamp:
27 Aug 2016, 06:22:10 (8 years ago)
Author:
Henrik Bettermann
Message:

Add property attribute total_score in order to make provision
for additional scores (like contineous assessments) in custom
packages.

Location:
main/waeup.kofa/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r13959 r14133  
    441.4.2.dev0 (unreleased)
    55=======================
     6
     7* Add property attribute `total_score` in order to make provision
     8  for additional scores (like contineous assessments) in custom
     9  packages.
     10
     11* Make provision against storing other objects than applicant payments
     12  in applicant containers.
    613
    714* Count mandates on configuration page and provide 'Purge' button.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r14102 r14133  
    12581258                         (Term, 'semester', 1.5),
    12591259                         (Cred, 'credits', 1.5),
    1260                          (Score, 'score', 1.5),
     1260                         (Score, 'total_score', 1.5),
    12611261                         (Grade, 'grade', 1.5),
    12621262                         ]
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r13871 r14133  
    612612    level_session = Attribute('Session of the study level the ticket has been added to')
    613613    level = Attribute('Level value of the study level the ticket has been added to')
    614     grade = Attribute('Grade calculated from score')
    615     weight = Attribute('Weight calculated from score')
     614    total_score = Attribute('Score')
     615    grade = Attribute('Grade calculated from total score')
     616    weight = Attribute('Weight calculated from total score')
    616617    removable_by_student = Attribute('True if student is allowed to remove the ticket')
    617618    editable_by_lecturer = Attribute('True if lecturer is allowed to edit the ticket')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r14123 r14133  
    114114        level_gpa = 0.0
    115115        for ticket in self.values():
    116             if ticket.carry_over is False and ticket.score:
    117                 if ticket.score < ticket.passmark:
     116            if ticket.carry_over is False and ticket.total_score:
     117                if ticket.total_score < ticket.passmark:
    118118                    co_ticket = find_carry_over(ticket)
    119119                    if co_ticket is not None and co_ticket.weight is not None:
     
    135135        level_gpa = 0.0
    136136        for ticket in self.values():
    137             if ticket.score is not None:
     137            if ticket.total_score is not None:
    138138                credits_counted += ticket.credits
    139139                credits_weighted += ticket.credits * ticket.weight
     
    156156        credits_passed = 0
    157157        for ticket in self.values():
    158             if ticket.score is not None:
    159                 if ticket.score < ticket.passmark:
     158            if ticket.total_score is not None:
     159                if ticket.total_score < ticket.passmark:
    160160                    failed += 1
    161161                    credits_failed += ticket.credits
     
    355355
    356356    @property
     357    def total_score(self):
     358        """Returns the total score of this ticket. In the base package
     359        this is simply the score. In customized packages this could be
     360        something else.
     361        """
     362        return self.score
     363
     364    @property
    357365    def grade(self):
    358         """Returns the grade calculated from score.
    359         """
    360         return getGradeWeightFromScore(self.score)[0]
     366        """Returns the grade calculated from total score.
     367        """
     368        return getGradeWeightFromScore(self.total_score)[0]
    361369
    362370    @property
    363371    def weight(self):
    364         """Returns the weight calculated from score.
    365         """
    366         return getGradeWeightFromScore(self.score)[1]
     372        """Returns the weight calculated from total score.
     373        """
     374        return getGradeWeightFromScore(self.total_score)[1]
    367375
    368376CourseTicket = attrs_to_fields(CourseTicket)
Note: See TracChangeset for help on using the changeset viewer.