forked from ScoDoc/ScoDoc
Merge branch 'master' into feuille_jury
This commit is contained in:
commit
c0d5eb0f69
@ -317,7 +317,7 @@ class FormSemestre(db.Model):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
ues = sem_ues.values()
|
ues = sem_ues.values()
|
||||||
return sorted(ues, key=attrgetter("numero"))
|
return sorted(ues, key=attrgetter("numero", "acronyme"))
|
||||||
else:
|
else:
|
||||||
sem_ues = db.session.query(UniteEns).filter(
|
sem_ues = db.session.query(UniteEns).filter(
|
||||||
ModuleImpl.formsemestre_id == self.id,
|
ModuleImpl.formsemestre_id == self.id,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""ScoDoc 9 models : Modules
|
"""ScoDoc 9 models : Modules
|
||||||
"""
|
"""
|
||||||
|
from operator import attrgetter
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
|
||||||
from app import db
|
from app import db
|
||||||
@ -229,7 +230,7 @@ class Module(db.Model):
|
|||||||
"""delete coef"""
|
"""delete coef"""
|
||||||
if self.formation.has_locked_sems(self.ue.semestre_idx):
|
if self.formation.has_locked_sems(self.ue.semestre_idx):
|
||||||
current_app.logguer.info(
|
current_app.logguer.info(
|
||||||
f"delete_ue_coef: locked formation, ignoring request"
|
"delete_ue_coef: locked formation, ignoring request"
|
||||||
)
|
)
|
||||||
raise ScoValueError("Formation verrouillée")
|
raise ScoValueError("Formation verrouillée")
|
||||||
ue_coef = ModuleUECoef.query.get((self.id, ue.id))
|
ue_coef = ModuleUECoef.query.get((self.id, ue.id))
|
||||||
@ -238,10 +239,10 @@ class Module(db.Model):
|
|||||||
self.formation.invalidate_module_coefs()
|
self.formation.invalidate_module_coefs()
|
||||||
|
|
||||||
def get_ue_coefs_sorted(self):
|
def get_ue_coefs_sorted(self):
|
||||||
"les coefs d'UE, trié par numéro d'UE"
|
"les coefs d'UE, trié par numéro et acronyme d'UE"
|
||||||
# je n'ai pas su mettre un order_by sur le backref sans avoir
|
# je n'ai pas su mettre un order_by sur le backref sans avoir
|
||||||
# à redéfinir les relationships...
|
# à redéfinir les relationships...
|
||||||
return sorted(self.ue_coefs, key=lambda x: x.ue.numero)
|
return sorted(self.ue_coefs, key=attrgetter("numero", "acronyme"))
|
||||||
|
|
||||||
def ue_coefs_list(
|
def ue_coefs_list(
|
||||||
self, include_zeros=True, ues: list["UniteEns"] = None
|
self, include_zeros=True, ues: list["UniteEns"] = None
|
||||||
|
@ -443,6 +443,7 @@ def ue_edit(ue_id=None, create=False, formation_id=None, default_semestre_idx=No
|
|||||||
{
|
{
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"title": "UE externe",
|
"title": "UE externe",
|
||||||
|
"readonly": not create, # ne permet pas de transformer une UE existante en externe
|
||||||
"explanation": "réservé pour les capitalisations d'UE effectuées à l'extérieur de l'établissement",
|
"explanation": "réservé pour les capitalisations d'UE effectuées à l'extérieur de l'établissement",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -626,7 +626,9 @@ def formation_list_table() -> GenTable:
|
|||||||
def formation_create_new_version(formation_id, redirect=True):
|
def formation_create_new_version(formation_id, redirect=True):
|
||||||
"duplicate formation, with new version number"
|
"duplicate formation, with new version number"
|
||||||
formation = Formation.query.get_or_404(formation_id)
|
formation = Formation.query.get_or_404(formation_id)
|
||||||
resp = formation_export(formation_id, export_ids=True, format="xml")
|
resp = formation_export(
|
||||||
|
formation_id, export_ids=True, export_external_ues=True, format="xml"
|
||||||
|
)
|
||||||
xml_data = resp.get_data(as_text=True)
|
xml_data = resp.get_data(as_text=True)
|
||||||
new_id, modules_old2new, ues_old2new = formation_import_xml(
|
new_id, modules_old2new, ues_old2new = formation_import_xml(
|
||||||
xml_data, use_local_refcomp=True
|
xml_data, use_local_refcomp=True
|
||||||
|
@ -881,11 +881,15 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True):
|
|||||||
H.append("<h4>Tous les étudiants</h4>")
|
H.append("<h4>Tous les étudiants</h4>")
|
||||||
else:
|
else:
|
||||||
H.append("<h4>Groupes de %(partition_name)s</h4>" % partition)
|
H.append("<h4>Groupes de %(partition_name)s</h4>" % partition)
|
||||||
|
partition_is_empty = True
|
||||||
groups = sco_groups.get_partition_groups(partition)
|
groups = sco_groups.get_partition_groups(partition)
|
||||||
if groups:
|
if groups:
|
||||||
H.append("<table>")
|
H.append("<table>")
|
||||||
for group in groups:
|
for group in groups:
|
||||||
n_members = len(sco_groups.get_group_members(group["group_id"]))
|
n_members = len(sco_groups.get_group_members(group["group_id"]))
|
||||||
|
if n_members == 0:
|
||||||
|
continue # skip empty groups
|
||||||
|
partition_is_empty = False
|
||||||
group["url_etat"] = url_for(
|
group["url_etat"] = url_for(
|
||||||
"absences.EtatAbsencesGr",
|
"absences.EtatAbsencesGr",
|
||||||
group_ids=group["group_id"],
|
group_ids=group["group_id"],
|
||||||
@ -918,8 +922,8 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True):
|
|||||||
|
|
||||||
H.append("</tr>")
|
H.append("</tr>")
|
||||||
H.append("</table>")
|
H.append("</table>")
|
||||||
else:
|
if partition_is_empty:
|
||||||
H.append('<p class="help indent">Aucun groupe dans cette partition')
|
H.append('<p class="help indent">Aucun groupe peuplé dans cette partition')
|
||||||
if sco_groups.sco_permissions_check.can_change_groups(formsemestre.id):
|
if sco_groups.sco_permissions_check.can_change_groups(formsemestre.id):
|
||||||
H.append(
|
H.append(
|
||||||
f""" (<a href="{url_for("scolar.affect_groups",
|
f""" (<a href="{url_for("scolar.affect_groups",
|
||||||
|
@ -57,6 +57,7 @@ from app.scodoc import sco_moduleimpl
|
|||||||
from app.scodoc import sco_permissions_check
|
from app.scodoc import sco_permissions_check
|
||||||
from app.tables import list_etuds
|
from app.tables import list_etuds
|
||||||
|
|
||||||
|
|
||||||
# menu evaluation dans moduleimpl
|
# menu evaluation dans moduleimpl
|
||||||
def moduleimpl_evaluation_menu(evaluation_id, nbnotes=0) -> str:
|
def moduleimpl_evaluation_menu(evaluation_id, nbnotes=0) -> str:
|
||||||
"Menu avec actions sur une evaluation"
|
"Menu avec actions sur une evaluation"
|
||||||
@ -732,7 +733,7 @@ def _ligne_evaluation(
|
|||||||
)
|
)
|
||||||
if etat["moy"]:
|
if etat["moy"]:
|
||||||
H.append(
|
H.append(
|
||||||
f"""<b>{etat["moy"]} / {evaluation.note_max:g}</b>
|
f"""<b>{etat["moy"]} / 20</b>
|
||||||
(<a class="stdlink" href="{
|
(<a class="stdlink" href="{
|
||||||
url_for('notes.evaluation_listenotes',
|
url_for('notes.evaluation_listenotes',
|
||||||
scodoc_dept=g.scodoc_dept, evaluation_id=evaluation.id)
|
scodoc_dept=g.scodoc_dept, evaluation_id=evaluation.id)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.4.82"
|
SCOVERSION = "9.4.83"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user