Assiduité : fix bug module selector signal_assiduites_group

This commit is contained in:
Iziram 2024-02-29 08:47:03 +01:00
parent e56cbfc5a2
commit 21b2e0f582
2 changed files with 28 additions and 29 deletions

View File

@ -1,23 +1,23 @@
{% extends "sco_page.j2" %}
{% block title %}
{{title}}
{{title}}
{% endblock title %}
{% block scripts %}
{{ 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>
{{ 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>
<script>
<script>
{% if readonly != "false" %}
function getPeriodValues(){
function getPeriodValues() {
return [0, 23]
}
{% endif %}
@ -30,9 +30,9 @@
setupDate();
updateDate();
if (!readOnly){
setupTimeLine(()=>{
generateAllEtudRow();
if (!readOnly) {
setupTimeLine(() => {
generateAllEtudRow();
});
}
@ -63,16 +63,16 @@
}
});
}
</script>
</script>
{% endblock scripts %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap/css/bootstrap.min.css">
<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">
{{ super() }}
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap/css/bootstrap.min.css">
<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">
{% endblock styles %}
@ -80,7 +80,11 @@
{% include "assiduites/widgets/toast.j2" %}
{{ minitimeline|safe }}
<style>
#moduleimpl_select {
max-width: 200px;
}
</style>
<section id="content">
<div class="no-display">
@ -102,8 +106,7 @@
<div class="infos-button">Groupes&nbsp;: {{grp|safe}}</div>
<div class="infos-button" style="margin-left: 24px;">Date&nbsp;: <span style="margin-left: 8px;"
id="datestr"></span>
<input type="text" name="tl_date" id="tl_date" value="{{ date }}"
onchange="updateDate()">
<input type="text" name="tl_date" id="tl_date" value="{{ date }}" onchange="updateDate()">
</div>
</div>
</fieldset>
@ -162,4 +165,4 @@
</section>
{% endblock app_content %}
{% endblock app_content %}

View File

@ -2181,12 +2181,8 @@ def _module_selector(formsemestre: FormSemestre, moduleimpl_id: int = None) -> s
"""
# récupération des ues du semestre
ntc: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre)
ues = ntc.get_ues_stat_dict()
modimpls_list: list[dict] = []
for ue in ues:
# Ajout des moduleimpl de chaque ue dans la liste des moduleimpls
modimpls_list += ntc.get_modimpls_dict(ue_id=ue["ue_id"])
modimpls_list: list[dict] = ntc.get_modimpls_dict()
# prévoie la sélection par défaut d'un moduleimpl s'il a été passé en paramètre
selected = "" if moduleimpl_id is not None else "selected"