Changeset 14133 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 27 Aug 2016, 06:22:10 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r14102 r14133 1258 1258 (Term, 'semester', 1.5), 1259 1259 (Cred, 'credits', 1.5), 1260 (Score, ' score', 1.5),1260 (Score, 'total_score', 1.5), 1261 1261 (Grade, 'grade', 1.5), 1262 1262 ] -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r13871 r14133 612 612 level_session = Attribute('Session of the study level the ticket has been added to') 613 613 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') 616 617 removable_by_student = Attribute('True if student is allowed to remove the ticket') 617 618 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 114 114 level_gpa = 0.0 115 115 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: 118 118 co_ticket = find_carry_over(ticket) 119 119 if co_ticket is not None and co_ticket.weight is not None: … … 135 135 level_gpa = 0.0 136 136 for ticket in self.values(): 137 if ticket. score is not None:137 if ticket.total_score is not None: 138 138 credits_counted += ticket.credits 139 139 credits_weighted += ticket.credits * ticket.weight … … 156 156 credits_passed = 0 157 157 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: 160 160 failed += 1 161 161 credits_failed += ticket.credits … … 355 355 356 356 @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 357 365 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] 361 369 362 370 @property 363 371 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] 367 375 368 376 CourseTicket = attrs_to_fields(CourseTicket)
Note: See TracChangeset for help on using the changeset viewer.