forked from ScoDoc/ScoDoc
Merge branch 'master' of https://scodoc.org/git/viennet/ScoDoc into sco96
This commit is contained in:
commit
cde5960899
@ -269,13 +269,7 @@ def validation_rcue_record(etudid: int):
|
||||
validation.parcours_id = parcours_id
|
||||
validation.ue1_id = ue1_id
|
||||
validation.ue2_id = ue2_id
|
||||
log(f"updating {validation}")
|
||||
Scolog.logdb(
|
||||
method="validation_rcue_record",
|
||||
etudid=etudid,
|
||||
msg=f"Mise à jour {validation}",
|
||||
commit=False,
|
||||
)
|
||||
operation = "update"
|
||||
else:
|
||||
validation = ApcValidationRCUE(
|
||||
code=code,
|
||||
@ -286,15 +280,16 @@ def validation_rcue_record(etudid: int):
|
||||
ue1_id=ue1_id,
|
||||
ue2_id=ue2_id,
|
||||
)
|
||||
log(f"recording {validation}")
|
||||
operation = "record"
|
||||
db.session.add(validation)
|
||||
db.session.commit()
|
||||
Scolog.logdb(
|
||||
method="validation_rcue_record",
|
||||
etudid=etudid,
|
||||
msg=f"Enregistrement {validation}",
|
||||
commit=False,
|
||||
commit=True,
|
||||
)
|
||||
db.session.add(validation)
|
||||
db.session.commit()
|
||||
log(f"{operation} {validation}")
|
||||
return validation.to_dict()
|
||||
|
||||
|
||||
|
@ -82,6 +82,10 @@ class ApcValidationRCUE(db.Model):
|
||||
"as a dict"
|
||||
d = dict(self.__dict__)
|
||||
d.pop("_sa_instance_state", None)
|
||||
d["etud"] = self.etud.to_dict_short()
|
||||
d["ue1"] = self.ue1.to_dict()
|
||||
d["ue2"] = self.ue2.to_dict()
|
||||
|
||||
return d
|
||||
|
||||
def to_dict_bul(self) -> dict:
|
||||
|
@ -517,7 +517,7 @@ def ficheEtud(etudid=None):
|
||||
cursus=but_cursus,
|
||||
scu=scu,
|
||||
)}
|
||||
<div>
|
||||
<div class="link_validation_rcues">
|
||||
<a href="{url_for("notes.validation_rcues",
|
||||
scodoc_dept=g.scodoc_dept, etudid=etudid,
|
||||
formsemestre_id=last_formsemestre.id)}"
|
||||
|
@ -100,6 +100,7 @@
|
||||
data-ue2_id="{{niv['ue_pair'].id}}"
|
||||
data-code="{{validation.code if validation else ''}}"
|
||||
>
|
||||
<option value="" disabled {{"selected" if not validation else ""}}>-</option>
|
||||
{% for code in rcue_codes %}
|
||||
<option value="{{code}}"
|
||||
{% if validation and validation.code == code -%}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.6.0"
|
||||
SCOVERSION = "9.6.1"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user