Re-enable possibility to make eval report

This commit is contained in:
Benjamin Bertrand 2017-03-31 18:33:53 +03:00
parent cbac93ec0c
commit b761f47da9
2 changed files with 14 additions and 19 deletions

View File

@ -5,14 +5,8 @@
%- 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
@ -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}

View File

@ -66,22 +66,25 @@ 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: