Fix filepath-related crashes, organize files better, download single-student submissions, fix dependencies, etc. #6

Merged
17acres merged 10 commits from master into master 2021-07-09 17:06:15 -06:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 63151c3075 - Show all commits

View File

@ -278,8 +278,9 @@ def download_submission_attachments(course, course_view):
for assignment in course_view.assignments: for assignment in course_view.assignments:
for submission in assignment.submissions: for submission in assignment.submissions:
attachment_dir = os.path.join(course_dir, "assignments", assignment.title, attachment_dir = os.path.join(course_dir, "assignments", assignment.title)
str(submission.user_id)) if(len(assignment.submissions)!=1):
attachment_dir = os.path.join(attachment_dir,str(submission.user_id))
if (not os.path.exists(attachment_dir)) and (submission.attachments): if (not os.path.exists(attachment_dir)) and (submission.attachments):
os.makedirs(attachment_dir) os.makedirs(attachment_dir)
for attachment in submission.attachments: for attachment in submission.attachments: