2023-04-25 22:59:06 +02:00
|
|
|
{% extends "base.j2" %}
|
2023-11-15 20:38:51 +01:00
|
|
|
{% import 'wtf.j2' as wtf %}
|
2023-04-25 22:59:06 +02:00
|
|
|
|
2023-11-13 15:08:09 +01:00
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
|
|
|
<style>
|
|
|
|
div.config-section {
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 18px;
|
|
|
|
margin-right: -15px;
|
|
|
|
margin-left: -15px;
|
|
|
|
}
|
2023-11-14 15:55:52 +01:00
|
|
|
|
|
|
|
#zone-test {
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
#raw-ics-sample-zone {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#raw-ics-sample-zone>div {
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
#test_load_ics:disabled {
|
|
|
|
background-color: gray;
|
|
|
|
color: white; /* Optional: change text color if needed */
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2023-11-13 15:08:09 +01:00
|
|
|
</style>
|
2023-11-14 15:55:52 +01:00
|
|
|
{% endblock styles %}
|
|
|
|
|
2023-11-13 15:08:09 +01:00
|
|
|
|
2023-11-14 15:55:52 +01:00
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function update_test_button_state() {
|
|
|
|
var inputValue = document.getElementById('test_edt_id').value;
|
|
|
|
document.getElementById('test_load_ics').disabled = inputValue.length === 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
async function load_ics_sample() {
|
|
|
|
var edt_id = document.getElementById('test_edt_id').value;
|
|
|
|
try {
|
2024-01-06 14:32:06 +01:00
|
|
|
const response = await fetch(`/ScoDoc/ics_raw_sample/${edt_id}`);
|
2023-11-14 15:55:52 +01:00
|
|
|
if (!response.ok) {
|
|
|
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
|
|
}
|
|
|
|
const data = await response.text();
|
|
|
|
document.getElementById('raw-ics-sample').value = data;
|
|
|
|
document.getElementById('raw-ics-sample-zone').style.display = 'block';
|
|
|
|
} catch (error) {
|
|
|
|
console.error('Error fetching data: ', error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock scripts %}
|
2023-11-13 15:08:09 +01:00
|
|
|
|
2023-04-25 22:59:06 +02:00
|
|
|
{% block app_content %}
|
2023-08-13 22:40:16 +02:00
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<h1>Configuration du suivi de l'assiduité</h1>
|
|
|
|
|
2023-12-29 06:19:20 +01:00
|
|
|
<div class="help">
|
|
|
|
<p>Ces paramètres seront utilisés par tous les départements et
|
2023-08-13 22:40:16 +02:00
|
|
|
affectent notamment les comptages d'absences de tous les bulletins des
|
|
|
|
étudiants : ne changer que lorsque c'est vraiment nécessaire.
|
2023-12-29 06:19:20 +01:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Les heures de ScoDoc sont exprimées en <em>heures locale du serveur</em>,
|
|
|
|
c'est à dire à la montre des étudiants.
|
|
|
|
</p>
|
2023-08-13 22:40:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2023-04-25 22:59:06 +02:00
|
|
|
|
2023-11-08 23:19:58 +01:00
|
|
|
<form class="form form-horizontal" method="post" enctype="multipart/form-data" role="form">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
{{ wtf.form_errors(form, hiddens="only") }}
|
|
|
|
|
2024-01-05 10:06:16 +01:00
|
|
|
{{ wtf.form_field(form.assi_morning_time) }}
|
|
|
|
{{ wtf.form_field(form.assi_lunch_time) }}
|
|
|
|
{{ wtf.form_field(form.assi_afternoon_time) }}
|
|
|
|
{{ wtf.form_field(form.assi_tick_time) }}
|
2023-11-08 23:19:58 +01:00
|
|
|
</div>
|
2023-04-25 22:59:06 +02:00
|
|
|
</div>
|
2023-11-08 23:19:58 +01:00
|
|
|
<div class="row">
|
|
|
|
<h1>Emplois du temps</h1>
|
2023-12-24 16:09:07 +01:00
|
|
|
<div class="help">ScoDoc peut récupérer les emplois du temps de chaque session.
|
|
|
|
Voir <a href="https://scodoc.org/EmploisDuTemps" class="stdlink"
|
|
|
|
target="_blank">la documentation</a>.
|
|
|
|
</div>
|
2023-11-08 23:19:58 +01:00
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_path) }}
|
|
|
|
</div>
|
|
|
|
|
2023-11-14 15:55:52 +01:00
|
|
|
<div id="zone-test">
|
|
|
|
Pour essayer, indiquer un <tt>edt_id</tt> :
|
|
|
|
<input type="text" id="test_edt_id" oninput="update_test_button_state()" size="12" />
|
|
|
|
<button id="test_load_ics" type="button" onclick="load_ics_sample()" disabled>
|
|
|
|
Essayer de charger l'ics</button>
|
|
|
|
<div id="raw-ics-sample-zone">
|
2023-12-28 23:05:19 +01:00
|
|
|
<div>Voici un évènement chargé, pris au hasard au milieu de ce calendrier.
|
2023-11-14 19:26:44 +01:00
|
|
|
Utilisez cet exemple pour configurer les expressions d'extraction
|
|
|
|
en bas de ce formulaire.
|
2023-11-14 15:55:52 +01:00
|
|
|
</div>
|
|
|
|
<textarea id="raw-ics-sample" rows="13" cols="90">
|
|
|
|
</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-02 23:05:08 +01:00
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_user_path) }}
|
|
|
|
</div>
|
2023-11-13 15:08:09 +01:00
|
|
|
<div class="config-section">Extraction des identifiants depuis les calendriers</div>
|
|
|
|
<div class="help">
|
|
|
|
Indiquer ici comment récupérer les informations (titre, groupe, module)
|
|
|
|
dans les calendriers publiés par votre logiciel d'emploi du temps.
|
|
|
|
</div>
|
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_title_field) }}
|
|
|
|
{{ wtf.form_field(form.edt_ics_title_regexp) }}
|
|
|
|
</div>
|
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_group_field) }}
|
|
|
|
{{ wtf.form_field(form.edt_ics_group_regexp) }}
|
|
|
|
</div>
|
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_mod_field) }}
|
|
|
|
{{ wtf.form_field(form.edt_ics_mod_regexp) }}
|
|
|
|
</div>
|
2023-12-28 23:05:19 +01:00
|
|
|
<div class="config-edt">
|
|
|
|
{{ wtf.form_field(form.edt_ics_uid_field) }}
|
|
|
|
{{ wtf.form_field(form.edt_ics_uid_regexp) }}
|
|
|
|
</div>
|
2023-11-13 15:08:09 +01:00
|
|
|
|
2023-11-08 23:19:58 +01:00
|
|
|
<div class="form-group">
|
|
|
|
{{ wtf.form_field(form.submit) }}
|
|
|
|
{{ wtf.form_field(form.cancel) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|