forked from ScoDoc/ScoDoc
Assiduites : fix #694
This commit is contained in:
parent
a7374d7428
commit
48bca602cc
@ -888,14 +888,12 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True):
|
||||
if n_members == 0:
|
||||
continue # skip empty groups
|
||||
partition_is_empty = False
|
||||
# XXX TODO-ASSIDUITE
|
||||
group["url_etat"] = "non disponible" # url_for(
|
||||
# "absences.EtatAbsencesGr",
|
||||
# group_ids=group["group_id"],
|
||||
# debut=formsemestre.date_debut.strftime("%d/%m/%Y"),
|
||||
# fin=formsemestre.date_fin.strftime("%d/%m/%Y"),
|
||||
# scodoc_dept=g.scodoc_dept,
|
||||
# )
|
||||
group[
|
||||
"url_etat"
|
||||
] = f"""{
|
||||
url_for("assiduites.visu_assi_group", scodoc_dept=g.scodoc_dept)
|
||||
}?group_ids={group["id"]}&date_debut={formsemestre.date_debut.isoformat()}&date_fin={formsemestre.date_fin.isoformat()}"""
|
||||
|
||||
if group["group_name"]:
|
||||
group["label"] = "groupe %(group_name)s" % group
|
||||
else:
|
||||
|
@ -819,9 +819,12 @@ def tab_absences_html(groups_infos, etat=None):
|
||||
H = ['<div class="tab-content">']
|
||||
if not groups_infos.members:
|
||||
return "".join(H) + "<h3>Aucun étudiant !</h3></div>"
|
||||
|
||||
group_ids: str = ",".join(map(str, groups_infos.group_ids))
|
||||
formsemestre: FormSemestre = groups_infos.get_formsemestre()
|
||||
H.extend(
|
||||
[
|
||||
"<h3>Absences</h3>",
|
||||
"<h3>Assiduités</h3>",
|
||||
'<ul class="ul_abs">',
|
||||
"<li>",
|
||||
form_choix_saisie_semaine(groups_infos), # Ajout Le Havre
|
||||
@ -829,13 +832,9 @@ def tab_absences_html(groups_infos, etat=None):
|
||||
"<li>",
|
||||
form_choix_jour_saisie_hebdo(groups_infos),
|
||||
"</li>",
|
||||
# XXX TODO-ASSIDUITE
|
||||
"""<li><a class="stdlink" href="Absences/EtatAbsencesGr?%s&debut=%s&fin=%s">XXX État des absences du groupe</a></li>"""
|
||||
% (
|
||||
groups_infos.groups_query_args,
|
||||
groups_infos.formsemestre["date_debut"],
|
||||
groups_infos.formsemestre["date_fin"],
|
||||
),
|
||||
f"""<li><a href="{
|
||||
url_for("assiduites.visu_assi_group", scodoc_dept=g.scodoc_dept)
|
||||
}?group_ids={group_ids}&date_debut={formsemestre.date_debut.isoformat()}&date_fin={formsemestre.date_fin.isoformat()}">État des assiduités du groupe</li>""",
|
||||
"</ul>",
|
||||
"<h3>Feuilles</h3>",
|
||||
'<ul class="ul_feuilles">',
|
||||
@ -893,12 +892,16 @@ def form_choix_jour_saisie_hebdo(groups_infos, moduleimpl_id=None):
|
||||
sem = groups_infos.formsemestre
|
||||
first_monday = sco_cal.ddmmyyyy(sem["date_debut"]).prev_monday()
|
||||
today_idx = datetime.date.today().weekday()
|
||||
# TODO-ASSIDUITE
|
||||
# Utilisation d'un formulaire et de la saisie journalière.
|
||||
# Dans le formulaire : choisir le jour (lun/mar/...)
|
||||
|
||||
FA = [] # formulaire avec menu saisi absences
|
||||
FA.append(
|
||||
# TODO-ASSIDUITE et utiliser url_for... (was Absences/SignaleAbsenceGrSemestre)
|
||||
'<form id="form_choix_jour_saisie_hebdo" action="XXX" method="get">'
|
||||
)
|
||||
|
||||
FA.append('<input type="hidden" name="datefin" value="%(date_fin)s"/>' % sem)
|
||||
FA.append(groups_infos.get_form_elem())
|
||||
if moduleimpl_id:
|
||||
|
Loading…
Reference in New Issue
Block a user