Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
assignment statistics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Bohn
assignment statistics
Commits
d3d238a8
Commit
d3d238a8
authored
2 years ago
by
Christopher Bohn
Browse files
Options
Downloads
Patches
Plain Diff
Reset A/B/C students; report correct number of students in each section
parent
c2d94629
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
analyze_grades.py
+6
-6
6 additions, 6 deletions
analyze_grades.py
with
6 additions
and
6 deletions
analyze_grades.py
+
6
−
6
View file @
d3d238a8
...
...
@@ -104,13 +104,13 @@ def print_sample_scores(assignment: CanvasAssignment,
major_partitions
:
Dict
[
Major
,
Set
[
CanvasUser
]],
students
:
Optional
[
List
[
CanvasUser
]]
=
None
)
->
None
:
points_possible
:
float
=
assignment
.
get_points_possible
()
a_student
:
Optional
[
CanvasUser
]
=
None
b_student
:
Optional
[
CanvasUser
]
=
None
c_student
:
Optional
[
CanvasUser
]
=
None
for
major
in
majors
:
student_subset
:
Set
[
CanvasUser
]
=
major_partitions
[
major
].
copy
()
if
students
is
None
\
else
major_partitions
[
major
].
intersection
(
students
)
selected_students
:
Set
[
CanvasUser
]
=
set
()
a_student
:
Optional
[
CanvasUser
]
=
None
b_student
:
Optional
[
CanvasUser
]
=
None
c_student
:
Optional
[
CanvasUser
]
=
None
if
len
(
student_subset
)
==
0
:
print
(
f
'
{
major
.
name
}
: no students.
'
)
elif
len
(
student_subset
)
<=
30
:
...
...
@@ -150,17 +150,17 @@ def print_statistics_for_some_majors(assignment: CanvasAssignment,
students
:
Optional
[
List
[
CanvasUser
]]
=
None
)
->
None
:
points_possible
:
float
=
assignment
.
get_points_possible
()
for
major
in
majors
:
student_subset
:
Set
[
CanvasUser
]
=
major_partitions
[
major
]
if
students
is
None
\
student_subset
:
Set
[
CanvasUser
]
=
major_partitions
[
major
]
.
copy
()
if
students
is
None
\
else
major_partitions
[
major
].
intersection
(
students
)
valued_scores
:
List
[
float
]
=
[
scores
[
student
]
for
student
in
student_subset
if
scores
[
student
]
is
not
None
]
try
:
average_score
:
float
=
statistics
.
mean
(
valued_scores
)
scaled_average_score
:
float
=
100
*
average_score
/
points_possible
print
(
f
'
{
major
.
name
:
27
}
students:
{
len
(
major_partitions
[
major
]
)
:
>
3
}
'
print
(
f
'
{
major
.
name
:
27
}
scored
students:
{
len
(
valued_scores
)
:
>
3
}
'
f
'
scaled mean score:
{
scaled_average_score
:
.
2
f
}
%
'
)
except
statistics
.
StatisticsError
as
exception
:
print
(
f
'
{
major
.
name
:
27
}
students:
{
len
(
major_partitions
[
major
]
)
:
>
3
}
no mean score computed:
{
exception
}
'
)
print
(
f
'
{
major
.
name
:
27
}
scored
students:
{
len
(
valued_scores
)
:
>
3
}
no mean score computed:
{
exception
}
'
)
def
print_statistics
(
assignment
:
CanvasAssignment
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment