forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -21,7 +21,6 @@ from app.models.assiduites import Assiduite, Justificatif, compute_assiduites_ju
|
||||
from app.scodoc import sco_formsemestre_inscriptions
|
||||
from app.scodoc import sco_preferences
|
||||
from app.scodoc import sco_cache
|
||||
from app.scodoc import sco_compute_moy
|
||||
from app.scodoc import sco_etud
|
||||
import app.scodoc.sco_utils as scu
|
||||
|
||||
@ -112,9 +111,9 @@ class CountCalculator:
|
||||
evening if evening else ScoDocSiteConfig.get("assi_afternoon_time", "18:00")
|
||||
)
|
||||
|
||||
self.non_work_days: list[
|
||||
scu.NonWorkDays
|
||||
] = scu.NonWorkDays.get_all_non_work_days(dept_id=g.scodoc_dept_id)
|
||||
self.non_work_days: list[scu.NonWorkDays] = (
|
||||
scu.NonWorkDays.get_all_non_work_days(dept_id=g.scodoc_dept_id)
|
||||
)
|
||||
|
||||
# Sera utilisé pour les assiduités longues (> 1 journée)
|
||||
self.nb_heures_par_jour = (
|
||||
@ -794,17 +793,9 @@ def invalidate_assiduites_etud_date(etudid: int, the_date: datetime):
|
||||
# Invalide les PDF et les absences:
|
||||
for sem in sems:
|
||||
# Inval cache bulletin et/ou note_table
|
||||
if sco_compute_moy.formsemestre_expressions_use_abscounts(
|
||||
sem["formsemestre_id"]
|
||||
):
|
||||
# certaines formules utilisent les absences
|
||||
pdfonly = False
|
||||
else:
|
||||
# efface toujours le PDF car il affiche en général les absences
|
||||
pdfonly = True
|
||||
|
||||
# efface toujours le PDF car il affiche en général les absences
|
||||
sco_cache.invalidate_formsemestre(
|
||||
formsemestre_id=sem["formsemestre_id"], pdfonly=pdfonly
|
||||
formsemestre_id=sem["formsemestre_id"], pdfonly=True
|
||||
)
|
||||
|
||||
# Inval cache compteurs absences:
|
||||
|
@ -70,9 +70,9 @@ def evaluation_check_absences(evaluation: Evaluation):
|
||||
deb <= Assiduite.date_fin,
|
||||
)
|
||||
|
||||
abs_etudids = set(assi.etudid for assi in assiduites)
|
||||
abs_nj_etudids = set(assi.etudid for assi in assiduites if assi.est_just is False)
|
||||
just_etudids = set(assi.etudid for assi in assiduites if assi.est_just is True)
|
||||
abs_etudids = {assi.etudid for assi in assiduites}
|
||||
abs_nj_etudids = {assi.etudid for assi in assiduites if assi.est_just is False}
|
||||
just_etudids = {assi.etudid for assi in assiduites if assi.est_just is True}
|
||||
|
||||
# Les notes:
|
||||
notes_db = sco_evaluation_db.do_evaluation_get_all_notes(evaluation.id)
|
||||
|
@ -1337,21 +1337,12 @@ def do_formsemestre_clone(
|
||||
% (pname, pvalue, formsemestre_id)
|
||||
)
|
||||
|
||||
# 5- Copy formules utilisateur
|
||||
objs = sco_compute_moy.formsemestre_ue_computation_expr_list(
|
||||
cnx, args={"formsemestre_id": orig_formsemestre_id}
|
||||
)
|
||||
for obj in objs:
|
||||
args = obj.copy()
|
||||
args["formsemestre_id"] = formsemestre_id
|
||||
_ = sco_compute_moy.formsemestre_ue_computation_expr_create(cnx, args)
|
||||
|
||||
# 6- Copie les parcours
|
||||
# 5- Copie les parcours
|
||||
formsemestre.parcours = formsemestre_orig.parcours
|
||||
db.session.add(formsemestre)
|
||||
db.session.commit()
|
||||
|
||||
# 7- Copy partitions and groups
|
||||
# 6- Copy partitions and groups
|
||||
if clone_partitions:
|
||||
sco_groups_copy.clone_partitions_and_groups(
|
||||
orig_formsemestre_id, formsemestre_id
|
||||
|
@ -1216,7 +1216,7 @@ def formsemestre_tableau_modules(
|
||||
if expr:
|
||||
H.append(
|
||||
f""" <span class="formula" title="mode de calcul de la moyenne d'UE">{expr}</span>
|
||||
<span class="warning">formule inutilisée en 9.2: <a href="{
|
||||
<span class="warning">formule inutilisée en ScoDoc 9: <a href="{
|
||||
url_for("notes.delete_ue_expr", scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id, ue_id=ue.id )
|
||||
}
|
||||
">supprimer</a></span>"""
|
||||
|
@ -538,7 +538,7 @@ def bilan_etud():
|
||||
# Récupération des assiduités et justificatifs de l'étudiant
|
||||
data = liste_assi.AssiJustifData(
|
||||
etud.assiduites.filter(
|
||||
Assiduite.etat != scu.EtatAssiduite.PRESENT, Assiduite.est_just is False
|
||||
Assiduite.etat != scu.EtatAssiduite.PRESENT, Assiduite.est_just == False
|
||||
),
|
||||
etud.justificatifs.filter(
|
||||
Justificatif.etat.in_(
|
||||
|
Loading…
Reference in New Issue
Block a user