Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scripts
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
Container registry
Model registry
Operate
Environments
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSCE 361
scripts
Commits
e5a8d1cb
Commit
e5a8d1cb
authored
Oct 18, 2019
by
Christopher Bohn
Browse files
Options
Downloads
Patches
Plain Diff
bug fixes
parent
aec77cab
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/canvas_classes.py
+2
-2
2 additions, 2 deletions
api/canvas_classes.py
grade_team_contribution.py
+3
-3
3 additions, 3 deletions
grade_team_contribution.py
with
5 additions
and
5 deletions
api/canvas_classes.py
+
2
−
2
View file @
e5a8d1cb
...
...
@@ -281,7 +281,7 @@ class CanvasAssignment:
def
get_submission_text
(
self
,
canvas_user
):
submission
=
self
.
canvas_assignment
.
get_submission
(
canvas_user
.
get_canvas_id
())
if
submission
.
submission_type
==
'
online_text_entry
'
:
return
submission
.
body
return
submission
.
body
# TODO: what happens if there is no user submission?
elif
submission
.
submission_type
==
'
online_url
'
:
return
submission
.
url
elif
self
.
is_quiz
():
...
...
@@ -306,7 +306,7 @@ class CanvasAssignment:
submission
=
self
.
canvas_assignment
.
get_submission
(
canvas_user
.
get_canvas_id
(),
include
=
[
'
submission_history
'
])
history
=
sorted
(
list
(
submission
.
submission_history
),
key
=
lambda
s
:
s
[
'
submitted_at
'
],
reverse
=
True
)
if
len
(
history
)
>
0
:
if
len
(
history
)
>
0
and
'
submission_data
'
in
history
[
0
]
:
submission_data
=
history
[
0
][
'
submission_data
'
]
for
datum
in
submission_data
:
answers
.
append
(
datum
[
'
text
'
])
...
...
This diff is collapsed.
Click to expand it.
grade_team_contribution.py
+
3
−
3
View file @
e5a8d1cb
...
...
@@ -75,11 +75,11 @@ if __name__ == '__main__':
if
option
is
options
[
1
]:
print
(
'
Which group?
'
)
student_groups
=
[
select_from_list
(
student_groups
,
'
student group
'
)]
for
student_group
in
student_groups
:
input
(
f
'
\n\n
Press
any key
to grade
{
student_group
}
'
)
for
student_group
in
student_groups
:
# TODO: Skip past graded groups
input
(
f
'
\n\n
Press
Enter
to grade
{
student_group
}
'
)
display_peer_reviews
(
peer_review_assignment
,
student_group
.
get_students
())
project_name
=
f
'
{
project_prefix
}{
student_group
.
get_name
().
split
()[
1
]
}
'
display_git_contributions
(
list
(
filter
(
lambda
p
:
p
.
get_name
()
==
project_name
,
projects
))[
0
])
#
display_git_contributions(list(filter(lambda p: p.get_name() == project_name, projects))[0])
# TODO: Ask if you want to grade (keep track of groups that you don't grade)
if
True
:
grade
(
peer_review_assignment
,
None
,
student_group
.
get_students
())
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