2024-01-21 22:21:10 +01:00
|
|
|
{% extends "sco_page.j2" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2024-02-29 08:47:03 +01:00
|
|
|
{{title}}
|
2024-01-21 22:21:10 +01:00
|
|
|
{% endblock title %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block scripts %}
|
2024-02-29 08:47:03 +01:00
|
|
|
{{ super() }}
|
|
|
|
<script src="{{scu.STATIC_DIR}}/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/libjs/purl.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/etud_info.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/groups_view.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/date_utils.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/assiduites.js"></script>
|
2024-03-11 11:39:06 +01:00
|
|
|
{% include "sco_timepicker.j2" %}
|
2024-01-21 22:21:10 +01:00
|
|
|
|
2024-02-29 08:47:03 +01:00
|
|
|
<script>
|
2024-01-21 22:21:10 +01:00
|
|
|
|
|
|
|
{% if readonly != "false" %}
|
2024-02-29 08:47:03 +01:00
|
|
|
function getPeriodValues() {
|
2024-01-21 22:21:10 +01:00
|
|
|
return [0, 23]
|
|
|
|
}
|
2024-03-11 11:39:06 +01:00
|
|
|
{% else %}
|
|
|
|
setupTimeLine(()=>{creerTousLesEtudiants(etuds)})
|
2024-01-21 22:21:10 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-04-08 18:56:43 +02:00
|
|
|
|
2024-01-21 22:21:10 +01:00
|
|
|
|
|
|
|
const nonWorkDays = [{{ nonworkdays| safe }}];
|
|
|
|
const readOnly = {{ readonly }};
|
|
|
|
|
2024-03-13 16:35:56 +01:00
|
|
|
window.forceModule = "{{ forcer_module }}" == "True"
|
2024-04-22 15:05:31 +02:00
|
|
|
window.nonPresent = {{ 'true' if non_present else 'false' }};
|
2024-03-13 16:35:56 +01:00
|
|
|
|
2024-01-21 22:21:10 +01:00
|
|
|
const etudsDefDem = {{ defdem | safe }}
|
|
|
|
|
|
|
|
const select = document.getElementById("moduleimpl_select");
|
|
|
|
|
|
|
|
if (window.forceModule) {
|
|
|
|
const btn = document.getElementById("validate_selectors");
|
|
|
|
|
|
|
|
|
|
|
|
if (!readOnly && select.value == "") {
|
|
|
|
document.getElementById('forcemodule').style.display = "block";
|
|
|
|
}
|
|
|
|
|
|
|
|
select?.addEventListener('change', (e) => {
|
|
|
|
if (e.target.value != "") {
|
|
|
|
document.getElementById('forcemodule').style.display = "none";
|
|
|
|
} else {
|
|
|
|
document.getElementById('forcemodule').style.display = "block";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2024-03-11 11:39:06 +01:00
|
|
|
|
|
|
|
document.getElementById("pdp").addEventListener("change", (e) => {
|
2024-03-26 09:02:55 +01:00
|
|
|
afficherPDP(e.target.checked);
|
|
|
|
//creerTousLesEtudiants(etuds);
|
2024-03-11 11:39:06 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#date').on('change', async function(d) {
|
|
|
|
// On vérifie si la date est un jour travaillé
|
|
|
|
dateCouranteEstTravaillee();
|
2024-04-08 18:56:43 +02:00
|
|
|
|
2024-03-11 11:39:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
|
|
|
creerTousLesEtudiants(etuds);
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#moduleimpl_select").on("change", ()=>{
|
|
|
|
creerTousLesEtudiants(etuds);
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#group_ids_sel").on("change", ()=>{
|
|
|
|
main();
|
|
|
|
})
|
|
|
|
|
|
|
|
const moduleimpls = {};
|
|
|
|
const inscriptionsModules = new Map();
|
|
|
|
let etuds = new Map();
|
|
|
|
|
|
|
|
async function main(){
|
|
|
|
dateCouranteEstTravaillee();
|
|
|
|
etuds = await recupEtuds($('#group_ids_sel').val());
|
|
|
|
if (etuds.size != 0){
|
|
|
|
await recupAssiduites(etuds, $("#date").datepicker("getDate"));
|
|
|
|
}
|
|
|
|
creerTousLesEtudiants(etuds);
|
2024-04-08 18:56:43 +02:00
|
|
|
|
2024-03-26 09:02:55 +01:00
|
|
|
// affichage ou non des PDP
|
|
|
|
afficherPDP(localStorage.getItem("scodoc-etud-pdp") == "true" )
|
2024-03-11 11:39:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
setTimeout(main, 0);
|
|
|
|
|
|
|
|
|
2024-02-29 08:47:03 +01:00
|
|
|
</script>
|
2024-01-21 22:21:10 +01:00
|
|
|
{% endblock scripts %}
|
|
|
|
|
|
|
|
{% block styles %}
|
2024-02-29 08:47:03 +01:00
|
|
|
{{ super() }}
|
|
|
|
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap/css/bootstrap-theme.min.css">
|
|
|
|
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.css">
|
|
|
|
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/assiduites.css">
|
|
|
|
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/css/minitimeline.css">
|
2024-05-23 09:23:45 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
#retour-haut{
|
|
|
|
position: fixed;
|
|
|
|
bottom: 10px;
|
|
|
|
right: 10px;
|
|
|
|
font-size: 3em;
|
|
|
|
padding: 5px;
|
|
|
|
border-radius: 5px;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
html{
|
|
|
|
scroll-behavior: smooth !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
2024-01-21 22:21:10 +01:00
|
|
|
{% endblock styles %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
|
|
|
|
{{ minitimeline|safe }}
|
2023-04-17 15:44:55 +02:00
|
|
|
<section id="content">
|
|
|
|
|
2024-05-23 09:23:45 +02:00
|
|
|
<a id="retour-haut" href="#gtrcontent">
|
|
|
|
⬆️
|
|
|
|
</a>
|
|
|
|
|
2023-04-17 15:44:55 +02:00
|
|
|
<div class="no-display">
|
|
|
|
<span class="formsemestre_id">{{formsemestre_id}}</span>
|
|
|
|
<span id="formsemestre_date_debut">{{formsemestre_date_debut}}</span>
|
|
|
|
<span id="formsemestre_date_fin">{{formsemestre_date_fin}}</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2>
|
2023-10-09 19:08:57 +02:00
|
|
|
{% if readonly == "true" %}
|
|
|
|
Assiduité {{gr_tit|safe}} {{sem}} (lecture seule)
|
|
|
|
{% else %}
|
|
|
|
Saisie de l'assiduité {{gr_tit|safe}} {{sem}}
|
|
|
|
{% endif %}
|
2023-04-17 15:44:55 +02:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<fieldset class="selectors">
|
|
|
|
<div class="infos">
|
2023-10-09 19:08:57 +02:00
|
|
|
<div class="infos-button">Groupes : {{grp|safe}}</div>
|
2024-03-11 11:39:06 +01:00
|
|
|
<div>
|
2024-05-23 09:40:44 +02:00
|
|
|
<button class="btn_date" onclick="jourSuivant(true)">
|
|
|
|
⇤
|
|
|
|
</button>
|
2024-03-11 11:39:06 +01:00
|
|
|
<input type="text" name="date" id="date" class="datepicker" value="{{date}}">
|
2023-10-09 19:08:57 +02:00
|
|
|
</div>
|
2024-05-23 09:40:44 +02:00
|
|
|
<button class="btn_date" onclick="jourSuivant(false)">
|
|
|
|
⇥
|
|
|
|
</button>
|
2023-04-17 15:44:55 +02:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
2024-03-11 11:39:06 +01:00
|
|
|
<div style="display: {{'none' if readonly == 'true' else 'block'}};">
|
|
|
|
{{timeline|safe}}
|
2024-05-23 09:17:56 +02:00
|
|
|
<div>
|
|
|
|
<button onclick="setPeriodValues(t_start, t_mid)">Matin</button>
|
|
|
|
<button onclick="setPeriodValues(t_mid, t_end)">Après-Midi</button>
|
|
|
|
</div>
|
2024-03-11 11:39:06 +01:00
|
|
|
</div>
|
2023-07-26 16:43:49 +02:00
|
|
|
|
2024-01-12 11:36:00 +01:00
|
|
|
{% if readonly == "false" %}
|
2023-07-26 16:43:49 +02:00
|
|
|
|
|
|
|
<div style="margin: 1vh 0;">
|
2023-08-13 22:40:16 +02:00
|
|
|
<div id="forcemodule" style="display: none; margin:10px 0px;">
|
|
|
|
Vous devez spécifier le module ! (voir réglage préférence du semestre)
|
|
|
|
</div>
|
2023-10-09 19:08:57 +02:00
|
|
|
<div>Module : {{moduleimpl_select|safe}}</div>
|
2023-07-26 16:43:49 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
{% endif %}
|
2023-10-09 19:08:57 +02:00
|
|
|
|
2024-03-11 11:39:06 +01:00
|
|
|
<div>
|
|
|
|
<label for="pdp">
|
|
|
|
<span>Afficher les photos</span>
|
|
|
|
<input type="checkbox" name="pdp" id="pdp">
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{% if readonly == "false" %}
|
|
|
|
<div class="mass-selection">
|
|
|
|
<span>Mettre tout le monde :</span>
|
|
|
|
<fieldset class="btns_field mass">
|
2024-04-22 15:05:31 +02:00
|
|
|
{% if not non_present %}
|
2024-03-11 11:39:06 +01:00
|
|
|
<input type="checkbox" value="present" name="mass_btn_assiduites" id="mass_rbtn_present"
|
2024-05-24 16:27:17 +02:00
|
|
|
class="rbtn present" onclick="mettreToutLeMonde('present', this)" title="Indique l'état Présent pour tous les étudiants" data-tooltip>
|
2024-04-22 15:05:31 +02:00
|
|
|
{% endif %}
|
2024-03-11 11:39:06 +01:00
|
|
|
<input type="checkbox" value="retard" name="mass_btn_assiduites" id="mass_rbtn_retard"
|
2024-05-24 16:27:17 +02:00
|
|
|
class="rbtn retard" onclick="mettreToutLeMonde('retard', this)" title="Indique l'état Retard pour tous les étudiants" data-tooltip>
|
2024-03-11 11:39:06 +01:00
|
|
|
<input type="checkbox" value="absent" name="mass_btn_assiduites" id="mass_rbtn_absent"
|
2024-05-24 16:27:17 +02:00
|
|
|
class="rbtn absent" onclick="mettreToutLeMonde('absent', this)" title="Indique l'état Absent pour tous les étudiants" data-tooltip>
|
2024-03-11 11:39:06 +01:00
|
|
|
<input type="checkbox" value="remove" name="mass_btn_assiduites" id="mass_rbtn_aucun"
|
2024-05-24 16:27:17 +02:00
|
|
|
class="rbtn aucun" onclick="mettreToutLeMonde('vide', this)" title="Retire l'état pour tous les étudiants" data-tooltip>
|
2024-03-11 11:39:06 +01:00
|
|
|
</fieldset>
|
2024-04-08 18:56:43 +02:00
|
|
|
<em>Les saisies ci-dessous sont enregistrées au fur et à mesure.</em>
|
2024-03-11 11:39:06 +01:00
|
|
|
</div>
|
2023-10-09 19:08:57 +02:00
|
|
|
{% endif %}
|
2024-04-08 18:56:43 +02:00
|
|
|
|
2023-10-09 19:08:57 +02:00
|
|
|
|
2023-04-17 15:44:55 +02:00
|
|
|
<div class="etud_holder">
|
2023-06-12 17:54:30 +02:00
|
|
|
<p class="placeholder">
|
|
|
|
</p>
|
2023-04-17 15:44:55 +02:00
|
|
|
</div>
|
|
|
|
|
2024-04-22 08:39:00 +02:00
|
|
|
<div class="help">
|
|
|
|
<h3>Calendrier</h3>
|
|
|
|
{% include "assiduites/widgets/legende_couleur.j2" %}
|
|
|
|
</div>
|
|
|
|
|
2024-03-11 11:39:06 +01:00
|
|
|
{% include "assiduites/widgets/toast.j2" %}
|
2023-06-20 08:33:49 +02:00
|
|
|
{% include "assiduites/widgets/alert.j2" %}
|
|
|
|
{% include "assiduites/widgets/prompt.j2" %}
|
|
|
|
{% include "assiduites/widgets/conflict.j2" %}
|
2024-04-08 18:56:43 +02:00
|
|
|
|
2023-04-17 15:44:55 +02:00
|
|
|
|
2024-01-21 22:21:10 +01:00
|
|
|
</section>
|
2023-06-13 16:25:45 +02:00
|
|
|
|
2024-03-11 11:39:06 +01:00
|
|
|
{% endblock app_content %}
|