Course Validation and Course Quality APIs

This commit is contained in:
Nimisha Asthagiri
2018-06-05 21:25:21 -04:00
parent 947d82737e
commit 8db2dd47dd
15 changed files with 830 additions and 90 deletions

View File

@@ -262,6 +262,13 @@ class WeightedSubsectionsGrader(CourseGrader):
def __init__(self, subgraders):
self.subgraders = subgraders
@property
def sum_of_weights(self):
sum = 0
for _, _, weight in self.subgraders:
sum += weight
return sum
def grade(self, grade_sheet, generate_random_scores=False):
total_percent = 0.0
section_breakdown = []