fix #238
This commit is contained in:
parent
6dbba98097
commit
3631719f54
@ -30,7 +30,7 @@
|
||||
"""
|
||||
import datetime
|
||||
|
||||
from flask import url_for, g, request
|
||||
from flask import url_for, g, request, abort
|
||||
|
||||
import app.scodoc.sco_utils as scu
|
||||
from app.scodoc import notesdb as ndb
|
||||
@ -773,7 +773,8 @@ def CalAbs(etudid, sco_year=None):
|
||||
|
||||
|
||||
def ListeAbsEtud(
|
||||
etudid,
|
||||
etudid=None,
|
||||
code_nip=None,
|
||||
with_evals=True,
|
||||
format="html",
|
||||
absjust_only=0,
|
||||
@ -793,9 +794,13 @@ def ListeAbsEtud(
|
||||
# si absjust_only, table absjust seule (export xls ou pdf)
|
||||
absjust_only = ndb.bool_or_str(absjust_only)
|
||||
datedebut = "%s-08-01" % scu.AnneeScolaire(sco_year=sco_year)
|
||||
|
||||
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
||||
|
||||
etudid = etudid or False
|
||||
etuds = sco_etud.get_etud_info(etudid=etudid, code_nip=code_nip, filled=True)
|
||||
if not etuds:
|
||||
log(f"ListeAbsEtud: no etuds with etudid={etudid} or nip={code_nip}")
|
||||
abort(404)
|
||||
etud = etuds[0]
|
||||
etudid = etud["etudid"]
|
||||
# Liste des absences et titres colonnes tables:
|
||||
titles, columns_ids, absnonjust, absjust = _tables_abs_etud(
|
||||
etudid, datedebut, with_evals=with_evals, format=format
|
||||
|
@ -98,7 +98,7 @@ def ListMedian(L):
|
||||
|
||||
|
||||
def do_evaluation_etat(evaluation_id, partition_id=None, select_first_partition=False):
|
||||
"""donne infos sur l'etat du evaluation
|
||||
"""donne infos sur l'état de l'évaluation
|
||||
{ nb_inscrits, nb_notes, nb_abs, nb_neutre, nb_att,
|
||||
moyenne, mediane, mini, maxi,
|
||||
date_last_modif, gr_complets, gr_incomplets, evalcomplete }
|
||||
|
@ -251,14 +251,16 @@ sco_publish(
|
||||
@permission_required_compat_scodoc7(Permission.ScoView)
|
||||
@scodoc7func
|
||||
def ListeAbsEtud(
|
||||
etudid,
|
||||
etudid=None,
|
||||
code_nip=None,
|
||||
with_evals=True,
|
||||
format="html",
|
||||
absjust_only=0,
|
||||
sco_year=None,
|
||||
):
|
||||
return sco_abs_views.ListeAbsEtud(
|
||||
etudid,
|
||||
etudid=etudid,
|
||||
code_nip=str(code_nip),
|
||||
with_evals=with_evals,
|
||||
format=format,
|
||||
absjust_only=absjust_only,
|
||||
|
Loading…
Reference in New Issue
Block a user