From 0e185f5046bd271a771df7747e00b8da702f74d5 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 13 Apr 2024 20:15:07 +0200 Subject: [PATCH] Add trigrams in column headers in Google Sheets Signed-off-by: Emmy D'Anello --- participation/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/participation/models.py b/participation/models.py index 9fa68c8..158f866 100644 --- a/participation/models.py +++ b/participation/models.py @@ -985,9 +985,11 @@ class Pool(models.Model): header = [ sum(([f"Problème {passage.solution_number}"] + (passage_width - 1) * [""] for passage in passages), start=["Problème", ""]), - sum((["Défenseur⋅se", "", "Opposant⋅e", "", "Rapporteur⋅rice", ""] - + (["Observateur⋅rice"] if pool_size == 4 else []) - for _passage in passages), start=["Rôle", ""]), + sum(([f"Défenseur⋅se ({passage.defender.team.trigram})", "", + f"Opposant⋅e ({passage.opponent.team.trigram})", "", + f"Rapporteur⋅rice ({passage.reporter.team.trigram})", ""] + + ([f"Observateur⋅rice ({passage.observer.team.trigram})"] if pool_size == 4 else []) + for passage in passages), start=["Rôle", ""]), sum((["Écrit (/20)", "Oral (/20)", "Écrit (/10)", "Oral (/10)", "Écrit (/10)", "Oral (/10)"] + (["Oral (± 4)"] if pool_size == 4 else []) for _passage in passages), start=["Juré⋅e", ""]),