if exercise_checked_manually(exercise):
marks_by_examiner = self.get_exercise_marks_by_examiner(exercise_id)
if len(marks_by_examiner):
- return max(marks_by_examiner.values())
+ return max(map(int, marks_by_examiner.values()))
else:
return None
else:
@register.simple_tag
def csv_row_fragment(exercise_id, submission, submissionSet):
- toret = '%s' % submission.final_result
- examiners = submissionSet.examiners_by_exercise[exercise_id]
+ final_mark = submission.get_final_exercise_mark(exercise_id)
+ toret = str(final_mark) if isinstance(final_mark, int) else '-'
+ examiners = submissionSet.examiners_by_exercise.get(exercise_id, [])
marks_by_examiner = submission.get_exercise_marks_by_examiner(exercise_id)
for examiner in examiners:
- mark = marks_by_examiner[examiner.id]
+ mark = marks_by_examiner.get(str(examiner.id), None)
toret += ','
if mark is None:
toret += '-'