1 from django import template
3 register = template.Library()
7 def csv_header(exercise_id, submissionSet):
8 examiners = submissionSet.examiners_by_exercise.get(exercise_id, [])
9 examiners_string = ','.join(['zad %s - %s' % (exercise_id, user.username) for user in examiners])
10 toret = ',zad %s' % exercise_id
12 toret += ',' + examiners_string
16 def csv_row_fragment(exercise_id, submission, submissionSet):
17 toret = '%s' % submission.final_result
18 examiners = submissionSet.examiners_by_exercise[exercise_id]
19 marks_by_examiner = submission.get_exercise_marks_by_examiner(exercise_id)
20 for examiner in examiners:
21 mark = marks_by_examiner[examiner.id]