forked from ScoDoc/ScoDoc
validation_rcues: affiche ECTS et améliore menu
This commit is contained in:
parent
5cdfb360fa
commit
8614a29f9b
@ -47,10 +47,12 @@ def validation_rcues(etud: Identite, formsemestre: FormSemestre, edit: bool = Fa
|
||||
|
||||
ue_validation_by_niveau = get_ue_validation_by_niveau(refcomp, etud)
|
||||
rcue_validation_by_niveau = get_rcue_validation_by_niveau(refcomp, etud)
|
||||
ects_total = sum((v.ects() for v in ue_validation_by_niveau.values()))
|
||||
return render_template(
|
||||
"but/validation_rcues.j2",
|
||||
competences_parcour=competences_parcour,
|
||||
edit=edit,
|
||||
ects_total=ects_total,
|
||||
formation=formation,
|
||||
parcour=parcour,
|
||||
rcue_validation_by_niveau=rcue_validation_by_niveau,
|
||||
|
@ -10,6 +10,7 @@ from app.models import CODE_STR_LEN
|
||||
from app.models.events import Scolog
|
||||
from app.scodoc import sco_cache
|
||||
from app.scodoc import sco_utils as scu
|
||||
from app.scodoc.codes_cursus import CODES_UE_VALIDES
|
||||
|
||||
|
||||
class ScolarFormSemestreValidation(db.Model):
|
||||
@ -122,6 +123,14 @@ class ScolarFormSemestreValidation(db.Model):
|
||||
le {self.event_date.strftime("%d/%m/%Y")} à {self.event_date.strftime("%Hh%M")}
|
||||
"""
|
||||
|
||||
def ects(self) -> float:
|
||||
"Les ECTS acquis par cette validation. (0 si ce n'est pas une validation d'UE)"
|
||||
return (
|
||||
self.ue.ects
|
||||
if (self.ue is not None) and (self.code in CODES_UE_VALIDES)
|
||||
else 0.0
|
||||
)
|
||||
|
||||
|
||||
class ScolarAutorisationInscription(db.Model):
|
||||
"""Autorisation d'inscription dans un semestre"""
|
||||
|
@ -169,3 +169,11 @@ select.validation_rcue {
|
||||
display: inline-block;
|
||||
margin-left: 32px;
|
||||
}
|
||||
div.recap_ects, div.link_edit {
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.link_edit a {
|
||||
padding-right: 48px;
|
||||
}
|
@ -29,6 +29,7 @@
|
||||
validation.event_date.strftime("%d/%m/%Y à %H:%M")
|
||||
if validation.event_date else "-"
|
||||
}}</div>
|
||||
<div>{{"%g"|format(validation.ects())}} ECTS</div>
|
||||
{% else %}
|
||||
pas de décision de jury enregistrée pour cette UE
|
||||
{% endif %}
|
||||
@ -83,33 +84,34 @@
|
||||
<div class="rcue" style="position: relative;">
|
||||
<div class="rcue_validation_code with_scoplement">
|
||||
{% set validation = rcue_validation_by_niveau.get(niv['niveau'].id) %}
|
||||
{% if validation %}
|
||||
<div>
|
||||
RCUE enregistré <b>{{validation.code}}</b>
|
||||
{% if niv['niveau'] and edit %}
|
||||
{% if not (niv['ue_pair'] and niv['ue_impair']) %}
|
||||
<span title="UEs manquantes">⛔</span>
|
||||
{% else %}
|
||||
<select class="validation_rcue" name="ue_niv_{{niv['niveau'].id}}" id="ue_niv_{{niv['niveau'].id}}"
|
||||
onchange="record_rcue_validation(event,
|
||||
{{niv['niveau'].id}},
|
||||
);"
|
||||
|
||||
data-ue1_id="{{niv['ue_impair'].id}}"
|
||||
data-ue2_id="{{niv['ue_pair'].id}}"
|
||||
data-code="{{validation.code if validation else ''}}"
|
||||
>
|
||||
{% for code in rcue_codes %}
|
||||
<option value="{{code}}"
|
||||
{% if validation and validation.code == code -%}
|
||||
selected
|
||||
{%- endif %}
|
||||
>{{code}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
<div>
|
||||
{% if validation or niv['niveau'] %}
|
||||
RCUE : <b>{{validation.code if validation else ""}}</b>
|
||||
{% endif %}
|
||||
{% if niv['niveau'] and edit %}
|
||||
{% if not (niv['ue_pair'] and niv['ue_impair']) %}
|
||||
<span title="UEs manquantes">⛔</span>
|
||||
{% else %}
|
||||
<select class="validation_rcue" name="ue_niv_{{niv['niveau'].id}}" id="ue_niv_{{niv['niveau'].id}}"
|
||||
onchange="record_rcue_validation(event,
|
||||
{{niv['niveau'].id}},
|
||||
);"
|
||||
data-ue1_id="{{niv['ue_impair'].id}}"
|
||||
data-ue2_id="{{niv['ue_pair'].id}}"
|
||||
data-code="{{validation.code if validation else ''}}"
|
||||
>
|
||||
{% for code in rcue_codes %}
|
||||
<option value="{{code}}"
|
||||
{% if validation and validation.code == code -%}
|
||||
selected
|
||||
{%- endif %}
|
||||
>{{code}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if validation %}
|
||||
<div class="scoplement">
|
||||
<div>Validation du RCUE</div>
|
||||
<div>enregistrée le {{
|
||||
@ -137,18 +139,27 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="recap_ects">
|
||||
{{"%g"|format(ects_total)}} ECTS validés.
|
||||
</div>
|
||||
|
||||
{% if sco.formsemestre.can_edit_jury() %}
|
||||
<div style="padding-bottom: 16px;">
|
||||
<div class="link_edit">
|
||||
{% if edit %}
|
||||
<a class="stdlink" href="{{url_for('notes.validation_rcues',
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=sco.formsemestre.id, etudid=sco.etud.id
|
||||
)}}">quitter le mode édition des RCUEs</a>
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=sco.formsemestre.id, etudid=sco.etud.id)
|
||||
}}">Quitter le mode édition des RCUEs</a>
|
||||
{% else %}
|
||||
<a class="stdlink" href="{{url_for('notes.validation_rcues_edit',
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=sco.formsemestre.id, etudid=sco.etud.id
|
||||
)}}">éditer les décisions d'RCUE antérieurs</a>
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=sco.formsemestre.id, etudid=sco.etud.id)
|
||||
}}">Éditer les décisions d'RCUE antérieurs</a>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
<a class="stdlink" href="{{url_for('notes.formsemestre_validation_but',
|
||||
scodoc_dept=g.scodoc_dept,
|
||||
etudid=sco.etud.id,
|
||||
formsemestre_id=sco.formsemestre.id)
|
||||
}}">Page saisie jury</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -162,7 +173,11 @@ parcours <span class="parc">{{parcour.code}}</span>
|
||||
{% else %}
|
||||
tronc commun
|
||||
{% endif %}
|
||||
du référentiel de compétence {{formation.referentiel_competence.specialite}}
|
||||
du référentiel de compétence <a class="stdlink" href="{{
|
||||
url_for('notes.refcomp_show',
|
||||
scodoc_dept=g.scodoc_dept, refcomp_id=formation.referentiel_competence.id
|
||||
)}}">{{formation.referentiel_competence.specialite}}
|
||||
(version {{formation.referentiel_competence.version_orebut}})</a>.
|
||||
</p>
|
||||
|
||||
<p>Seuls les UEs et niveaux de ce référentiel sont montrés. Si le référentiel a
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.5.4"
|
||||
SCOVERSION = "9.5.5"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user