Skip to content

Commit

Permalink
return min submission times
Browse files Browse the repository at this point in the history
  • Loading branch information
rahularya50 committed Jan 9, 2020
1 parent 0d53c11 commit 5e1d94e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions server/jobs/export_grades.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,12 @@ def export_student_grades(student, assignments, all_records, *, export_submit_ti

if export_submit_time:
if scores_for_each_kind:
candidate_backup = next(iter(scores_for_each_kind.values()))[1]
if all(
backup.submission_time == candidate_backup.submission_time
for _, backup in scores_for_each_kind.values()
):
student_row.append(candidate_backup.submission_time)
else:
student_row.append("Multiple Submissions Scored")
student_row.append(
min(
backup.submission_time
for _, backup in scores_for_each_kind.values()
)
)
else:
student_row.append("No Submission")
return student_row
Expand Down

0 comments on commit 5e1d94e

Please sign in to comment.