Commit cf9de52c authored by Christopher Bohn's avatar Christopher Bohn 🤔
Browse files

Warns users away from 0-point assignments. Closes #1

parent 12581d59
......@@ -68,11 +68,14 @@ def print_statistics_for_some_majors(assignment: CanvasAssignment, majors: Set[M
def print_statistics(assignment: CanvasAssignment, major_partitions: Dict[Major, Set[CanvasUser]]) -> None:
print(f'Statistics for {assignment}:')
computing_majors: Set[Major] = {major for major in Major.majors if major.is_computing_major}
non_computing_majors: Set[Major] = {major for major in major_partitions.keys() if not major.is_computing_major}
print_statistics_for_some_majors(assignment, computing_majors, major_partitions)
print_statistics_for_some_majors(assignment, non_computing_majors, major_partitions)
if assignment.get_points_possible() == 0:
print(f'WARNING: {assignment} is a 0-point assignment; cannot compute scaled mean score.')
else:
print(f'Statistics for {assignment}:')
computing_majors: Set[Major] = {major for major in Major.majors if major.is_computing_major}
non_computing_majors: Set[Major] = {major for major in major_partitions.keys() if not major.is_computing_major}
print_statistics_for_some_majors(assignment, computing_majors, major_partitions)
print_statistics_for_some_majors(assignment, non_computing_majors, major_partitions)
def print_statistics_by_section(course: CanvasCourse, assignment: CanvasAssignment,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment