Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 45 additions and 5 deletions
Showing only changes of commit 0adcbb7c0b - Show all commits

View File

@ -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,
)

View File

@ -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"/>
<input type="hidden" name="formsemestre_id" value="{{formsemestre.id}}">
</form>
<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 %}