1
0
forked from ScoDoc/ScoDoc

Gestion du champ 'boursier'

This commit is contained in:
Emmanuel Viennet 2022-12-07 15:52:50 +01:00
parent 73a380ecb4
commit 3655b21356
8 changed files with 35 additions and 13 deletions

View File

@ -923,9 +923,6 @@ def fill_etuds_info(etuds: list[dict], add_admission=True):
rap += "<em>%s</em>" % etud["commentaire"]
etud["rap"] = rap
# if etud['boursier_prec']:
# pass
if etud.get("telephone"):
etud["telephonestr"] = "<b>Tél.:</b> " + format_telephone(etud["telephone"])
else:

View File

@ -75,6 +75,7 @@ def groups_view(
with_paiement=0, # si vrai, ajoute colonnes infos paiement droits et finalisation inscription (lent car interrogation portail)
with_archives=0, # ajoute colonne avec noms fichiers archivés
with_annotations=0,
with_bourse=0,
formsemestre_id=None, # utilise si aucun groupe selectionné
):
"""Affichage des étudiants des groupes indiqués
@ -98,6 +99,7 @@ def groups_view(
with_paiement=with_paiement,
with_archives=with_archives,
with_annotations=with_annotations,
with_bourse=with_bourse,
)
H = [
@ -137,6 +139,7 @@ def groups_view(
with_paiement=with_paiement,
with_archives=with_archives,
with_annotations=with_annotations,
with_bourse=with_bourse,
),
"</div>",
"""<div class="tab-pane" id="tab-photos">""",
@ -429,6 +432,7 @@ def groups_table(
with_paiement=0, # si vrai, ajoute colonnes infos paiement droits et finalisation inscription (lent car interrogation portail)
with_archives=0, # ajoute colonne avec noms fichiers archivés
with_annotations=0,
with_bourse=0,
):
"""liste etudiants inscrits dans ce semestre
format: csv, json, xml, xls, allxls, xlsappel, moodlecsv, pdf
@ -444,12 +448,14 @@ def groups_table(
with_paiement = int(with_paiement)
with_archives = int(with_archives)
with_annotations = int(with_annotations)
with_bourse = int(with_bourse)
base_url_np = groups_infos.base_url + "&with_codes=%s" % with_codes
base_url_np = groups_infos.base_url + f"&with_codes={with_codes}"
base_url = (
base_url_np
+ "&with_paiement=%s&with_archives=%s&with_annotations=%s"
% (with_paiement, with_archives, with_annotations)
+ f"""&with_paiement={with_paiement}&with_archives={
with_archives}&with_annotations={with_annotations
}&with_bourse={with_bourse}"""
)
#
columns_ids = ["civilite_str", "nom_disp", "prenom"] # colonnes a inclure
@ -467,6 +473,7 @@ def groups_table(
"paiementinscription_str": "Paiement",
"etudarchive": "Fichiers",
"annotations_str": "Annotations",
"bourse_str": "Boursier",
"etape": "Etape",
"semestre_groupe": "Semestre-Groupe", # pour Moodle
}
@ -504,6 +511,8 @@ def groups_table(
if with_annotations:
sco_etud.add_annotations_to_etud_list(groups_infos.members)
columns_ids += ["annotations_str"]
if with_bourse:
columns_ids += ["bourse_str"]
moodle_sem_name = groups_infos.formsemestre["session_id"]
moodle_groupenames = set()
# ajoute liens
@ -524,7 +533,7 @@ def groups_table(
etud["_prenom_target"] = fiche_url
etud["_nom_disp_td_attrs"] = 'id="%s" class="etudinfo"' % (etud["etudid"])
etud["bourse_str"] = "oui" if etud["boursier"] else "non"
if etud["etat"] == "D":
etud["_css_row_class"] = "etuddem"
# et groupes:
@ -625,6 +634,7 @@ def groups_table(
"with_archives": "Fichiers archivés",
"with_annotations": "Annotations",
"with_codes": "Codes",
"with_bourse": "Statut boursier",
}
for option in options:
if locals().get(option, False):
@ -762,6 +772,7 @@ def groups_table(
"codelycee",
"type_admission",
"boursier_prec",
"boursier",
"debouche",
"parcours",
"codeparcours",

View File

@ -446,6 +446,10 @@ def ficheEtud(etudid=None):
else:
info["groupes_row"] = ""
info["menus_etud"] = menus_etud(etudid)
if info["boursier"]:
info["bourse_span"] = """<span class="boursier">boursier</span>"""
else:
info["bourse_span"] = ""
# raccordement provisoire pour juillet 2022, avant refonte complète de cette fiche...
info["but_infos_mkup"] = jury_but_view.infos_fiche_etud_html(etudid)
@ -463,7 +467,7 @@ def ficheEtud(etudid=None):
<div class="fichesituation">
<div class="fichetablesitu">
<table>
<tr><td class="fichetitre2">Situation :</td><td>%(situation)s</td></tr>
<tr><td class="fichetitre2">Situation :</td><td>%(situation)s %(bourse_span)s</td></tr>
%(groupes_row)s
<tr><td class="fichetitre2">%(ne)s le :</td><td>%(info_naissance)s</td></tr>
</table>

View File

@ -787,6 +787,14 @@ td.fichetitre2 {
vertical-align: top;
}
.ficheEtud span.boursier {
background-color: red;
color: white;
margin-left: 12px;
padding: 4px;
border-radius: 12px;
}
td.fichetitre2 .formula {
font-weight: normal;
color: rgb(0, 64, 0);

View File

@ -69,7 +69,7 @@ $().ready(function () {
function change_list_options() {
var url = groups_view_url();
var selected_options = $("#group_list_options").val();
var options = ["with_paiement", "with_archives", "with_annotations", "with_codes"];
var options = ["with_paiement", "with_archives", "with_annotations", "with_codes", "with_bourse"];
for (var i = 0; i < options.length; i++) {
var option = options[i];
delete url.param()[option];

View File

@ -437,7 +437,6 @@ sco_publish(
@bp.route("/groups_view")
@scodoc
@permission_required_compat_scodoc7(Permission.ScoView)
# @permission_required(Permission.ScoView)
@scodoc7func
def groups_view(
group_ids=(),
@ -448,6 +447,7 @@ def groups_view(
with_paiement=0, # si vrai, ajoute colonnes infos paiement droits et finalisation inscription (lent car interrogation portail)
with_archives=0, # ajoute colonne avec noms fichiers archivés
with_annotations=0,
with_bourse=0,
formsemestre_id=None,
):
return sco_groups_view.groups_view(
@ -456,9 +456,10 @@ def groups_view(
# Options pour listes:
with_codes=with_codes,
etat=etat,
with_paiement=with_paiement, # si vrai, ajoute colonnes infos paiement droits et finalisation inscription (lent car interrogation portail)
with_archives=with_archives, # ajoute colonne avec noms fichiers archivés
with_paiement=with_paiement,
with_archives=with_archives,
with_annotations=with_annotations,
with_bourse=with_bourse,
formsemestre_id=formsemestre_id,
)

View File

@ -122,7 +122,7 @@ def test_abs_basic(test_client):
- partition_create
- create_group
- set_group
- EtatAbsenceGr
- EtatAbsencesGr
- AddBilletAbsence
- billets_etud
"""

View File

@ -28,6 +28,7 @@ anglais; real; admissions; 1; note de anglais en terminale
francais; real; admissions; 1; note de francais au bac
type_admission; text; admissions; 1; voie d'admission (APB, APB-PC, CEF, ...)
boursier_prec; integer; admissions; 1; 0/1 etait boursier dans le cycle precedent (lycee) ?
boursier; integer; identite; 1; 0/1 est actuellement boursier
qualite; real; admissions; 1; note de qualite du dossier
rapporteur; text; admissions; 1; identite du rapporteur (enseignant IUT)
decision; text; admissions; 1; decision (admis, attente, ...)