Christopher Bohn (779fdae6) at 25 May 09:17
Report None for individual student's scaled score when there is no ...
Christopher Bohn (d3d238a8) at 24 May 17:55
Reset A/B/C students; report correct number of students in each sec...
Christopher Bohn (c2d94629) at 23 May 18:38
Improved performance by memorizing scores to reduce network accesses
Christopher Bohn (67c3829c) at 23 May 17:48
Merge remote-tracking branch 'origin/hosted' into hosted
... and 1 more commit
Christopher Bohn (502ab1c0) at 02 Jun 14:09
You don't need to install canvasapi unless running your own Linux box
The application should be able to handle these cases gracefully but possibly not usefully. After we have assignments that fit these style of markings, determine how the application handles them and if necessary make adjustments to provide meaningful results.
Canvas allows assignments to display grades in different manners:
I accidentally selected an assignment with Complete/Incomplete
set on it, and the script just crashed:
Traceback (most recent call last):
File "./analyze_grades.py", line 147, in <module>
assess_course(course_selection)
File "./analyze_grades.py", line 138, in assess_course
assess_assignments(course, major_partitions, answer != '' and answer[0].upper() == 'Y')
File "./analyze_grades.py", line 106, in assess_assignments
print_statistics(oat_assignment, major_partitions)
File "./analyze_grades.py", line 74, in print_statistics
print_statistics_for_some_majors(assignment, computing_majors, major_partitions)
File "./analyze_grades.py", line 59, in print_statistics_for_some_majors
scores: List[float] = [assignment.get_score(student) for student in student_subset
File "./analyze_grades.py", line 60, in <listcomp>
if assignment.get_score(student) is not None]
File "/home/fac/cabohn/abet-oat/api/canvas_classes.py", line 523, in get_score
return float(submission.grade) if submission.grade is not None else None
ValueError: could not convert string to float: 'complete'
The script probably should handle that a bit more gracefully.
And I do not have any assignments to test it, but suspect if one is set to something other than Points
(such as Percentage
) it would probably not work as expected--though it might not crash in that case.
Another edge case is probably if the total points is set to 0 - does it divide by 0 on line 63?
The immediate problems are resolved. I'll open a separate issue to test the behavior for Percentage
/ Letter Grade
/ GPA Scale
assignments.
Christopher Bohn (cf9de52c) at 07 Jan 10:24
Warns users away from 0-point assignments. Closes #1
... and 1 more commit
Good catch.
If the total points is set to 0 and the assignment is ungraded, the StatisticsError on line 62 is caught:
Enter selection: 16
Statistics for GitLab username:
Software Engineering students: 50 no mean score computed: mean requires at least one data point
Computer Science students: 6 no mean score computed: mean requires at least one data point
(etc.)
If the total points is set to 0 and the assignment is graded (such as when treating an assignment as extra credit within a specific grading category), then it does divide by 0 on line 63:
Enter selection: 14
Statistics for Chapter 12 Quiz:
Traceback (most recent call last):
File "abet-oat/analyze_grades.py", line 147, in <module>
assess_course(course_selection)
File "abet-oat/analyze_grades.py", line 138, in assess_course
assess_assignments(course, major_partitions, answer != '' and answer[0].upper() == 'Y')
File "abet-oat/analyze_grades.py", line 106, in assess_assignments
print_statistics(oat_assignment, major_partitions)
File "abet-oat/analyze_grades.py", line 74, in print_statistics
print_statistics_for_some_majors(assignment, computing_majors, major_partitions)
File "abet-oat/analyze_grades.py", line 63, in print_statistics_for_some_majors
scaled_average_score: float = 100 * average_score / points_possible
ZeroDivisionError: float division by zero
Canvas allows assignments to display grades in different manners:
I accidentally selected an assignment with Complete/Incomplete
set on it, and the script just crashed:
Traceback (most recent call last):
File "./analyze_grades.py", line 147, in <module>
assess_course(course_selection)
File "./analyze_grades.py", line 138, in assess_course
assess_assignments(course, major_partitions, answer != '' and answer[0].upper() == 'Y')
File "./analyze_grades.py", line 106, in assess_assignments
print_statistics(oat_assignment, major_partitions)
File "./analyze_grades.py", line 74, in print_statistics
print_statistics_for_some_majors(assignment, computing_majors, major_partitions)
File "./analyze_grades.py", line 59, in print_statistics_for_some_majors
scores: List[float] = [assignment.get_score(student) for student in student_subset
File "./analyze_grades.py", line 60, in <listcomp>
if assignment.get_score(student) is not None]
File "/home/fac/cabohn/abet-oat/api/canvas_classes.py", line 523, in get_score
return float(submission.grade) if submission.grade is not None else None
ValueError: could not convert string to float: 'complete'
The script probably should handle that a bit more gracefully.
And I do not have any assignments to test it, but suspect if one is set to something other than Points
(such as Percentage
) it would probably not work as expected--though it might not crash in that case.
Another edge case is probably if the total points is set to 0 - does it divide by 0 on line 63?
Christopher Bohn (b1724530) at 06 Jan 17:54
Fixed typo in README
Christopher Bohn (c5a0c041) at 06 Jan 17:52
Updated README to show json file screenshot instead of config.py sc...
Christopher Bohn (595a7a76) at 06 Jan 17:43
Tweaks to work while hosted on cse.unl.edu
Christopher Bohn (0c30eded) at 06 Jan 16:45
Christopher Bohn (0c30eded) at 06 Jan 16:44
Christopher Bohn (0c30eded) at 26 Dec 19:48
Updated README to reflect option to print statistics by course section
Christopher Bohn (b9415805) at 26 Dec 18:15
Christopher Bohn (a200641c) at 26 Dec 18:15
Added option to print statistics by course section
Christopher Bohn (b9415805) at 26 Dec 14:41
Eliminated need for csv files with student majors and course lists
... and 2 more commits