forked from ScoDoc/DocScoDoc
Fixes #338
This commit is contained in:
parent
48d0d89ede
commit
6de3d32c25
@ -724,6 +724,7 @@ def CalAbs(etudid, sco_year=None):
|
|||||||
anneescolaire = int(scu.AnneeScolaire(sco_year))
|
anneescolaire = int(scu.AnneeScolaire(sco_year))
|
||||||
datedebut = str(anneescolaire) + "-08-01"
|
datedebut = str(anneescolaire) + "-08-01"
|
||||||
datefin = str(anneescolaire + 1) + "-07-31"
|
datefin = str(anneescolaire + 1) + "-07-31"
|
||||||
|
annee_courante = scu.AnneeScolaire()
|
||||||
nbabs = sco_abs.count_abs(etudid=etudid, debut=datedebut, fin=datefin)
|
nbabs = sco_abs.count_abs(etudid=etudid, debut=datedebut, fin=datefin)
|
||||||
nbabsjust = sco_abs.count_abs_just(etudid=etudid, debut=datedebut, fin=datefin)
|
nbabsjust = sco_abs.count_abs_just(etudid=etudid, debut=datedebut, fin=datefin)
|
||||||
events = []
|
events = []
|
||||||
@ -776,7 +777,7 @@ def CalAbs(etudid, sco_year=None):
|
|||||||
"""Année scolaire %s-%s""" % (anneescolaire, anneescolaire + 1),
|
"""Année scolaire %s-%s""" % (anneescolaire, anneescolaire + 1),
|
||||||
""" Changer année: <select name="sco_year" onchange="document.f.submit()">""",
|
""" Changer année: <select name="sco_year" onchange="document.f.submit()">""",
|
||||||
]
|
]
|
||||||
for y in range(anneescolaire, anneescolaire - 10, -1):
|
for y in range(annee_courante, min(annee_courante - 6, anneescolaire - 6), -1):
|
||||||
H.append("""<option value="%s" """ % y)
|
H.append("""<option value="%s" """ % y)
|
||||||
if y == anneescolaire:
|
if y == anneescolaire:
|
||||||
H.append("selected")
|
H.append("selected")
|
||||||
|
@ -954,7 +954,7 @@ def query_portal(req, msg="Portail Apogee", timeout=3):
|
|||||||
return r.text
|
return r.text
|
||||||
|
|
||||||
|
|
||||||
def AnneeScolaire(sco_year=None):
|
def AnneeScolaire(sco_year=None) -> int:
|
||||||
"annee de debut de l'annee scolaire courante"
|
"annee de debut de l'annee scolaire courante"
|
||||||
if sco_year:
|
if sco_year:
|
||||||
year = sco_year
|
year = sco_year
|
||||||
|
Loading…
Reference in New Issue
Block a user