forked from ScoDoc/ScoDoc
Fix: scodoc_table_results
This commit is contained in:
parent
272a57d1c8
commit
52d0499c9b
@ -208,25 +208,29 @@ def _build_results_list(dpv_by_sem, etuds_infos):
|
|||||||
return rows, titles, columns_ids
|
return rows, titles, columns_ids
|
||||||
|
|
||||||
|
|
||||||
def get_set_formsemestre_id_dates(start_date, end_date):
|
def get_set_formsemestre_id_dates(start_date, end_date) -> set:
|
||||||
"""Ensemble des formsemestre_id entre ces dates"""
|
"""Ensemble des formsemestre_id entre ces dates"""
|
||||||
s = ndb.SimpleDictFetch(
|
s = ndb.SimpleDictFetch(
|
||||||
"""SELECT id
|
"""SELECT id
|
||||||
FROM notes_formsemestre
|
FROM notes_formsemestre
|
||||||
WHERE date_debut >= %(start_date)s AND date_fin <= %(end_date)s
|
WHERE date_debut >= %(start_date)s
|
||||||
|
AND date_fin <= %(end_date)s
|
||||||
|
AND dept_id = %(dept_id)s
|
||||||
""",
|
""",
|
||||||
{"start_date": start_date, "end_date": end_date},
|
{"start_date": start_date, "end_date": end_date, "dept_id": g.scodoc_dept_id},
|
||||||
)
|
)
|
||||||
return {x["id"] for x in s}
|
return {x["id"] for x in s}
|
||||||
|
|
||||||
|
|
||||||
def scodoc_table_results(start_date="", end_date="", types_parcours=[], format="html"):
|
def scodoc_table_results(
|
||||||
|
start_date="", end_date="", types_parcours: list = None, format="html"
|
||||||
|
):
|
||||||
"""Page affichant la table des résultats
|
"""Page affichant la table des résultats
|
||||||
Les dates sont en dd/mm/yyyy (datepicker javascript)
|
Les dates sont en dd/mm/yyyy (datepicker javascript)
|
||||||
types_parcours est la liste des types de parcours à afficher
|
types_parcours est la liste des types de parcours à afficher
|
||||||
(liste de chaines, eg ['100', '210'] )
|
(liste de chaines, eg ['100', '210'] )
|
||||||
"""
|
"""
|
||||||
log("scodoc_table_results: start_date=%s" % (start_date,)) # XXX
|
log(f"scodoc_table_results: start_date={start_date!r}")
|
||||||
if not types_parcours:
|
if not types_parcours:
|
||||||
types_parcours = []
|
types_parcours = []
|
||||||
if not isinstance(types_parcours, list):
|
if not isinstance(types_parcours, list):
|
||||||
|
Loading…
Reference in New Issue
Block a user