2024-08-24 08:06:46 +02:00
|
|
|
{% extends "sco_page_dept.j2" %}
|
2023-04-07 17:10:17 +02:00
|
|
|
|
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
2023-04-19 11:56:33 +02:00
|
|
|
<link href="{{scu.STATIC_DIR}}/css/refcomp_parcours_niveaux.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="{{scu.STATIC_DIR}}/css/parcour_formation.css" rel="stylesheet" type="text/css" />
|
2023-04-07 17:10:17 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2023-04-10 11:25:46 +02:00
|
|
|
{% macro menu_ue(niv, sem="pair", sem_idx=0) -%}
|
|
|
|
{% if niv['niveau'] %}
|
2023-09-29 21:17:31 +02:00
|
|
|
{% if current_user.has_permission(sco.Permission.EditFormation) %}
|
2023-04-10 11:25:46 +02:00
|
|
|
<select name="ue_niv_{{niv['niveau'].id}}" id="ue_niv_{{niv['niveau'].id}}"
|
2024-07-17 14:58:49 +02:00
|
|
|
onchange="ue_assoc_niveau(event,
|
2023-04-10 11:25:46 +02:00
|
|
|
{{niv['niveau'].id}}, {{parcour.id}}
|
|
|
|
);"
|
|
|
|
{% if niv['ue_'+sem] %}
|
|
|
|
data-ue_id="{{niv['ue_'+sem].id}}"
|
|
|
|
{% else %}
|
|
|
|
data-ue_id=""
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
{%- if not niv['ue_'+sem] -%}
|
2023-04-13 08:42:18 +02:00
|
|
|
<option value="" class="non_associe">UE de S{{sem_idx}} ?</option>
|
2023-04-10 11:25:46 +02:00
|
|
|
{%-else-%}
|
|
|
|
<option value="">Désassocier</option>
|
|
|
|
{%-endif-%}
|
|
|
|
{% for ue in niv['ues_'+sem] %}
|
|
|
|
<option value="{{ue.id}}"
|
|
|
|
{% if niv['ue_'+sem] and niv['ue_'+sem].id == ue.id -%}
|
|
|
|
selected
|
|
|
|
{%- endif %}
|
|
|
|
>{{ue.acronyme}}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
{% else %}
|
|
|
|
{# Vue en lecture seule #}
|
|
|
|
{% if niv['ue_'+sem] %}
|
|
|
|
{{ niv['ue_'+sem].acronyme }}
|
|
|
|
{% else %}
|
2023-04-19 11:56:33 +02:00
|
|
|
<span class="fontred">{{scu.EMO_WARNING|safe}} non associé</span>
|
2023-04-10 11:25:46 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2023-04-07 17:10:17 +02:00
|
|
|
{% block app_content %}
|
2024-09-12 14:34:34 +02:00
|
|
|
<h2>{{formation.html()|safe}}</h2>
|
2023-04-10 11:25:46 +02:00
|
|
|
|
|
|
|
{# Liens vers les différents parcours #}
|
|
|
|
<div class="les_parcours">
|
|
|
|
{% for parc in formation.referentiel_competence.parcours %}
|
2023-04-11 23:56:50 +02:00
|
|
|
<div class="parc {{'focus' if parcour and parc.id == parcour.id else ''}}">
|
2023-04-10 11:25:46 +02:00
|
|
|
<a href="{{
|
2023-10-19 22:24:56 +02:00
|
|
|
url_for('notes.parcour_formation', scodoc_dept=g.scodoc_dept,
|
2023-04-10 11:25:46 +02:00
|
|
|
parcour_id=parc.id, formation_id=formation.id )
|
|
|
|
}}">{{parc.code}}</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2023-04-11 23:56:50 +02:00
|
|
|
<div class="link">
|
2023-08-26 16:34:56 +02:00
|
|
|
<a class="stdlink" target="_blank" rel="noopener noreferrer" href="{{
|
2023-10-19 22:24:56 +02:00
|
|
|
url_for('notes.refcomp_show',
|
2023-04-11 23:56:50 +02:00
|
|
|
scodoc_dept=g.scodoc_dept, refcomp_id=formation.referentiel_competence.id )
|
|
|
|
}}">référentiel de compétences</a>
|
|
|
|
</div>
|
|
|
|
<div class="link"><a class="stdlink" href="{{
|
2023-10-19 22:24:56 +02:00
|
|
|
url_for('notes.ue_table',
|
2023-04-11 23:56:50 +02:00
|
|
|
scodoc_dept=g.scodoc_dept, formation_id=formation.id )
|
|
|
|
}}">formation</a>
|
|
|
|
</div>
|
2023-04-10 11:25:46 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{# Description d'un parcours #}
|
|
|
|
{% if parcour %}
|
2023-04-07 17:10:17 +02:00
|
|
|
<div class="parcour_formation">
|
|
|
|
|
|
|
|
<div class="titre_parcours">Parcours {{parcour.code}} « {{parcour.libelle}} »</div>
|
|
|
|
|
|
|
|
{% for comp in competences_parcour %}
|
|
|
|
{% set color_idx = 1 + loop.index0 % 6 %}
|
|
|
|
<div class="competence comp-c{{color_idx}}">
|
|
|
|
<div class="titre_competence tc">
|
|
|
|
Compétence {{comp['competence'].numero}} : {{comp['competence'].titre}}
|
|
|
|
</div>
|
|
|
|
<div class="niveaux">
|
|
|
|
{% for annee, niv in comp['niveaux'].items() %}
|
2023-10-19 22:24:56 +02:00
|
|
|
<div class="niveau comp-c{{color_idx}}-{{annee}}"
|
2023-04-10 11:25:46 +02:00
|
|
|
style="--color: var(--col-c{{color_idx}}-{{annee}});">
|
|
|
|
<div class="titre_niveau n{{annee}}">
|
|
|
|
<span class="parcs">
|
|
|
|
{% if niv['niveau'].is_tronc_commun %}
|
|
|
|
<span class="parc">TC</span>
|
|
|
|
{% elif niv['niveau'].parcours|length > 1 %}
|
|
|
|
<span class="parc">
|
|
|
|
{% set virg = joiner(", ") %}
|
|
|
|
{% for p in niv['niveau'].parcours %}
|
|
|
|
{{ virg() }}{{p.code}}
|
|
|
|
{% endfor %}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
2023-05-13 18:35:10 +02:00
|
|
|
{{niv['niveau'].libelle if niv['niveau'] else ''}}
|
2024-08-22 18:07:38 +02:00
|
|
|
{% if niv["warning"] %}
|
|
|
|
<div class="niveau-warning">{{scu.EMO_WARNING|safe}} {{niv["warning"]}}</div>
|
|
|
|
{% endif %}
|
2023-04-10 11:25:46 +02:00
|
|
|
</div>
|
|
|
|
<div class="ue impair u{{annee}}1">
|
|
|
|
{{ menu_ue(niv, "impair", 2*annee-1) }}
|
|
|
|
</div>
|
|
|
|
<div class="ue pair u{{annee}}1">
|
|
|
|
{{ menu_ue(niv, "pair", 2*annee) }}
|
|
|
|
</div>
|
2023-04-07 17:10:17 +02:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2023-04-10 11:25:46 +02:00
|
|
|
</div>
|
2023-10-19 22:24:56 +02:00
|
|
|
<div class="recap_ects">
|
|
|
|
{{"%g"|format(ects_parcours)}} ECTS dans ce parcours.
|
|
|
|
</div>
|
2023-04-10 11:25:46 +02:00
|
|
|
{% else %}
|
|
|
|
<div>
|
|
|
|
Choisissez un parcours...
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-04-07 17:10:17 +02:00
|
|
|
|
|
|
|
|
2023-04-11 13:48:57 +02:00
|
|
|
{% if parcour %}
|
2023-10-19 22:24:56 +02:00
|
|
|
<div class="help">
|
2023-04-11 13:48:57 +02:00
|
|
|
|
|
|
|
<p> Cette page représente le parcours <span class="parc">{{parcour.code}}</span>
|
|
|
|
du référentiel de compétence {{formation.referentiel_competence.specialite}}, et permet
|
|
|
|
d'associer à chaque semestre d'un niveau de compétence une UE de la formation
|
2023-10-19 22:24:56 +02:00
|
|
|
<a class="stdlink"
|
2023-04-11 13:48:57 +02:00
|
|
|
href="{{url_for('notes.ue_table', scodoc_dept=g.scodoc_dept, formation_id=formation.id )
|
2024-09-12 14:34:34 +02:00
|
|
|
}}">{{formation.html()|safe}}
|
2023-10-19 22:24:56 +02:00
|
|
|
</a>.</p>
|
2023-04-11 13:48:57 +02:00
|
|
|
|
|
|
|
<p>Le symbole <span class="parc">TC</span> désigne un niveau du tronc commun
|
2023-10-19 22:24:56 +02:00
|
|
|
(c'est à dire présent dans tous les parcours de la spécialité). </p>
|
2023-04-11 13:48:57 +02:00
|
|
|
|
2023-10-19 22:24:56 +02:00
|
|
|
<p>Ce formulaire ne vérifie pas si l'UE est bien conçue pour ce parcours.</p>
|
2023-04-11 13:48:57 +02:00
|
|
|
|
|
|
|
<p>Les modifications sont enregistrées au fur et à mesure.</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2023-04-10 11:25:46 +02:00
|
|
|
<script>
|
2024-07-17 14:58:49 +02:00
|
|
|
function ue_assoc_niveau(event, niveau_id) {
|
2023-04-10 11:25:46 +02:00
|
|
|
let ue_id = event.target.value;
|
|
|
|
let url = "";
|
|
|
|
let must_reload = false;
|
|
|
|
if (ue_id == "") {
|
|
|
|
/* Dé-associe */
|
|
|
|
ue_id = event.target.dataset.ue_id;
|
|
|
|
const desassoc_url = '{{
|
|
|
|
url_for(
|
2024-07-17 14:58:49 +02:00
|
|
|
"apiweb.ue_desassoc_niveau",
|
2023-04-10 11:25:46 +02:00
|
|
|
scodoc_dept=g.scodoc_dept,
|
|
|
|
ue_id=11111
|
|
|
|
)
|
|
|
|
}}';
|
|
|
|
url = desassoc_url.replace('11111', ue_id);
|
|
|
|
must_reload=true;
|
|
|
|
} else {
|
|
|
|
const assoc_url = '{{
|
|
|
|
url_for(
|
2024-07-17 14:58:49 +02:00
|
|
|
"apiweb.ue_assoc_niveau",
|
2023-04-10 11:25:46 +02:00
|
|
|
scodoc_dept=g.scodoc_dept,
|
|
|
|
ue_id=11111, niveau_id=22222
|
|
|
|
)
|
|
|
|
}}';
|
|
|
|
url = assoc_url.replace('11111', ue_id).replace('22222', niveau_id);
|
|
|
|
}
|
|
|
|
fetch(url, {
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
},
|
|
|
|
/* body: JSON.stringify( {} ) */
|
|
|
|
})
|
|
|
|
.then(response => response.json())
|
|
|
|
.then(data => {
|
|
|
|
if (data.status) {
|
2023-04-13 09:58:38 +02:00
|
|
|
/* sco_message(data.message); */
|
2023-04-10 11:25:46 +02:00
|
|
|
/* revert menu to initial state */
|
|
|
|
event.target.value = event.target.dataset.ue_id;
|
|
|
|
}
|
|
|
|
location.reload();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2023-10-19 22:24:56 +02:00
|
|
|
{% endblock %}
|