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,19 +5,13 @@
%- block classPOV %- block classPOV
\maketitle \maketitle
Devoir sur \Var{eval_df["Bareme"].iloc[0]}
\vfill \vfill
%- \Var{eval_df.describe()[["Mark"]].T.to_latex()}
\vfill
%- \Var{eval_df| marks_hist | includegraphics(document_path=directory, scale=0.5)}
%- endblock %- endblock
%-block students %-block students
%- for e in students %-for e in students
\maketitle \maketitle
\begin{minipage}{0.5\linewidth} \begin{minipage}{0.5\linewidth}
@ -40,15 +34,13 @@ Devoir sur \Var{eval_df["Bareme"].iloc[0]}
\end{minipage} \end{minipage}
} }
\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 \vfill
\scriptsize \scriptsize
\begin{multicols}{3} \begin{multicols}{3}
%- for exo_tab in e.latex_exo_tabulars() \noindent
%- for exo_tab in e.latex_exo_tabulars
\Var{exo_tab} \Var{exo_tab}
%- endfor %- endfor
\end{multicols} \end{multicols}
@ -63,7 +55,7 @@ Devoir sur \Var{eval_df["Bareme"].iloc[0]}
\end{center} \end{center}
\normalsize \normalsize
\pagebreak \pagebreak
%- endfor %-endfor
%- endblock %-endblock

View File

@ -66,29 +66,32 @@ class Student(object):
exo = self.exo_df[self.exo_df["Exercice"] == exo_name] exo = self.exo_df[self.exo_df["Exercice"] == exo_name]
quest = self.quest_df[self.quest_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"\hline")
tabular.append(r"\rowcolor{highlightbg}")
if type(exo_name) == int: 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: 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") tabular.append(r"\hline")
if len(quest) > 1: if len(quest) > 1:
for _, q in quest.iterrows(): for _, q in quest.iterrows():
line = "" line = ""
if not pd.isnull(q["Question"]): if not pd.isnull(q["Question"]):
line += str(q['Question']) line += " "+str(q['Question'])
if not pd.isnull(q["Commentaire"]): if not pd.isnull(q["Commentaire"]):
line += str(q['Commentaire']) line += " "+str(q['Commentaire'])
line += " & " line += " & "
if q["Niveau"] == 1: if q["Niveau"] == 1:
line += q['Latex_rep'] line += q['Latex_rep']
else: else:
line += str(q['Mark']) line += str(q['Mark'])
line += r"\\" line += r" \\"
tabular.append(line) tabular.append(line)
tabular.append(r"\hline") tabular.append(r"\hline")