Skip to content
Snippets Groups Projects
Commit 35ce36c7 authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

Include username in csv export

parent c57f170e
No related branches found
No related tags found
1 merge request!1Resolve "Fix the stuff from the review the Henrik Brosenne"
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -12,7 +12,7 @@ def export_csv(request):
response['Content-Disposition'] = 'attachment; filename="grady_results.csv"'
writer = csv.writer(response)
writer.writerow(['Matrikel', 'Name', 'Summe'] +
writer.writerow(['Matrikel', 'Username', 'Name', 'Sum'] +
[s.name for s in SubmissionType.objects.all().order_by('name')])
for student in Student.objects.all():
......@@ -22,6 +22,7 @@ def export_csv(request):
score_list = [0] * SubmissionType.objects.count()
writer.writerow([
student.matrikel_no,
student.user.username,
student.name,
sum(score_list),
*score_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment