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