forked from ScoDoc/ScoDoc
Ajoute différentes infos à la page du site Web consacré aux PE (dont tentative de progress bar)
This commit is contained in:
parent
f10d46c230
commit
0adcbb7c0b
@ -70,14 +70,19 @@ def pe_view_sem_recap(formsemestre_id: int):
|
||||
# L'année du diplome
|
||||
annee_diplome = pe_comp.get_annee_diplome_semestre(formsemestre)
|
||||
|
||||
# Cosemestres diplomants
|
||||
cosemestres = pe_comp.get_cosemestres_diplomants(annee_diplome)
|
||||
|
||||
if request.method == "GET":
|
||||
return render_template(
|
||||
"pe/pe_view_sem_recap.j2",
|
||||
annee_diplome=annee_diplome,
|
||||
formsemestre=formsemestre,
|
||||
sco=ScoData(formsemestre=formsemestre),
|
||||
cosemestres=cosemestres,
|
||||
)
|
||||
|
||||
# request.method == "POST"
|
||||
jury = pe_jury.JuryPE(annee_diplome)
|
||||
if not jury.diplomes_ids:
|
||||
flash("aucun étudiant à considérer !")
|
||||
@ -97,3 +102,11 @@ def pe_view_sem_recap(formsemestre_id: int):
|
||||
download_name=scu.sanitize_filename(jury.nom_export_zip + ".zip"),
|
||||
as_attachment=True,
|
||||
)
|
||||
|
||||
return render_template(
|
||||
"pe/pe_view_sem_recap.j2",
|
||||
annee_diplome=annee_diplome,
|
||||
formsemestre=formsemestre,
|
||||
sco=ScoData(formsemestre=formsemestre),
|
||||
cosemestres=cosemestres,
|
||||
)
|
||||
|
@ -30,7 +30,7 @@
|
||||
<p>
|
||||
Cette fonction génère un ensemble de feuilles de calcul (xlsx)
|
||||
permettant d'éditer des avis de poursuites d'études pour les étudiants
|
||||
de BUT diplômés en {{annee_diplome}}.
|
||||
de BUT diplômés.
|
||||
<br>
|
||||
De nombreux aspects sont paramétrables:
|
||||
<a href="https://scodoc.org/AvisPoursuiteEtudes"
|
||||
@ -40,9 +40,36 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
<input type="submit" value="Générer les documents"/>
|
||||
<h3>Avis de poursuites d'études de la promo {{ annee_diplome }}</h3>
|
||||
|
||||
<div class="help">
|
||||
Seront (a minima) pris en compte les étudiants des semestres suivants :
|
||||
|
||||
<ul>
|
||||
{% for fid in cosemestres %}
|
||||
<li>
|
||||
{{ cosemestres[fid].titre_annee() }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<progress id="pe_progress" style="visibility: hidden"></progress>
|
||||
<br>
|
||||
<button onclick="submitPEGeneration()">Générer les documents de la promo {{ annee_diplome }}</button>
|
||||
</div>
|
||||
|
||||
<form method="post" id="pe_generation" style="visibility: hidden">
|
||||
<input type="submit"
|
||||
onclick="submitPEGeneration()" value=""/>
|
||||
<input type="hidden" name="formsemestre_id" value="{{formsemestre.id}}">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function submitPEGeneration() {
|
||||
// document.getElementById("pe_progress").style.visibility = 'visible';
|
||||
document.getElementById("pe_generation").submit(); //attach an id to your form
|
||||
}
|
||||
</script>
|
||||
{% endblock app_content %}
|
Loading…
Reference in New Issue
Block a user