forked from ScoDoc/ScoDoc
Fix: formsemestre_evaluations_cal
This commit is contained in:
parent
d877648546
commit
c81c4efb40
@ -53,7 +53,7 @@ from app.scodoc.sco_exceptions import ScoValueError
|
||||
|
||||
|
||||
def apo_semset_maq_status(
|
||||
semset_id="",
|
||||
semset_id: int,
|
||||
allow_missing_apo=False,
|
||||
allow_missing_decisions=False,
|
||||
allow_missing_csv=False,
|
||||
@ -65,7 +65,7 @@ def apo_semset_maq_status(
|
||||
):
|
||||
"""Page statut / tableau de bord"""
|
||||
if not semset_id:
|
||||
raise ValueError("invalid null semset_id")
|
||||
raise ScoValueError("invalid null semset_id")
|
||||
semset = sco_semset.SemSet(semset_id=semset_id)
|
||||
semset.fill_formsemestres()
|
||||
# autorise export meme si etudiants Apo manquants:
|
||||
|
@ -405,7 +405,6 @@ def formsemestre_evaluations_cal(formsemestre_id):
|
||||
"""Page avec calendrier de toutes les evaluations de ce semestre"""
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
nt: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre)
|
||||
sem = formsemestre.to_dict()
|
||||
|
||||
evals = nt.get_evaluations_etats()
|
||||
nb_evals = len(evals)
|
||||
@ -416,8 +415,8 @@ def formsemestre_evaluations_cal(formsemestre_id):
|
||||
|
||||
today = time.strftime("%Y-%m-%d")
|
||||
|
||||
year = int(sem["annee_debut"])
|
||||
if sem["mois_debut_ord"] < 8:
|
||||
year = formsemestre.date_debut.year
|
||||
if formsemestre.date_debut.month < 8:
|
||||
year -= 1 # calendrier septembre a septembre
|
||||
events = {} # (day, halfday) : event
|
||||
for e in evals:
|
||||
@ -537,11 +536,10 @@ def formsemestre_evaluations_delai_correction(formsemestre_id, format="html"):
|
||||
"""Experimental: un tableau indiquant pour chaque évaluation
|
||||
le nombre de jours avant la publication des notes.
|
||||
|
||||
N'indique pas les évaluations de ratrapage ni celles des modules de bonus/malus.
|
||||
N'indique pas les évaluations de rattrapage ni celles des modules de bonus/malus.
|
||||
"""
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
nt: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre)
|
||||
sem = formsemestre.to_dict()
|
||||
|
||||
evals = nt.get_evaluations_etats()
|
||||
T = []
|
||||
@ -607,7 +605,7 @@ def formsemestre_evaluations_delai_correction(formsemestre_id, format="html"):
|
||||
origin="Généré par %s le " % sco_version.SCONAME
|
||||
+ scu.timedate_human_repr()
|
||||
+ "",
|
||||
filename=scu.make_filename("evaluations_delais_" + sem["titreannee"]),
|
||||
filename=scu.make_filename("evaluations_delais_" + formsemestre.titre_annee()),
|
||||
)
|
||||
return tab.make_page(format=format)
|
||||
|
||||
@ -635,16 +633,13 @@ def evaluation_describe(evaluation_id="", edit_in_place=True):
|
||||
'<span class="evallink"><a class="stdlink" href="evaluation_listenotes?moduleimpl_id=%s">voir toutes les notes du module</a></span>'
|
||||
% moduleimpl_id
|
||||
)
|
||||
mod_descr = (
|
||||
'<a href="moduleimpl_status?moduleimpl_id=%s">%s %s</a> <span class="resp">(resp. <a title="%s">%s</a>)</span> %s'
|
||||
% (
|
||||
moduleimpl_id,
|
||||
Mod["code"] or "",
|
||||
Mod["titre"] or "?",
|
||||
nomcomplet,
|
||||
resp,
|
||||
link,
|
||||
)
|
||||
mod_descr = '<a href="moduleimpl_status?moduleimpl_id=%s">%s %s</a> <span class="resp">(resp. <a title="%s">%s</a>)</span> %s' % (
|
||||
moduleimpl_id,
|
||||
Mod["code"] or "",
|
||||
Mod["titre"] or "?",
|
||||
nomcomplet,
|
||||
resp,
|
||||
link,
|
||||
)
|
||||
|
||||
etit = E["description"] or ""
|
||||
|
Loading…
Reference in New Issue
Block a user