Fix bug with term.py new name
This commit is contained in:
parent
738cf00655
commit
ba11bd063e
@ -25,7 +25,7 @@ def term_info(classe, ds_df):
|
||||
eval_info["Trimestre"] = ds_df["Trimestre"].unique()[0]
|
||||
return eval_info
|
||||
|
||||
def build_target_name(classe, term, path = Path("./")):
|
||||
def build_target_name(classe, term_num, path = Path("./")):
|
||||
""" Build the path where the .tex will be sored
|
||||
|
||||
>>> build_target_name("312", "DS1")
|
||||
@ -33,9 +33,9 @@ def build_target_name(classe, term, path = Path("./")):
|
||||
>>> build_target_name("312", "DS1", Path("plop/"))
|
||||
Path('plop/312/report_DS1.tex')
|
||||
"""
|
||||
return Path(path + "/{cls}/report_T{term}.tex".format(cls=classe, term=term))
|
||||
return Path(path + "/{cls}/report_T{term_num}.tex".format(cls=classe, term_num=term_num))
|
||||
|
||||
def term_report(classe, term, path = Path('./'),
|
||||
def term_report(classe, term_num, path = Path('./'),
|
||||
template = "tpl_reports_term.tex"):
|
||||
""" Generate the report of a evaluation for a class
|
||||
|
||||
@ -51,7 +51,7 @@ def term_report(classe, term, path = Path('./'),
|
||||
flat_df = extract_flat_marks(ws)
|
||||
logger.info("Worksheets parsed")
|
||||
|
||||
term_df = flat_df[flat_df['Trimestre'] == term]
|
||||
term_df = flat_df[flat_df['Trimestre'] == term_num]
|
||||
|
||||
quest_df, exo_df, eval_df = digest_flat_df(term_df)
|
||||
#conn_df = exo_df[exo_df["Nom"].str.contains('Conn')]
|
||||
@ -66,7 +66,7 @@ def term_report(classe, term, path = Path('./'),
|
||||
"students":students_pov,
|
||||
}
|
||||
|
||||
target = build_target_name(classe, term, path)
|
||||
target = build_target_name(classe, term_num, path)
|
||||
feed_template(target, datas, template)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user