2023-07-20 15:53:59 +02:00
|
|
|
{% extends "sco_page.j2" %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
2023-10-26 13:12:22 +02:00
|
|
|
{{ super() }}
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/etud_info.js"></script>
|
2023-11-29 18:07:14 +01:00
|
|
|
<script src="{{scu.STATIC_DIR}}/js/date_utils.js"></script>
|
2023-07-20 15:53:59 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
|
2024-02-08 15:56:58 +01:00
|
|
|
<style>
|
|
|
|
label.stats_checkbox {
|
|
|
|
font-weight: normal;
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
2024-06-25 21:47:16 +02:00
|
|
|
|
|
|
|
table.dataTable.gt_table tr td.col_count {
|
|
|
|
width: 3em;
|
|
|
|
}
|
|
|
|
table.dataTable.gt_table tr td.col_lien_ajout {
|
|
|
|
padding-left: 1.5em;
|
|
|
|
padding-right: 1.5em;
|
|
|
|
}
|
2024-02-08 15:56:58 +01:00
|
|
|
</style>
|
|
|
|
|
2023-07-10 17:38:50 +02:00
|
|
|
<h2>Visualisation de l'assiduité {{gr_tit|safe}}</h2>
|
|
|
|
|
|
|
|
<div class="stats-inputs">
|
2023-11-15 14:11:47 +01:00
|
|
|
<label class="stats-label"> Date de début <input type="text" class="datepicker" name="stats_date_debut"
|
|
|
|
id="stats_date_debut" value="{{date_debut}}"></label>
|
|
|
|
<label class="stats-label"> Date de fin <input type="text" class="datepicker" name="stats_date_fin"
|
|
|
|
id="stats_date_fin" value="{{date_fin}}"></label>
|
2023-07-20 15:53:59 +02:00
|
|
|
<button onclick="stats()">Changer</button>
|
|
|
|
|
2023-09-21 10:20:19 +02:00
|
|
|
<a style="margin-left:32px;" href="{{request.url}}&fmt=xlsx">{{scu.ICON_XLS|safe}}</a>
|
2024-02-08 15:56:58 +01:00
|
|
|
|
|
|
|
<label class="stats_checkbox">
|
|
|
|
<input type="checkbox" id="formsemestre_modimpls_box"> restreindre l'assiduité aux
|
|
|
|
modules de ce semestre
|
|
|
|
</label>
|
|
|
|
|
2023-07-10 17:38:50 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{tableau | safe}}
|
|
|
|
|
2023-10-26 13:12:22 +02:00
|
|
|
<div class="help">
|
|
|
|
Les comptes sont exprimés en {{ assi_metric | lower}}s.
|
2023-08-13 22:40:16 +02:00
|
|
|
</div>
|
|
|
|
|
2023-07-10 17:38:50 +02:00
|
|
|
<script>
|
2023-07-21 09:28:45 +02:00
|
|
|
const date_debut = "{{date_debut}}";
|
|
|
|
const date_fin = "{{date_fin}}";
|
|
|
|
const group_ids = "{{group_ids}}";
|
2023-07-10 17:38:50 +02:00
|
|
|
|
2024-06-11 14:50:30 +02:00
|
|
|
// Changement de la date de début ou de fin des statitiques
|
|
|
|
// Recharge la page avec les nouvelles dates
|
2023-07-10 17:38:50 +02:00
|
|
|
function stats() {
|
2023-11-17 11:36:15 +01:00
|
|
|
const deb = Date.fromFRA(document.querySelector('#stats_date_debut').value);
|
|
|
|
const fin = Date.fromFRA(document.querySelector('#stats_date_fin').value);
|
2024-06-11 14:50:30 +02:00
|
|
|
let url = new URL(window.location.href);
|
|
|
|
url.searchParams.set('date_debut', deb);
|
|
|
|
url.searchParams.set('date_fin', fin);
|
|
|
|
location.href = url.href;
|
2023-07-10 17:38:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener('load', () => {
|
|
|
|
document.querySelector('#stats_date_debut').value = date_debut;
|
|
|
|
document.querySelector('#stats_date_fin').value = date_fin;
|
2024-02-08 15:56:58 +01:00
|
|
|
|
|
|
|
// La checkbox pour restreindre aux modules du semestre:
|
|
|
|
var url = new URL(window.location.href);
|
|
|
|
var checkbox = document.getElementById('formsemestre_modimpls_box');
|
|
|
|
checkbox.checked = url.searchParams.has('formsemestre_modimpls_id');
|
|
|
|
checkbox.addEventListener('change', function() {
|
|
|
|
if (this.checked) {
|
|
|
|
url.searchParams.set('formsemestre_modimpls_id', {{sco.formsemestre.id}});
|
|
|
|
} else {
|
|
|
|
url.searchParams.delete('formsemestre_modimpls_id');
|
|
|
|
}
|
|
|
|
window.location.href = url.href;
|
|
|
|
});
|
2023-07-10 17:38:50 +02:00
|
|
|
})
|
|
|
|
|
2023-07-20 15:53:59 +02:00
|
|
|
</script>
|
|
|
|
|
2023-11-29 18:07:14 +01:00
|
|
|
{% endblock %}
|