Skip to content

How to download student submissions for assignment? #634

Discussion options

You must be logged in to vote

Oooo! I got it! I could close this thread now, but perhaps I should leave it open in case wiser people want to chime in?

ls = 0
for s in subs:
    print(f"-----\nls={ls}")
    if len(s.attachments) > 0:
        thefile = s.attachments[-1]
        thefile.download(f"a{s.assignment_id}_u{s.user_id}_{thefile}")
    ls+= 1

This will download my students' submitted files to the current directory. Inspecting them locally shows that the files are intact! :-)

Admins, feel free to close if you like.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@whampt
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by drscotthawley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants