diff --git a/notes_tools/reports/templates/tpl_reports_eval.tex b/notes_tools/reports/templates/tpl_reports_eval.tex index 6adbd49..851633f 100644 --- a/notes_tools/reports/templates/tpl_reports_eval.tex +++ b/notes_tools/reports/templates/tpl_reports_eval.tex @@ -5,19 +5,13 @@ %- block classPOV \maketitle -Devoir sur \Var{eval_df["Bareme"].iloc[0]} \vfill - -%- \Var{eval_df.describe()[["Mark"]].T.to_latex()} - -\vfill -%- \Var{eval_df| marks_hist | includegraphics(document_path=directory, scale=0.5)} %- endblock %-block students -%- for e in students +%-for e in students \maketitle \begin{minipage}{0.5\linewidth} @@ -40,15 +34,13 @@ Devoir sur \Var{eval_df["Bareme"].iloc[0]} \end{minipage} } \end{minipage} -\begin{minipage}{0.4\linewidth} - %- \Var{e["quest"] | radar_on("Competence") | includegraphics(document_path=directory, scale=0.4)} -\end{minipage} \vfill \scriptsize \begin{multicols}{3} - %- for exo_tab in e.latex_exo_tabulars() + \noindent + %- for exo_tab in e.latex_exo_tabulars \Var{exo_tab} %- endfor \end{multicols} @@ -63,7 +55,7 @@ Devoir sur \Var{eval_df["Bareme"].iloc[0]} \end{center} \normalsize \pagebreak -%- endfor -%- endblock +%-endfor +%-endblock diff --git a/notes_tools/tools/evaluation.py b/notes_tools/tools/evaluation.py index d816ecf..db5eb84 100644 --- a/notes_tools/tools/evaluation.py +++ b/notes_tools/tools/evaluation.py @@ -66,29 +66,32 @@ class Student(object): exo = self.exo_df[self.exo_df["Exercice"] == exo_name] quest = self.quest_df[self.quest_df["Exercice"] == exo_name] - tabular = [r"\begin{tabular}{|p{2cm}|c|}"] + tabular = [r"\begin{tabular}{|p{2cm}|p{1cm}|}"] tabular.append(r"\hline") + tabular.append(r"\rowcolor{highlightbg}") if type(exo_name) == int: - tabular.append(f"Exercice {exo_name} & {exo['Mark_barem'].all()} \\\\") + l = f"Exercice {exo_name} & {exo['Mark_barem'].all()}" + tabular.append(l + r" \\") else: - tabular.append(f"{exo_name} & {exo['Mark_barem'].all()} \\\\") + l = f"{exo_name} & {exo['Mark_barem'].all()}" + tabular.append(l + r" \\") tabular.append(r"\hline") if len(quest) > 1: for _, q in quest.iterrows(): line = "" if not pd.isnull(q["Question"]): - line += str(q['Question']) + line += " "+str(q['Question']) if not pd.isnull(q["Commentaire"]): - line += str(q['Commentaire']) + line += " "+str(q['Commentaire']) line += " & " if q["Niveau"] == 1: line += q['Latex_rep'] else: line += str(q['Mark']) - line += r"\\" + line += r" \\" tabular.append(line) tabular.append(r"\hline")