forked from ScoDoc/ScoDoc
merge OK
This commit is contained in:
parent
34cecbf153
commit
ae1a3fb676
@ -624,9 +624,9 @@ def formsemestre_description_table(
|
||||
if ue.color:
|
||||
for k in list(ue_info.keys()):
|
||||
if not k.startswith("_"):
|
||||
ue_info[f"_{k}_td_attrs"] = (
|
||||
f'style="background-color: {ue.color} !important;"'
|
||||
)
|
||||
ue_info[
|
||||
f"_{k}_td_attrs"
|
||||
] = f'style="background-color: {ue.color} !important;"'
|
||||
if not is_apc:
|
||||
# n'affiche la ligne UE qu'en formation classique
|
||||
# car l'UE de rattachement n'a pas d'intérêt en BUT
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
"""Feuille excel pour préparation des jurys classiques (non BUT)
|
||||
"""
|
||||
import collections
|
||||
import time
|
||||
|
||||
from openpyxl.styles.numbers import FORMAT_NUMBER_00
|
||||
@ -38,8 +39,7 @@ from flask_login import current_user
|
||||
from app.comp import res_sem
|
||||
from app.comp.res_compat import NotesTableCompat
|
||||
from app.models import FormSemestre, Identite, ScolarAutorisationInscription
|
||||
from app.scodoc import sco_abs
|
||||
from app.scodoc import sco_codes_parcours
|
||||
from app.scodoc import sco_assiduites, codes_cursus
|
||||
from app.scodoc import sco_groups
|
||||
from app.scodoc import sco_etud
|
||||
from app.scodoc import sco_excel
|
||||
@ -64,10 +64,10 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
"partition_id"
|
||||
]
|
||||
|
||||
prev_moy_ue = scu.DictDefault(defaultvalue={}) # ue_code_s : { etudid : moy ue }
|
||||
prev_moy_ue = collections.defaultdict(dict) # ue_code_s : { etudid : moy ue }
|
||||
prev_ue_acro = {} # ue_code_s : acronyme (à afficher)
|
||||
prev_moy = {} # moyennes gen sem prec
|
||||
moy_ue = scu.DictDefault(defaultvalue={}) # ue_acro : moyennes { etudid : moy ue }
|
||||
moy_ue = collections.defaultdict(dict) # ue_acro : moyennes { etudid : moy ue }
|
||||
ue_acro = {} # ue_code_s : acronyme (à afficher)
|
||||
moy = {} # moyennes gen
|
||||
moy_inter = {} # moyenne gen. sur les 2 derniers semestres
|
||||
@ -79,6 +79,7 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
groupestd = {} # etudid : nom groupe principal
|
||||
nbabs = {}
|
||||
nbabsjust = {}
|
||||
breakpoint()
|
||||
for etud in etuds:
|
||||
Se = sco_cursus.get_situation_etud_cursus(
|
||||
etud.to_dict_scodoc7(), formsemestre_id
|
||||
@ -129,7 +130,7 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
[f"S{x.semestre_id}" for x in autorisations_etud]
|
||||
)
|
||||
# parcours:
|
||||
parcours[etud.id] = Se.get_parcours_descr()
|
||||
parcours[etud.id] = "sco_prepajury_lille:132" # Se.get_parcours_descr()
|
||||
# groupe principal (td)
|
||||
groupestd[etud.id] = ""
|
||||
for s in Se.etud["sems"]:
|
||||
@ -138,7 +139,7 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
main_partition_id, ""
|
||||
)
|
||||
# absences:
|
||||
e_nbabs, e_nbabsjust = sco_abs.get_abs_count(etud.id, sem)
|
||||
_, e_nbabsjust, e_nbabs = sco_assiduites.get_assiduites_count(etud.id, sem)
|
||||
nbabs[etud.id] = e_nbabs
|
||||
nbabsjust[etud.id] = e_nbabs - e_nbabsjust
|
||||
|
||||
@ -239,7 +240,7 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
cells.append(sheet.make_cell(etud.code_nip))
|
||||
if sco_preferences.get_preference("prepa_jury_ine"):
|
||||
cells.append(sheet.make_cell(etud.code_ine))
|
||||
admission = etud.admission.first()
|
||||
admission = etud.admission
|
||||
cells += sheet.make_row(
|
||||
[
|
||||
etud.id,
|
||||
@ -295,12 +296,12 @@ def feuille_preparation_lille(formsemestre_id):
|
||||
#
|
||||
sheet.append_blank_row()
|
||||
# Explications des codes
|
||||
codes = list(sco_codes_parcours.CODES_EXPL.keys())
|
||||
codes = list(codes_cursus.CODES_EXPL.keys())
|
||||
codes.sort()
|
||||
sheet.append_single_cell_row("Explication des codes")
|
||||
for code in codes:
|
||||
sheet.append_row(
|
||||
sheet.make_row(["", "", "", code, sco_codes_parcours.CODES_EXPL[code]])
|
||||
sheet.make_row(["", "", "", code, codes_cursus.CODES_EXPL[code]])
|
||||
)
|
||||
sheet.append_row(
|
||||
sheet.make_row(
|
||||
|
@ -2649,9 +2649,10 @@ def formsemestre_validation_auto_but(formsemestre_id: int = None):
|
||||
form = jury_but_forms.FormSemestreValidationAutoBUTForm()
|
||||
if request.method == "POST":
|
||||
if not form.cancel.data:
|
||||
nb_etud_modif, _ = (
|
||||
jury_but_validation_auto.formsemestre_validation_auto_but(formsemestre)
|
||||
)
|
||||
(
|
||||
nb_etud_modif,
|
||||
_,
|
||||
) = jury_but_validation_auto.formsemestre_validation_auto_but(formsemestre)
|
||||
flash(f"Décisions enregistrées ({nb_etud_modif} étudiants modifiés)")
|
||||
return redirect(
|
||||
url_for(
|
||||
|
Loading…
Reference in New Issue
Block a user