- submissions = sorted(Submission.objects.all(), key = lambda s: -s.final_result)
- toret = render_to_string('wtem/admin_report.csv', dict(
- submissionsSet = SubmissionsSet(submissions),
- #exercise_ids = map(str, range(1,len(exercises)+1))
- exercise_ids = [str(e['id']) for e in exercises]
- ))
- response = HttpResponse(toret, content_type = 'text/csv')
+ submissions = sorted(Submission.objects.all(), key=lambda s: -s.final_result)
+ toret = render_to_string('wtem/admin_report.csv', {
+ 'submissionsSet': SubmissionsSet(submissions),
+ 'exercise_ids': [str(e['id']) for e in exercises]})
+ response = HttpResponse(toret, content_type='text/csv')