forked from ScoDoc/ScoDoc
210 lines
6.8 KiB
Django/Jinja
210 lines
6.8 KiB
Django/Jinja
{% extends 'base.j2' %}
|
|
|
|
{% block styles %}
|
|
{{super()}}
|
|
<link href="{{scu.STATIC_DIR}}/css/jury_delete_manual.css" rel="stylesheet" type="text/css" />
|
|
{% endblock %}
|
|
|
|
{% block app_content %}
|
|
|
|
|
|
<h2>Décisions de jury enregistrées pour {{etud.html_link_fiche()|safe}}</h2>
|
|
|
|
<p class="help">
|
|
Cette page liste toutes les décisions de jury connus de ScoDoc concernant cet étudiant
|
|
{% if not read_only %}
|
|
et permet de les effacer une par une.
|
|
{% endif %}
|
|
</p>
|
|
{% if not read_only %}
|
|
<p class="help">
|
|
<b>Attention</b>, il vous appartient de vérifier la cohérence du résultat !
|
|
En principe, <b>l'usage de cette page devrait rester exceptionnel</b>.
|
|
Aucune annulation n'est ici possible (vous devrez re-saisir les décisions via les
|
|
pages de saisie de jury habituelles).
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div class="scobox">
|
|
|
|
{% if sem_vals.first() %}
|
|
<div class="jury_decisions_list jury_decisions_sems">
|
|
<div>Décisions de semestres</div>
|
|
{% for v in sem_vals %}
|
|
<details>
|
|
<summary>{{v.html()|safe}}</summary>
|
|
<div class="validation-details">
|
|
{% if not read_only %}
|
|
<form class="inline-form">
|
|
<button
|
|
data-v_id="{{v.id}}" data-type="validation_formsemestre" data-etudid="{{etud.id}}"
|
|
>effacer validation</button></form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if ue_vals.first() %}
|
|
<div class="jury_decisions_list jury_decisions_ues">
|
|
<div>Décisions d'UEs</div>
|
|
{% for v in ue_vals %}
|
|
<details>
|
|
<summary>{{v.html(detail=True)|safe}}</summary>
|
|
<div class="validation-details">
|
|
<b>UE {{v.ue.acronyme}}</b> en
|
|
<a class="discretelink" href="{{
|
|
url_for('notes.ue_table', scodoc_dept=g.scodoc_dept,
|
|
formation_id=v.ue.formation.id, semestre_idx=v.ue.semestre_idx)
|
|
}}">{{v.ue.formation.html()|safe}}</a>
|
|
{% if v.ue.formation.is_apc() %}
|
|
<div>Référentiel :
|
|
{{ v.ue.formation.referentiel_competence.get_title()
|
|
if v.ue.formation.referentiel_competence else '<em>pas de référentiel</em>' }}
|
|
</div>
|
|
{% endif %}
|
|
{% if not read_only %}
|
|
<form class="inline-form">
|
|
<button data-v_id="{{v.id}}" data-type="validation_ue" data-etudid="{{etud.id}}"
|
|
>effacer validation d'UE</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if rcue_vals.first() %}
|
|
<div class="jury_decisions_list jury_decisions_rcues">
|
|
<div>Décisions de RCUE (niveaux de compétences)</div>
|
|
{% for v in rcue_vals %}
|
|
<details>
|
|
<summary>{{v.html()|safe}}</summary>
|
|
<div class="validation-details">
|
|
{% if not read_only %}
|
|
<form class="inline-form">
|
|
<button data-v_id="{{v.id}}" data-type="validation_rcue" data-etudid="{{etud.id}}"
|
|
>effacer validation RCUE</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if annee_but_vals.first() %}
|
|
<div class="jury_decisions_list jury_decisions_annees_but">
|
|
<div>Décisions d'années BUT</div>
|
|
{% for v in annee_but_vals %}
|
|
<details>
|
|
<summary>{{v.html()|safe}}</summary>
|
|
<div class="validation-details">
|
|
{% if not read_only %}
|
|
<form class="inline-form">
|
|
<button data-v_id="{{v.id}}" data-type="validation_annee_but" data-etudid="{{etud.id}}"
|
|
>effacer décision année</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if dut120_vals.count() %}
|
|
<div class="jury_decisions_list jury_decisions_dut120">
|
|
<div>Diplôme de DUT en 120 ECTS (dans un parcours BUT)</div>
|
|
{% for v in dut120_vals %}
|
|
<details>
|
|
<summary>{{v.html()|safe}}</summary>
|
|
<div class="validation-details">
|
|
{% if not read_only %}
|
|
<form>
|
|
<button data-v_id="{{v.id}}" data-type="validation_dut120" data-etudid="{{etud.id}}"
|
|
>effacer diplôme DUT120</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if autorisations.first() %}
|
|
<div class="jury_decisions_list jury_decisions_autorisation_inscription">
|
|
<div>Autorisations d'inscriptions (passages)</div>
|
|
|
|
{% for v in autorisations %}
|
|
<details>
|
|
<summary>{{v.html()|safe}}</summary>
|
|
<div class="validation-details">
|
|
{% if not read_only %}
|
|
<form class="validation-details">
|
|
<button data-v_id="{{v.id}}" data-type="autorisation_inscription" data-etudid="{{etud.id}}"
|
|
>effacer autorisation</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</details>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if not(
|
|
sem_vals.first() or ue_vals.first() or rcue_vals.first()
|
|
or annee_but_vals.first() or autorisations.first() or dut120_vals.first() )
|
|
%}
|
|
<div>
|
|
<p class="fontred">aucune décision enregistrée</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="scobox">
|
|
<p>Retour à la fiche de {{etud.html_link_fiche()|safe}}
|
|
</p>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block scripts %}
|
|
{{super()}}
|
|
|
|
{% if not read_only %}
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const buttons = document.querySelectorAll('.jury_decisions_list button');
|
|
|
|
buttons.forEach(button => {
|
|
button.addEventListener('click', (event) => {
|
|
// Handle button click event here
|
|
event.preventDefault();
|
|
const etudid = event.target.dataset.etudid;
|
|
const v_id = event.target.dataset.v_id;
|
|
const validation_type = event.target.dataset.type;
|
|
if (confirm("Supprimer cette validation ?")) {
|
|
fetch(`${SCO_URL}../api/etudiant/${etudid}/jury/${validation_type}/${v_id}/delete`,
|
|
{
|
|
method: "POST",
|
|
}).then(response => {
|
|
// Handle the response
|
|
if (response.ok) {
|
|
location.reload();
|
|
} else {
|
|
console.log(`Error: ${SCO_URL}../api/etudiant/${etudid}/jury/${validation_type}/${v_id}/delete`);
|
|
throw new Error('Request failed');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %}
|