Re-enable possibility to make eval report
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user