forked from ScoDoc/ScoDoc
Merge pull request 'nosex' (#66) from nosex into master
Reviewed-on: https://scodoc.org/git/viennet/ScoDoc/pulls/66
This commit is contained in:
commit
a50a9eb8e8
@ -368,16 +368,16 @@ def scolars_import_excel_file(
|
||||
# xxx Ad-hoc checks (should be in format description)
|
||||
if scu.strlower(titleslist[i]) == "sexe":
|
||||
try:
|
||||
val = scolars.normalize_sexe(val)
|
||||
val = scolars.input_civilite(val)
|
||||
except:
|
||||
raise ScoValueError(
|
||||
"valeur invalide pour 'SEXE' (doit etre 'M' ou 'MME' ou 'H' ou 'F', pas '%s') ligne %d, colonne %s"
|
||||
"valeur invalide pour 'SEXE' (doit etre 'M', 'F', ou 'MME', 'H', 'X' ou vide, mais pas '%s') ligne %d, colonne %s"
|
||||
% (val, linenum, titleslist[i])
|
||||
)
|
||||
# Excel date conversion:
|
||||
if scu.strlower(titleslist[i]) == "date_naissance":
|
||||
if val:
|
||||
if re.match("^[0-9]*\.?[0-9]*$", str(val)):
|
||||
if re.match(r"^[0-9]*\.?[0-9]*$", str(val)):
|
||||
val = sco_excel.xldate_as_datetime(float(val))
|
||||
# INE
|
||||
if (
|
||||
@ -515,11 +515,11 @@ def _import_one_student(
|
||||
# Admissions
|
||||
args["etudid"] = etudid
|
||||
args["annee"] = annee_courante
|
||||
adm_id = scolars.admission_create(cnx, args)
|
||||
_ = scolars.admission_create(cnx, args)
|
||||
# Adresse
|
||||
args["typeadresse"] = "domicile"
|
||||
args["description"] = "(infos admission)"
|
||||
adresse_id = scolars.adresse_create(cnx, args)
|
||||
_ = scolars.adresse_create(cnx, args)
|
||||
# Inscription au semestre
|
||||
args["etat"] = "I" # etat insc. semestre
|
||||
if formsemestre_id:
|
||||
|
@ -1,19 +1,21 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "7.22"
|
||||
SCOVERSION = "7.23"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
SCONEWS = """
|
||||
<h4>Année 2021</h4>
|
||||
<ul>
|
||||
<li>Modernisation du code Python.</li>
|
||||
<li>Gestion du genre neutre (pas d'affichage de la civilité)</li>
|
||||
<li>Diverses corrections (PV de jurys, ...)</li>
|
||||
<li>Modernisation du code Python</li>
|
||||
</ul>
|
||||
<h4>Année 2020</h4>
|
||||
<ul>
|
||||
<li>Corrections d'erreurs, améliorations saise absences< et affichage bulletins</li>
|
||||
<li>Nouveau site <a href="https://scodoc.org">scodoc.org</a> pour la documentation.</li>
|
||||
<li>Nouveau site <a href="https://scodoc.org">scodoc.org</a> pour la documentation</li>
|
||||
<li>Enregistrement de semestres extérieurs</li>
|
||||
<li>Améliorations PV de Jury</li>
|
||||
<li>Contributions J.-M. Place: aide au diagnostic problèmes export Apogée
|
||||
|
18
ZScolar.py
18
ZScolar.py
@ -99,7 +99,7 @@ import sco_formations
|
||||
from scolars import (
|
||||
format_nom,
|
||||
format_prenom,
|
||||
format_sexe,
|
||||
format_civilite,
|
||||
format_lycee,
|
||||
format_lycee_from_code,
|
||||
)
|
||||
@ -916,7 +916,8 @@ REQUEST.URL0=%s<br/>
|
||||
"nom": "?",
|
||||
"nom_usuel": "",
|
||||
"prenom": "?",
|
||||
"sexe": "?",
|
||||
"civilite": "?",
|
||||
"sexe": "?", # for backward compat
|
||||
"email": "?",
|
||||
"emailperso": "",
|
||||
"error": "code etudiant inconnu",
|
||||
@ -935,7 +936,6 @@ REQUEST.URL0=%s<br/>
|
||||
"nom",
|
||||
"nom_usuel",
|
||||
"prenom",
|
||||
"sexe",
|
||||
"nomprenom",
|
||||
"email",
|
||||
"emailperso",
|
||||
@ -956,6 +956,10 @@ REQUEST.URL0=%s<br/>
|
||||
"date_naissance_iso",
|
||||
):
|
||||
d[a] = scu.quote_xml_attr(etud[a])
|
||||
d["civilite"] = scu.quote_xml_attr(
|
||||
etud["civilite_str"]
|
||||
) # exception: ne sort pas la civilite brute
|
||||
d["sexe"] = d["civilite"] # backward compat pour anciens clients
|
||||
d["photo_url"] = scu.quote_xml_attr(sco_photos.etud_photo_url(self, etud))
|
||||
|
||||
sem = etud["cursem"]
|
||||
@ -1750,12 +1754,12 @@ REQUEST.URL0=%s<br/>
|
||||
},
|
||||
),
|
||||
(
|
||||
"sexe",
|
||||
"civilite",
|
||||
{
|
||||
"input_type": "menu",
|
||||
"labels": ["H", "F"],
|
||||
"allowed_values": ["MR", "MME"],
|
||||
"title": "Genre",
|
||||
"labels": ["Homme", "Femme", "Autre/neutre"],
|
||||
"allowed_values": ["M", "F", "X"],
|
||||
"title": "Civilité",
|
||||
},
|
||||
),
|
||||
(
|
||||
|
@ -1070,6 +1070,21 @@ for dept in get_depts():
|
||||
"etape",
|
||||
["alter table notes_formsemestre_inscription add column etape text"],
|
||||
)
|
||||
# Migre identite.sexe vers identite.civilite: normalise valeurs: M, F, X
|
||||
check_field(
|
||||
cnx,
|
||||
"identite",
|
||||
"civilite",
|
||||
[
|
||||
"UPDATE identite set sexe='M' where upper(sexe) = 'M' or upper(sexe) = 'M.' or upper(sexe) = 'MR' or upper(sexe) = 'H'",
|
||||
"UPDATE identite set sexe='F' where upper(sexe) = 'F' or upper(sexe) = 'MME' or upper(sexe) = 'MLLE' or upper(sexe) = 'MELLE' or upper(sexe) = 'MLLE.' or upper(sexe) = 'F'",
|
||||
"UPDATE identite set sexe='X' where sexe is NULL",
|
||||
"ALTER TABLE identite RENAME COLUMN sexe TO civilite",
|
||||
"ALTER TABLE identite ALTER COLUMN civilite SET NOT NULL",
|
||||
"ALTER TABLE identite ADD CONSTRAINT civchk CHECK (civilite IN ('M', 'F', 'X'))",
|
||||
],
|
||||
)
|
||||
|
||||
# Add here actions to performs after upgrades:
|
||||
cnx.commit()
|
||||
cnx.close()
|
||||
|
@ -103,7 +103,7 @@ def sidebar(context, REQUEST=None):
|
||||
# compte les absences du semestre en cours
|
||||
H.append(
|
||||
"""<h2 id="insidebar-etud"><a href="%(ScoURL)s/ficheEtud?etudid=%(etudid)s" class="sidebar">
|
||||
<font color="#FF0000">%(sexe)s %(nom_disp)s</font></a>
|
||||
<font color="#FF0000">%(civilite_str)s %(nom_disp)s</font></a>
|
||||
</h2>
|
||||
<b>Absences</b>"""
|
||||
% params
|
||||
|
@ -49,7 +49,7 @@ CREATE TABLE identite (
|
||||
etudid text DEFAULT notes_newid_etud('EID'::text) UNIQUE NOT NULL,
|
||||
nom text,
|
||||
prenom text,
|
||||
sexe text,
|
||||
civilite text NOT NULL CHECK (civilite IN ('M', 'F', 'X')),
|
||||
date_naissance date, -- new: date en texte
|
||||
lieu_naissance text,
|
||||
dept_naissance text,
|
||||
|
@ -8,7 +8,7 @@ Code_INE; text; identite; 1; code INE;INE
|
||||
nom; text; identite; 0; nom de l'etudiant;
|
||||
nom_usuel; text; identite; 1; nom usuel (si different);
|
||||
prenom; text; identite; 0; prenom de l'etudiant
|
||||
sexe (H ou F); text; identite; 0; sexe ('H' ou 'F');sexe;genre
|
||||
civilite; text; identite; 1; sexe ('M', 'F', 'X');sexe;genre
|
||||
date_naissance;text;identite; 1; date de naissance (jj/mm/aaaa)
|
||||
lieu_naissance;text;identite; 1; lieu de naissance
|
||||
nationalite; text; identite; 1; nationalite
|
||||
|
@ -372,7 +372,9 @@ class NotesTable:
|
||||
def get_sexnom(self, etudid):
|
||||
"M. DUPONT"
|
||||
etud = self.identdict[etudid]
|
||||
return etud["sexe"] + " " + scu.strupper(etud["nom_usuel"] or etud["nom"])
|
||||
return (
|
||||
etud["civilite_str"] + " " + scu.strupper(etud["nom_usuel"] or etud["nom"])
|
||||
)
|
||||
|
||||
def get_nom_short(self, etudid):
|
||||
"formatte nom d'un etud (pour table recap)"
|
||||
@ -391,13 +393,7 @@ class NotesTable:
|
||||
def get_nom_long(self, etudid):
|
||||
"formatte nom d'un etud: M. Pierre DUPONT"
|
||||
etud = self.identdict[etudid]
|
||||
return " ".join(
|
||||
[
|
||||
scolars.format_sexe(etud["sexe"]),
|
||||
scolars.format_prenom(etud["prenom"]),
|
||||
scolars.format_nom(etud["nom_usuel"] or etud["nom"]),
|
||||
]
|
||||
)
|
||||
return scolars.format_nomprenom(etud)
|
||||
|
||||
def get_displayed_etud_code(self, etudid):
|
||||
'code à afficher sur les listings "anonymes"'
|
||||
|
@ -213,7 +213,7 @@ def get_code_latex_avis_etudiant(
|
||||
elif tag_latex == u"bilanParTag":
|
||||
valeur = get_bilanParTag(donnees_etudiant)
|
||||
|
||||
# Les tags "simples": par ex. nom, prenom, sexe, ...
|
||||
# Les tags "simples": par ex. nom, prenom, civilite, ...
|
||||
else:
|
||||
if tag_latex in donnees_etudiant:
|
||||
valeur = donnees_etudiant[tag_latex].decode(scu.SCO_ENCODING)
|
||||
@ -410,7 +410,7 @@ def get_avis_poursuite_par_etudiant(
|
||||
if pe_tools.PE_DEBUG:
|
||||
pe_tools.pe_print(jury.syntheseJury[etudid]["nom"] + " " + etudid)
|
||||
|
||||
sexe = jury.syntheseJury[etudid]["sexe"].decode(scu.SCO_ENCODING)
|
||||
civilite_str = jury.syntheseJury[etudid]["civilite_str"].decode(scu.SCO_ENCODING)
|
||||
nom = jury.syntheseJury[etudid]["nom"].replace(" ", "-").decode(scu.SCO_ENCODING)
|
||||
prenom = (
|
||||
jury.syntheseJury[etudid]["prenom"].replace(" ", "-").decode(scu.SCO_ENCODING)
|
||||
@ -429,7 +429,9 @@ def get_avis_poursuite_par_etudiant(
|
||||
|
||||
# Entete (commentaire)
|
||||
|
||||
contenu_latex = u"%% ---- Etudiant: " + sexe + " " + nom + " " + prenom + u"\n"
|
||||
contenu_latex = (
|
||||
u"%% ---- Etudiant: " + civilite_str + " " + nom + " " + prenom + u"\n"
|
||||
)
|
||||
|
||||
# les annnotations
|
||||
annotationPE = get_annotation_PE(
|
||||
@ -502,7 +504,7 @@ def table_syntheseAnnotationPE(context, syntheseJury, tag_annotation_pe):
|
||||
[syntheseJury[etudid]["nbSemestres"] for etudid in etudids]
|
||||
) # le nombre de semestre le + grand
|
||||
|
||||
infos = ["sexe", "nom", "prenom", "age", "nbSemestres"]
|
||||
infos = ["civilite", "nom", "prenom", "age", "nbSemestres"]
|
||||
entete = ["etudid"]
|
||||
entete.extend(infos)
|
||||
entete.extend(["P%d" % i for i in range(1, maxParcours + 1)]) # ajout du parcours
|
||||
@ -518,7 +520,7 @@ def table_syntheseAnnotationPE(context, syntheseJury, tag_annotation_pe):
|
||||
# Les info générales:
|
||||
row = {
|
||||
"etudid": etudid,
|
||||
"sexe": e["sexe"],
|
||||
"civilite": e["civilite"],
|
||||
"nom": e["nom"],
|
||||
"prenom": e["prenom"],
|
||||
"age": e["age"],
|
||||
|
@ -85,7 +85,7 @@ class JuryPE:
|
||||
- context : le contexte Zope
|
||||
- juryEtudDict : dictionnaire récapitulant les étudiants participant au jury PE (données administratives +
|
||||
celles des semestres valides à prendre en compte permettant le calcul des moyennes ...
|
||||
{'etudid : { 'nom', 'prenom', 'sexe', 'diplome', '', }}
|
||||
{'etudid : { 'nom', 'prenom', 'civilite', 'diplome', '', }}
|
||||
Rq: il contient à la fois les étudiants qui vont être diplomés à la date prévue
|
||||
et ceux qui sont éliminés (abandon, redoublement, ...) pour affichage alternatif
|
||||
|
||||
@ -812,7 +812,7 @@ class JuryPE:
|
||||
self.syntheseJury[etudid] = {
|
||||
"nom": etudinfo["nom"],
|
||||
"prenom": etudinfo["prenom"],
|
||||
"sexe": etudinfo["sexe"],
|
||||
"civilite": etudinfo["civilite"],
|
||||
"age": str(pe_tools.calcul_age(etudinfo["date_naissance"])),
|
||||
"lycee": etudinfo["nomlycee"]
|
||||
+ (
|
||||
@ -985,7 +985,7 @@ class JuryPE:
|
||||
[self.syntheseJury[etudid]["nbSemestres"] for etudid in etudids]
|
||||
)
|
||||
|
||||
infos = ["sexe", "nom", "prenom", "age", "nbSemestres"]
|
||||
infos = ["civilite", "nom", "prenom", "age", "nbSemestres"]
|
||||
entete = ["etudid"]
|
||||
entete.extend(infos)
|
||||
entete.extend(["P%d" % i for i in range(1, maxParcours + 1)])
|
||||
@ -1036,7 +1036,7 @@ class JuryPE:
|
||||
# Les info générales:
|
||||
row = {
|
||||
"etudid": etudid,
|
||||
"sexe": e["sexe"],
|
||||
"civilite": e["civilite"],
|
||||
"nom": e["nom"],
|
||||
"prenom": e["prenom"],
|
||||
"age": e["age"],
|
||||
|
@ -217,7 +217,7 @@ JURY_SYNTHESE_POUR_DEBUG = {
|
||||
"EID1810": {
|
||||
"nom": "ROUX",
|
||||
"entree": "2016",
|
||||
"sexe": "M.",
|
||||
"civilite_str": "M.",
|
||||
"promo": 2016,
|
||||
"S2": {
|
||||
"groupe": {
|
||||
|
@ -124,14 +124,14 @@ def formsemestre_bulletinetud_published_dict(
|
||||
code_ine=etudinfo["code_ine"],
|
||||
nom=scu.quote_xml_attr(etudinfo["nom"]),
|
||||
prenom=scu.quote_xml_attr(etudinfo["prenom"]),
|
||||
sexe=scu.quote_xml_attr(etudinfo["sexe"]),
|
||||
civilite=scu.quote_xml_attr(etudinfo["civilite_str"]),
|
||||
photo_url=scu.quote_xml_attr(
|
||||
sco_photos.etud_photo_url(context, etudinfo, fast=True)
|
||||
),
|
||||
email=scu.quote_xml_attr(etudinfo["email"]),
|
||||
emailperso=scu.quote_xml_attr(etudinfo["emailperso"]),
|
||||
)
|
||||
|
||||
d["etudiant"]["sexe"] = d["etudiant"]["civilite"] # backward compat for our clients
|
||||
# Disponible pour publication ?
|
||||
if not published:
|
||||
return d # stop !
|
||||
|
@ -107,7 +107,8 @@ def make_xml_formsemestre_bulletinetud(
|
||||
code_ine=etudinfo["code_ine"],
|
||||
nom=scu.quote_xml_attr(etudinfo["nom"]),
|
||||
prenom=scu.quote_xml_attr(etudinfo["prenom"]),
|
||||
sexe=scu.quote_xml_attr(etudinfo["sexe"]),
|
||||
civilite=scu.quote_xml_attr(etudinfo["civilite_str"]),
|
||||
sexe=scu.quote_xml_attr(etudinfo["civilite_str"]), # compat
|
||||
photo_url=scu.quote_xml_attr(sco_photos.etud_photo_url(context, etudinfo)),
|
||||
email=scu.quote_xml_attr(etudinfo["email"]),
|
||||
emailperso=scu.quote_xml_attr(etudinfo["emailperso"]),
|
||||
|
@ -115,7 +115,7 @@ def table_debouche_etudids(context, etudids, keep_numeric=True):
|
||||
)
|
||||
row = {
|
||||
"etudid": etudid,
|
||||
"sexe": etud["sexe"],
|
||||
"civilite": etud["civilite"],
|
||||
"nom": etud["nom"],
|
||||
"prenom": etud["prenom"],
|
||||
"_nom_target": "ficheEtud?etudid=" + etud["etudid"],
|
||||
@ -154,7 +154,7 @@ def table_debouche_etudids(context, etudids, keep_numeric=True):
|
||||
L.sort(key=lambda x: x["sem_ident"])
|
||||
|
||||
titles = {
|
||||
"sexe": "",
|
||||
"civilite": "",
|
||||
"nom": "Nom",
|
||||
"prenom": "Prénom",
|
||||
"semestre": "Dernier semestre",
|
||||
@ -170,7 +170,7 @@ def table_debouche_etudids(context, etudids, keep_numeric=True):
|
||||
"semestre",
|
||||
"semestre_id",
|
||||
"periode",
|
||||
"sexe",
|
||||
"civilite",
|
||||
"nom",
|
||||
"prenom",
|
||||
"moy",
|
||||
|
@ -616,7 +616,7 @@ def Excel_feuille_listeappel(
|
||||
li += 1
|
||||
ws0.write(li, 0, n, style1b)
|
||||
nomprenom = (
|
||||
t["sexe"]
|
||||
t["civilite_str"]
|
||||
+ " "
|
||||
+ t["nom"]
|
||||
+ " "
|
||||
|
@ -122,7 +122,7 @@ def _build_results_list(context, dpv_by_sem, etuds_infos):
|
||||
"code_nip": "NIP",
|
||||
"nom": "Nom",
|
||||
"prenom": "Prénom",
|
||||
"sexe": "Civ.",
|
||||
"civilite_str": "Civ.",
|
||||
"nom_usuel": "Nom usuel",
|
||||
"bac": "Bac",
|
||||
"parcours": "Parcours",
|
||||
@ -133,7 +133,7 @@ def _build_results_list(context, dpv_by_sem, etuds_infos):
|
||||
"periode",
|
||||
"sid",
|
||||
"code_nip",
|
||||
"sexe",
|
||||
"civilite_str",
|
||||
"nom",
|
||||
# 'nom_usuel', # inutile ?
|
||||
"prenom",
|
||||
@ -171,7 +171,7 @@ def _build_results_list(context, dpv_by_sem, etuds_infos):
|
||||
"nom": etud["nom"],
|
||||
"nom_usuel": etud["nom_usuel"],
|
||||
"prenom": etud["prenom"],
|
||||
"sexe": etud["sexe"],
|
||||
"civilite_str": etud["civilite_str"],
|
||||
"_nom_target": "%s/ficheEtud?etudid=%s" % (context.ScoURL(), etudid),
|
||||
"_nom_td_attrs": 'id="%s" class="etudinfo"' % etudid,
|
||||
"bac": bac.abbrev(),
|
||||
|
@ -384,7 +384,7 @@ def search_inscr_etud_by_nip(context, code_nip, REQUEST=None, format="json"):
|
||||
Seuls les départements accessibles par l'utilisateur sont cherchés.
|
||||
|
||||
Renvoie une liste des inscriptions de l'étudiants dans tout ScoDoc:
|
||||
code_nip, nom, prenom, sexe, dept, formsemestre_id, date_debut_sem, date_fin_sem
|
||||
code_nip, nom, prenom, civilite_str, dept, formsemestre_id, date_debut_sem, date_fin_sem
|
||||
"""
|
||||
result, _ = search_etud_in_accessible_depts(
|
||||
context, code_nip=code_nip, REQUEST=REQUEST
|
||||
@ -401,7 +401,7 @@ def search_inscr_etud_by_nip(context, code_nip, REQUEST=None, format="json"):
|
||||
"dept": DeptId,
|
||||
"etudid": e["etudid"],
|
||||
"code_nip": e["code_nip"],
|
||||
"sexe": e["sexe"],
|
||||
"civilite_str": e["civilite_str"],
|
||||
"nom": e["nom"],
|
||||
"prenom": e["prenom"],
|
||||
"formsemestre_id": sem["formsemestre_id"],
|
||||
@ -414,7 +414,7 @@ def search_inscr_etud_by_nip(context, code_nip, REQUEST=None, format="json"):
|
||||
"dept",
|
||||
"etudid",
|
||||
"code_nip",
|
||||
"sexe",
|
||||
"civilite_str",
|
||||
"nom",
|
||||
"prenom",
|
||||
"formsemestre_id",
|
||||
|
@ -473,7 +473,8 @@ def XMLgetGroupsInPartition(context, partition_id, REQUEST=None): # was XMLgetG
|
||||
doc._push()
|
||||
doc.etud(
|
||||
etudid=e["etudid"],
|
||||
sexe=scolars.format_sexe(etud["sexe"]),
|
||||
civilite=etud["civilite_str"],
|
||||
sexe=etud["civilite_str"], # compat
|
||||
nom=scolars.format_nom(etud["nom"]),
|
||||
prenom=scolars.format_prenom(etud["prenom"]),
|
||||
origin=comp_origin(etud, sem),
|
||||
@ -497,7 +498,7 @@ def XMLgetGroupsInPartition(context, partition_id, REQUEST=None): # was XMLgetG
|
||||
doc._push()
|
||||
doc.etud(
|
||||
etudid=etud["etudid"],
|
||||
sexe=scolars.format_sexe(etud["sexe"]),
|
||||
sexe=etud["civilite_str"],
|
||||
nom=scolars.format_nom(etud["nom"]),
|
||||
prenom=scolars.format_prenom(etud["prenom"]),
|
||||
origin=comp_origin(etud, sem),
|
||||
@ -1255,26 +1256,26 @@ def groups_auto_repartition(context, partition_id=None, REQUEST=None):
|
||||
context.Notes, formsemestre_id
|
||||
) # > identdict
|
||||
identdict = nt.identdict
|
||||
# build: { sexe : liste etudids trie par niveau croissant }
|
||||
sexes = sets.Set([x["sexe"] for x in identdict.values()])
|
||||
# build: { civilite : liste etudids trie par niveau croissant }
|
||||
civilites = sets.Set([x["civilite"] for x in identdict.values()])
|
||||
listes = {}
|
||||
for sexe in sexes:
|
||||
listes[sexe] = [
|
||||
for civilite in civilites:
|
||||
listes[civilite] = [
|
||||
(get_prev_moy(context.Notes, x["etudid"], formsemestre_id), x["etudid"])
|
||||
for x in identdict.values()
|
||||
if x["sexe"] == sexe
|
||||
if x["civilite"] == civilite
|
||||
]
|
||||
listes[sexe].sort()
|
||||
log("listes[%s] = %s" % (sexe, listes[sexe]))
|
||||
listes[civilite].sort()
|
||||
log("listes[%s] = %s" % (civilite, listes[civilite]))
|
||||
# affect aux groupes:
|
||||
n = len(identdict)
|
||||
igroup = 0
|
||||
nbgroups = len(group_ids)
|
||||
while n > 0:
|
||||
for sexe in sexes:
|
||||
if len(listes[sexe]):
|
||||
for civilite in civilites:
|
||||
if len(listes[civilite]):
|
||||
n -= 1
|
||||
etudid = listes[sexe].pop()[1]
|
||||
etudid = listes[civilite].pop()[1]
|
||||
group_id = group_ids[igroup]
|
||||
igroup = (igroup + 1) % nbgroups
|
||||
change_etud_group_in_partition(
|
||||
|
@ -464,8 +464,9 @@ def groups_table(
|
||||
% (with_paiement, with_archives, with_annotations)
|
||||
)
|
||||
#
|
||||
columns_ids = ["nom_disp", "prenom"] # colonnes a inclure
|
||||
columns_ids = ["civilite_str", "nom_disp", "prenom"] # colonnes a inclure
|
||||
titles = {
|
||||
"civilite_str": "Civ.",
|
||||
"nom_disp": "Nom",
|
||||
"prenom": "Prénom",
|
||||
"email": "Mail",
|
||||
@ -733,7 +734,7 @@ def groups_table(
|
||||
"etudid",
|
||||
"code_nip",
|
||||
"etat",
|
||||
"sexe",
|
||||
"civilite_str",
|
||||
"nom",
|
||||
"nom_usuel",
|
||||
"prenom",
|
||||
|
@ -611,7 +611,7 @@ def etuds_select_boxes(
|
||||
def etuds_select_box_xls(context, src_cat):
|
||||
"export a box to excel"
|
||||
etuds = src_cat["etuds"]
|
||||
columns_ids = ["etudid", "sexe", "nom", "prenom", "etape"]
|
||||
columns_ids = ["etudid", "civilite_str", "nom", "prenom", "etape"]
|
||||
titles = {x: x for x in columns_ids}
|
||||
|
||||
# Ajoute colonne paiement inscription
|
||||
|
@ -128,7 +128,7 @@ def _table_etuds_lycees(
|
||||
else:
|
||||
L = etuds
|
||||
columns_ids = (
|
||||
"sexe",
|
||||
"civilite_str",
|
||||
"nom",
|
||||
"prenom",
|
||||
"codelycee",
|
||||
@ -148,7 +148,7 @@ def _table_etuds_lycees(
|
||||
rows=L,
|
||||
titles={
|
||||
"nbetuds": "Nb d'étudiants",
|
||||
"sexe": "",
|
||||
"civilite_str": "",
|
||||
"nom": "Nom",
|
||||
"prenom": "Prénom",
|
||||
"etudid": "etudid",
|
||||
|
@ -44,7 +44,7 @@ import VERSION
|
||||
def etud_get_poursuite_info(context, sem, etud):
|
||||
"""{ 'nom' : ..., 'semlist' : [ { 'semestre_id': , 'moy' : ... }, {}, ...] }"""
|
||||
I = {}
|
||||
I.update(etud) # copie nom, prenom, sexe, ...
|
||||
I.update(etud) # copie nom, prenom, civilite, ...
|
||||
|
||||
# Now add each semester, starting from the first one
|
||||
semlist = []
|
||||
@ -174,7 +174,7 @@ def formsemestre_poursuite_report(
|
||||
infos.append(info)
|
||||
#
|
||||
column_ids = (
|
||||
("sexe", "nom", "prenom", "annee", "date_naissance")
|
||||
("civilite_str", "nom", "prenom", "annee", "date_naissance")
|
||||
+ tuple(ids)
|
||||
+ ("debouche",)
|
||||
)
|
||||
|
@ -37,7 +37,7 @@ import sco_excel
|
||||
import sco_formsemestre
|
||||
import sco_parcours_dut
|
||||
import sco_codes_parcours
|
||||
from scolars import format_nom, format_prenom, format_sexe, format_lycee
|
||||
from scolars import format_nom, format_prenom, format_civilite, format_lycee
|
||||
from sco_abs import getAbsSemEtud
|
||||
import VERSION
|
||||
|
||||
@ -229,7 +229,7 @@ def feuille_preparation_jury(context, formsemestre_id, REQUEST):
|
||||
l.append(etud["code_ine"])
|
||||
l += [
|
||||
etudid,
|
||||
format_sexe(etud["sexe"]),
|
||||
etud["civilite_str"],
|
||||
format_nom(etud["nom"]),
|
||||
format_prenom(etud["prenom"]),
|
||||
etud["date_naissance"],
|
||||
|
@ -27,10 +27,13 @@
|
||||
|
||||
"""Edition des PV de jury
|
||||
"""
|
||||
import time
|
||||
from reportlab.platypus import Paragraph
|
||||
from reportlab.lib import styles
|
||||
|
||||
import sco_utils as scu
|
||||
import notesdb as ndb
|
||||
|
||||
from notes_log import log
|
||||
import scolars
|
||||
import sco_formsemestre
|
||||
import sco_groups
|
||||
@ -42,7 +45,8 @@ import sco_excel
|
||||
from TrivialFormulator import TrivialFormulator
|
||||
from gen_tables import GenTable
|
||||
import sco_pvpdf
|
||||
from sco_pdf import *
|
||||
import sco_pdf
|
||||
from sco_pdf import PDFLOCK
|
||||
|
||||
"""PV Jury IUTV 2006: on détaillait 8 cas:
|
||||
Jury de semestre n
|
||||
@ -75,7 +79,7 @@ def _descr_decisions_ues(context, nt, etudid, decisions_ue, decision_sem):
|
||||
if decisions_ue[ue_id] and (
|
||||
decisions_ue[ue_id]["code"] == sco_codes_parcours.ADM
|
||||
or (
|
||||
CONFIG.CAPITALIZE_ALL_UES
|
||||
scu.CONFIG.CAPITALIZE_ALL_UES
|
||||
and sco_codes_parcours.code_semestre_validant(decision_sem["code"])
|
||||
)
|
||||
):
|
||||
@ -414,9 +418,11 @@ def pvjury_table(
|
||||
if context.get_preference("bul_show_ects", formsemestre_id):
|
||||
columns_ids += ["ects"]
|
||||
|
||||
# if dpv['semestre_non_terminal']:
|
||||
# dec 2017: indique toujours le devenir ("diplôme obtenu" ou semestre suivant)
|
||||
columns_ids += ["validation_parcours_code", "devenir"]
|
||||
# XXX if not dpv["semestre_non_terminal"]:
|
||||
# La colonne doit être présente: redoublants validant leur diplome
|
||||
# en répétant un semestre ancien: exemple: S1 (ADM), S2 (ADM), S3 (AJ), S4 (ADM), S3 (ADM)=> diplôme
|
||||
columns_ids += ["validation_parcours_code"]
|
||||
columns_ids += ["devenir"]
|
||||
columns_ids += ["observations"]
|
||||
|
||||
lines = []
|
||||
@ -434,7 +440,7 @@ def pvjury_table(
|
||||
context, e["etat"], e["decision_sem"]
|
||||
),
|
||||
"ue_cap": e["decisions_ue_descr"],
|
||||
"validation_parcours_code": "ADM" if e["validation_parcours"] else "AJ",
|
||||
"validation_parcours_code": "ADM" if e["validation_parcours"] else "",
|
||||
"devenir": e["autorisations_descr"],
|
||||
"observations": ndb.unquote(e["observation"]),
|
||||
"mention": e["mention"],
|
||||
@ -451,10 +457,10 @@ def pvjury_table(
|
||||
) # vertical space
|
||||
i = e["identite"]
|
||||
l["nomprenom"] = [
|
||||
Paragraph(SU(i["nomprenom"]), cell_style),
|
||||
Paragraph(SU(i["code_nip"]), cell_style),
|
||||
Paragraph(sco_pdf.SU(i["nomprenom"]), cell_style),
|
||||
Paragraph(sco_pdf.SU(i["code_nip"]), cell_style),
|
||||
Paragraph(
|
||||
SU(
|
||||
sco_pdf.SU(
|
||||
"Né le %s" % i["date_naissance"]
|
||||
+ (" à %s" % i["lieu_naissance"] if i["lieu_naissance"] else "")
|
||||
+ (" (%s)" % i["dept_naissance"] if i["dept_naissance"] else "")
|
||||
@ -516,7 +522,9 @@ def formsemestre_pvjury(
|
||||
titles=titles,
|
||||
columns_ids=columns_ids,
|
||||
filename=scu.make_filename("decisions " + sem["titreannee"]),
|
||||
origin="Généré par %s le " % VERSION.SCONAME + scu.timedate_human_repr() + "",
|
||||
origin="Généré par %s le " % scu.VERSION.SCONAME
|
||||
+ scu.timedate_human_repr()
|
||||
+ "",
|
||||
caption="Décisions jury pour " + sem["titreannee"],
|
||||
html_class="table_leftalign",
|
||||
html_sortable=True,
|
||||
@ -844,7 +852,6 @@ def formsemestre_lettres_individuelles(
|
||||
else:
|
||||
# submit
|
||||
sf = tf[2]["signature"]
|
||||
# pdb.set_trace()
|
||||
signature = sf.read() # image of signature
|
||||
try:
|
||||
PDFLOCK.acquire()
|
||||
|
@ -33,6 +33,7 @@ import jaxml
|
||||
|
||||
import sco_utils as scu
|
||||
from notes_log import log
|
||||
import scolars
|
||||
import sco_bulletins, sco_excel
|
||||
import sco_groups
|
||||
import sco_evaluations
|
||||
@ -234,6 +235,7 @@ def make_formsemestre_recapcomplet(
|
||||
pour tous les étudiants, les moyennes par UE et générale,
|
||||
trié par moyenne générale décroissante.
|
||||
"""
|
||||
civ_nom_prenom = False # 3 colonnes différentes ou une seule avec prénom abrégé ?
|
||||
if format == "xml":
|
||||
return _formsemestre_recapcomplet_xml(
|
||||
context,
|
||||
@ -251,6 +253,7 @@ def make_formsemestre_recapcomplet(
|
||||
force_publishing=force_publishing,
|
||||
)
|
||||
if format[:3] == "xls":
|
||||
civ_nom_prenom = True # 3 cols: civilite, nom, prenom
|
||||
keep_numeric = True # pas de conversion des notes en strings
|
||||
else:
|
||||
keep_numeric = False
|
||||
@ -270,7 +273,7 @@ def make_formsemestre_recapcomplet(
|
||||
)[0]
|
||||
nt = context._getNotesCache().get_NotesTable(
|
||||
context, formsemestre_id
|
||||
) # > get_modimpls, get_ues, get_table_moyennes_triees, get_etud_decision_sem, get_etud_etat, get_etud_rang, get_nom_short, get_mod_stats, nt.moy_moy, get_nom_long, get_etud_decision_sem,
|
||||
) # > get_modimpls, get_ues, get_table_moyennes_triees, get_etud_decision_sem, get_etud_etat, get_etud_rang, get_nom_short, get_mod_stats, nt.moy_moy, get_etud_decision_sem,
|
||||
modimpls = nt.get_modimpls()
|
||||
ues = nt.get_ues() # incluant le(s) UE de sport
|
||||
#
|
||||
@ -292,7 +295,11 @@ def make_formsemestre_recapcomplet(
|
||||
|
||||
# Construit une liste de listes de chaines: le champs du tableau resultat (HTML ou CSV)
|
||||
F = []
|
||||
h = [rank_label, "Nom"]
|
||||
h = [rank_label]
|
||||
if civ_nom_prenom:
|
||||
h += ["Civilité", "Nom", "Prénom"]
|
||||
else:
|
||||
h += ["Nom"]
|
||||
if not hidebac:
|
||||
h.append("Bac")
|
||||
|
||||
@ -370,7 +377,7 @@ def make_formsemestre_recapcomplet(
|
||||
gr_name = group["group_name"] or ""
|
||||
is_dem[etudid] = False
|
||||
if rank_partition_id:
|
||||
rang_gr, ninscrits_gr, rank_gr_name = sco_bulletins.get_etud_rangs_groups(
|
||||
rang_gr, _, rank_gr_name = sco_bulletins.get_etud_rangs_groups(
|
||||
context, etudid, formsemestre_id, partitions, partitions_etud_groups, nt
|
||||
)
|
||||
if rank_gr_name[rank_partition_id]:
|
||||
@ -383,8 +390,13 @@ def make_formsemestre_recapcomplet(
|
||||
else:
|
||||
rank = nt.get_etud_rang(etudid)
|
||||
|
||||
l = [rank, nt.get_nom_short(etudid)] # rang, nom,
|
||||
e = nt.identdict[etudid]
|
||||
if civ_nom_prenom:
|
||||
scolars.format_etud_ident(e)
|
||||
l = [rank, e["civilite_str"], e["nom_disp"], e["prenom"]] # civ, nom prenom
|
||||
else:
|
||||
l = [rank, nt.get_nom_short(etudid)] # rang, nom,
|
||||
|
||||
if not hidebac:
|
||||
bac = sco_bac.Baccalaureat(e["bac"], e["specialite"])
|
||||
l.append(bac.abbrev())
|
||||
@ -457,6 +469,8 @@ def make_formsemestre_recapcomplet(
|
||||
|
||||
def add_bottom_stat(key, title, corner_value=""):
|
||||
l = ["", title]
|
||||
if civ_nom_prenom:
|
||||
l += ["", ""]
|
||||
if not hidebac:
|
||||
l.append("")
|
||||
if format[:3] == "xls" or format == "csv":
|
||||
@ -628,7 +642,6 @@ def make_formsemestre_recapcomplet(
|
||||
"formsemestre_id": formsemestre_id,
|
||||
"etudid": etudid,
|
||||
"name": l[1],
|
||||
"nomprenom": nt.get_nom_long(etudid),
|
||||
}
|
||||
if ir % 2 == 0:
|
||||
cells = '<tr class="recap_row_even" id="etudid%s">' % etudid
|
||||
|
136
sco_report.py
136
sco_report.py
@ -293,7 +293,7 @@ def formsemestre_report_counts(
|
||||
"codedecision",
|
||||
"devenir",
|
||||
"etat",
|
||||
"sexe",
|
||||
"civilite",
|
||||
"qualite",
|
||||
"villelycee",
|
||||
"statut",
|
||||
@ -365,7 +365,7 @@ def table_suivi_cohorte(
|
||||
bac="", # selection sur type de bac
|
||||
bacspecialite="",
|
||||
annee_bac="",
|
||||
sexe="",
|
||||
civilite=None,
|
||||
statut="",
|
||||
only_primo=False,
|
||||
):
|
||||
@ -404,7 +404,7 @@ def table_suivi_cohorte(
|
||||
bacs = set()
|
||||
bacspecialites = set()
|
||||
annee_bacs = set()
|
||||
sexes = set()
|
||||
civilites = set()
|
||||
statuts = set()
|
||||
for etudid in etudids:
|
||||
etud = context.getEtudInfo(etudid=etudid, filled=True)[0]
|
||||
@ -414,7 +414,7 @@ def table_suivi_cohorte(
|
||||
(not bac or (bac == etud["bac"]))
|
||||
and (not bacspecialite or (bacspecialite == bacspe))
|
||||
and (not annee_bac or (annee_bac == str(etud["annee_bac"])))
|
||||
and (not sexe or (sexe == etud["sexe"]))
|
||||
and (not civilite or (civilite == etud["civilite"]))
|
||||
and (not statut or (statut == etud["statut"]))
|
||||
and (not only_primo or context.isPrimoEtud(etud, sem))
|
||||
):
|
||||
@ -426,7 +426,7 @@ def table_suivi_cohorte(
|
||||
bacs.add(etud["bac"])
|
||||
bacspecialites.add(bacspe)
|
||||
annee_bacs.add(etud["annee_bac"])
|
||||
sexes.add(etud["sexe"])
|
||||
civilites.add(etud["civilite"])
|
||||
if etud["statut"]: # ne montre pas les statuts non renseignés
|
||||
statuts.add(etud["statut"])
|
||||
sems = S.values()
|
||||
@ -617,8 +617,8 @@ def table_suivi_cohorte(
|
||||
dbac += " (spécialité %s)" % bacspecialite
|
||||
if annee_bac:
|
||||
dbac += " (année bac %s)" % annee_bac
|
||||
if sexe:
|
||||
dbac += " genre: %s" % sexe
|
||||
if civilite:
|
||||
dbac += " civilité: %s" % civilite
|
||||
if statut:
|
||||
dbac += " statut: %s" % statut
|
||||
tab = GenTable(
|
||||
@ -652,7 +652,15 @@ def table_suivi_cohorte(
|
||||
expl.append(", ".join(ls) + "</li>")
|
||||
expl.append("</ul>")
|
||||
logt("Z: table_suivi_cohorte done")
|
||||
return tab, "\n".join(expl), bacs, bacspecialites, annee_bacs, sexes, statuts
|
||||
return (
|
||||
tab,
|
||||
"\n".join(expl),
|
||||
bacs,
|
||||
bacspecialites,
|
||||
annee_bacs,
|
||||
civilites,
|
||||
statuts,
|
||||
)
|
||||
|
||||
|
||||
def formsemestre_suivi_cohorte(
|
||||
@ -663,27 +671,35 @@ def formsemestre_suivi_cohorte(
|
||||
bac="",
|
||||
bacspecialite="",
|
||||
annee_bac="",
|
||||
sexe="",
|
||||
civilite=None,
|
||||
statut="",
|
||||
only_primo=False,
|
||||
REQUEST=None,
|
||||
):
|
||||
"""Affiche suivi cohortes par numero de semestre"""
|
||||
percent = int(percent)
|
||||
tab, expl, bacs, bacspecialites, annee_bacs, sexes, statuts = table_suivi_cohorte(
|
||||
(
|
||||
tab,
|
||||
expl,
|
||||
bacs,
|
||||
bacspecialites,
|
||||
annee_bacs,
|
||||
civilites,
|
||||
statuts,
|
||||
) = table_suivi_cohorte(
|
||||
context,
|
||||
formsemestre_id,
|
||||
percent=percent,
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
only_primo=only_primo,
|
||||
)
|
||||
tab.base_url = (
|
||||
"%s?formsemestre_id=%s&percent=%s&bac=%s&bacspecialite=%s&sexe=%s"
|
||||
% (REQUEST.URL0, formsemestre_id, percent, bac, bacspecialite, sexe)
|
||||
"%s?formsemestre_id=%s&percent=%s&bac=%s&bacspecialite=%s&civilite=%s"
|
||||
% (REQUEST.URL0, formsemestre_id, percent, bac, bacspecialite, civilite)
|
||||
)
|
||||
if only_primo:
|
||||
tab.base_url += "&only_primo=on"
|
||||
@ -693,8 +709,8 @@ def formsemestre_suivi_cohorte(
|
||||
|
||||
base_url = REQUEST.URL0
|
||||
burl = (
|
||||
"%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&sexe=%s&statut=%s"
|
||||
% (base_url, formsemestre_id, bac, bacspecialite, sexe, statut)
|
||||
"%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&civilite=%s&statut=%s"
|
||||
% (base_url, formsemestre_id, bac, bacspecialite, civilite, statut)
|
||||
)
|
||||
if percent:
|
||||
pplink = (
|
||||
@ -724,12 +740,12 @@ def formsemestre_suivi_cohorte(
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
bacs=bacs,
|
||||
bacspecialites=bacspecialites,
|
||||
annee_bacs=annee_bacs,
|
||||
sexes=sexes,
|
||||
civilites=civilites,
|
||||
statuts=statuts,
|
||||
percent=percent,
|
||||
),
|
||||
@ -749,12 +765,12 @@ def _gen_form_selectetuds(
|
||||
bac=None,
|
||||
bacspecialite=None,
|
||||
annee_bac=None,
|
||||
sexe=None,
|
||||
civilite=None,
|
||||
statut=None,
|
||||
bacs=None,
|
||||
bacspecialites=None,
|
||||
annee_bacs=None,
|
||||
sexes=None,
|
||||
civilites=None,
|
||||
statuts=None,
|
||||
):
|
||||
"""HTML form pour choix criteres selection etudiants"""
|
||||
@ -764,8 +780,8 @@ def _gen_form_selectetuds(
|
||||
bacspecialites.sort()
|
||||
annee_bacs = list(annee_bacs)
|
||||
annee_bacs.sort()
|
||||
sexes = list(sexes)
|
||||
sexes.sort()
|
||||
civilites = list(civilites)
|
||||
civilites.sort()
|
||||
statuts = list(statuts)
|
||||
statuts.sort()
|
||||
#
|
||||
@ -824,13 +840,13 @@ def _gen_form_selectetuds(
|
||||
F.append("</select>")
|
||||
#
|
||||
F.append(
|
||||
""" Genre: <select name="sexe" onchange="javascript: submit(this);">
|
||||
""" Genre: <select name="civilite" onchange="javascript: submit(this);">
|
||||
<option value="" %s>tous</option>
|
||||
"""
|
||||
% selected
|
||||
)
|
||||
for b in sexes:
|
||||
if sexe == b:
|
||||
for b in civilites:
|
||||
if civilite == b:
|
||||
selected = 'selected="selected"'
|
||||
else:
|
||||
selected = ""
|
||||
@ -984,7 +1000,7 @@ def tsp_etud_list(
|
||||
bac="", # selection sur type de bac
|
||||
bacspecialite="",
|
||||
annee_bac="",
|
||||
sexe="",
|
||||
civilite="",
|
||||
statut="",
|
||||
):
|
||||
"""Liste des etuds a considerer dans table suivi parcours
|
||||
@ -1000,7 +1016,7 @@ def tsp_etud_list(
|
||||
bacs = set()
|
||||
bacspecialites = set()
|
||||
annee_bacs = set()
|
||||
sexes = set()
|
||||
civilites = set()
|
||||
statuts = set()
|
||||
for etudid in etudids:
|
||||
etud = context.getEtudInfo(etudid=etudid, filled=True)[0]
|
||||
@ -1010,7 +1026,7 @@ def tsp_etud_list(
|
||||
(not bac or (bac == etud["bac"]))
|
||||
and (not bacspecialite or (bacspecialite == bacspe))
|
||||
and (not annee_bac or (annee_bac == str(etud["annee_bac"])))
|
||||
and (not sexe or (sexe == etud["sexe"]))
|
||||
and (not civilite or (civilite == etud["civilite"]))
|
||||
and (not statut or (statut == etud["statut"]))
|
||||
and (not only_primo or context.isPrimoEtud(etud, sem))
|
||||
):
|
||||
@ -1019,11 +1035,11 @@ def tsp_etud_list(
|
||||
bacs.add(etud["bac"])
|
||||
bacspecialites.add(bacspe)
|
||||
annee_bacs.add(etud["annee_bac"])
|
||||
sexes.add(etud["sexe"])
|
||||
civilites.add(etud["civilite"])
|
||||
if etud["statut"]: # ne montre pas les statuts non renseignés
|
||||
statuts.add(etud["statut"])
|
||||
# log('tsp_etud_list: %s etuds' % len(etuds))
|
||||
return etuds, bacs, bacspecialites, annee_bacs, sexes, statuts
|
||||
return etuds, bacs, bacspecialites, annee_bacs, civilites, statuts
|
||||
|
||||
|
||||
def tsp_grouped_list(context, codes_etuds):
|
||||
@ -1049,7 +1065,7 @@ def table_suivi_parcours(
|
||||
):
|
||||
"""Tableau recapitulant tous les parcours"""
|
||||
sem = sco_formsemestre.get_formsemestre(context, formsemestre_id)
|
||||
etuds, bacs, bacspecialites, annee_bacs, sexes, statuts = tsp_etud_list(
|
||||
etuds, bacs, bacspecialites, annee_bacs, civilites, statuts = tsp_etud_list(
|
||||
context, formsemestre_id, only_primo=only_primo
|
||||
)
|
||||
codes_etuds = scu.DictDefault(defaultvalue=[])
|
||||
@ -1065,7 +1081,7 @@ def table_suivi_parcours(
|
||||
titles = {
|
||||
"parcours": "Code parcours",
|
||||
"nb": "Nombre d'étudiants",
|
||||
"sexe": "",
|
||||
"civilite": "",
|
||||
"nom": "Nom",
|
||||
"prenom": "Prénom",
|
||||
"etudid": "etudid",
|
||||
@ -1082,7 +1098,7 @@ def table_suivi_parcours(
|
||||
L = etuds
|
||||
columns_ids = (
|
||||
"etudid",
|
||||
"sexe",
|
||||
"civilite",
|
||||
"nom",
|
||||
"prenom",
|
||||
"bac",
|
||||
@ -1209,25 +1225,25 @@ def graph_parcours(
|
||||
bac="", # selection sur type de bac
|
||||
bacspecialite="",
|
||||
annee_bac="",
|
||||
sexe="",
|
||||
civilite="",
|
||||
statut="",
|
||||
):
|
||||
""""""
|
||||
if not scu.WITH_PYDOT:
|
||||
raise ScoValueError("pydot module is not installed")
|
||||
etuds, bacs, bacspecialites, annee_bacs, sexes, statuts = tsp_etud_list(
|
||||
etuds, bacs, bacspecialites, annee_bacs, civilites, statuts = tsp_etud_list(
|
||||
context,
|
||||
formsemestre_id,
|
||||
only_primo=only_primo,
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
)
|
||||
# log('graph_parcours: %s etuds (only_primo=%s)' % (len(etuds), only_primo))
|
||||
if not etuds:
|
||||
return "", etuds, bacs, bacspecialites, annee_bacs, sexes, statuts
|
||||
return "", etuds, bacs, bacspecialites, annee_bacs, civilites, statuts
|
||||
edges = scu.DictDefault(
|
||||
defaultvalue=set()
|
||||
) # {(formsemestre_id_origin, formsemestre_id_dest) : etud_set}
|
||||
@ -1417,7 +1433,7 @@ def graph_parcours(
|
||||
# cf http://groups.google.com/group/pydot/browse_thread/thread/b3704c53e331e2ec
|
||||
data = data.replace("font-family:Arial", "font-family:Helvetica")
|
||||
|
||||
return data, etuds, bacs, bacspecialites, annee_bacs, sexes, statuts
|
||||
return data, etuds, bacs, bacspecialites, annee_bacs, civilites, statuts
|
||||
|
||||
|
||||
def formsemestre_graph_parcours(
|
||||
@ -1428,7 +1444,7 @@ def formsemestre_graph_parcours(
|
||||
bac="", # selection sur type de bac
|
||||
bacspecialite="",
|
||||
annee_bac="",
|
||||
sexe="",
|
||||
civilite="",
|
||||
statut="",
|
||||
allkeys=False, # unused
|
||||
REQUEST=None,
|
||||
@ -1437,7 +1453,15 @@ def formsemestre_graph_parcours(
|
||||
# log("formsemestre_graph_parcours")
|
||||
sem = sco_formsemestre.get_formsemestre(context, formsemestre_id)
|
||||
if format == "pdf":
|
||||
doc, etuds, bacs, bacspecialites, annee_bacs, sexes, statuts = graph_parcours(
|
||||
(
|
||||
doc,
|
||||
etuds,
|
||||
bacs,
|
||||
bacspecialites,
|
||||
annee_bacs,
|
||||
civilites,
|
||||
statuts,
|
||||
) = graph_parcours(
|
||||
context,
|
||||
formsemestre_id,
|
||||
format="pdf",
|
||||
@ -1445,14 +1469,22 @@ def formsemestre_graph_parcours(
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
)
|
||||
filename = scu.make_filename("flux " + sem["titreannee"])
|
||||
return scu.sendPDFFile(REQUEST, doc, filename + ".pdf")
|
||||
elif format == "png":
|
||||
#
|
||||
doc, etuds, bacs, bacspecialites, annee_bacs, sexes, statuts = graph_parcours(
|
||||
(
|
||||
doc,
|
||||
etuds,
|
||||
bacs,
|
||||
bacspecialites,
|
||||
annee_bacs,
|
||||
civilites,
|
||||
statuts,
|
||||
) = graph_parcours(
|
||||
context,
|
||||
formsemestre_id,
|
||||
format="png",
|
||||
@ -1460,7 +1492,7 @@ def formsemestre_graph_parcours(
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
)
|
||||
filename = scu.make_filename("flux " + sem["titreannee"])
|
||||
@ -1475,17 +1507,25 @@ def formsemestre_graph_parcours(
|
||||
else:
|
||||
op = ""
|
||||
url = urllib.quote(
|
||||
"formsemestre_graph_parcours?formsemestre_id=%s&%sbac=%s&bacspecialite=%s&sexe=%s&statut=%s&format="
|
||||
% (formsemestre_id, op, bac, bacspecialite, sexe, statut)
|
||||
"formsemestre_graph_parcours?formsemestre_id=%s&%sbac=%s&bacspecialite=%s&civilite=%s&statut=%s&format="
|
||||
% (formsemestre_id, op, bac, bacspecialite, civilite, statut)
|
||||
)
|
||||
doc, etuds, bacs, bacspecialites, annee_bacs, sexes, statuts = graph_parcours(
|
||||
(
|
||||
doc,
|
||||
etuds,
|
||||
bacs,
|
||||
bacspecialites,
|
||||
annee_bacs,
|
||||
civilites,
|
||||
statuts,
|
||||
) = graph_parcours(
|
||||
context,
|
||||
formsemestre_id,
|
||||
only_primo=only_primo,
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
)
|
||||
|
||||
@ -1505,12 +1545,12 @@ def formsemestre_graph_parcours(
|
||||
bac=bac,
|
||||
bacspecialite=bacspecialite,
|
||||
annee_bac=annee_bac,
|
||||
sexe=sexe,
|
||||
civilite=civilite,
|
||||
statut=statut,
|
||||
bacs=bacs,
|
||||
bacspecialites=bacspecialites,
|
||||
annee_bacs=annee_bacs,
|
||||
sexes=sexes,
|
||||
civilites=civilites,
|
||||
statuts=statuts,
|
||||
percent=0,
|
||||
),
|
||||
|
@ -1127,7 +1127,13 @@ def _form_saisie_notes(context, E, M, group_ids, destination="", REQUEST=None):
|
||||
for group_info in e["groups"]:
|
||||
etud_classes.append(group_info["group_id"])
|
||||
|
||||
label = '<span class="%s">' % classdem + e["nomprenom"] + "</span>"
|
||||
label = (
|
||||
'<span class="%s">' % classdem
|
||||
+ e["civilite_str"]
|
||||
+ " "
|
||||
+ scolars.format_nomprenom(e, reverse=True)
|
||||
+ "</span>"
|
||||
)
|
||||
|
||||
# Historique des saisies de notes:
|
||||
if not disabled:
|
||||
|
@ -408,7 +408,7 @@ def list_synch(context, sem, anneeapogee=None):
|
||||
etud = etudsapo_ident[key]
|
||||
|
||||
etud["etudid"] = ""
|
||||
etud["sexe"] = etud.get(
|
||||
etud["civilite"] = etud.get(
|
||||
"sexe", etud.get("gender", "")
|
||||
) # la cle 'sexe' est prioritaire sur 'gender'
|
||||
etud["inscrit"] = is_inscrit # checkbox state
|
||||
@ -545,16 +545,14 @@ def formsemestre_synchro_etuds_help(context, sem):
|
||||
)
|
||||
|
||||
|
||||
def gender2sex(gender):
|
||||
"""Le portail code en 'M', 'F', et ScoDoc en 'MR', 'MME'
|
||||
Les F sont ici codées en MME
|
||||
"""
|
||||
if gender == "M":
|
||||
return "MR"
|
||||
elif gender == "F":
|
||||
return "MME"
|
||||
log('gender2sex: invalid value "%s", defaulting to "M"' % gender)
|
||||
return "MR"
|
||||
def gender2civilite(gender):
|
||||
"""Le portail code en 'M', 'F', et ScoDoc en 'M', 'F', 'X'"""
|
||||
if gender == "M" or gender == "F" or gender == "X":
|
||||
return gender
|
||||
elif not gender:
|
||||
return "X"
|
||||
log('gender2civilite: invalid value "%s", defaulting to "X"' % gender)
|
||||
return "X" # "X" en général n'est pas affiché, donc bon choix si invalide
|
||||
|
||||
|
||||
def get_opt_str(etud, k):
|
||||
@ -598,7 +596,7 @@ def do_import_etuds_from_portal(context, sem, a_importer, etudsapo_ident, REQUES
|
||||
"prenom": etud["prenom"].strip(),
|
||||
# Les champs suivants sont facultatifs (pas toujours renvoyés par le portail)
|
||||
"code_ine": etud.get("ine", "").strip(),
|
||||
"sexe": gender2sex(etud["gender"].strip()),
|
||||
"civilite": gender2civilite(etud["gender"].strip()),
|
||||
"etape": etud.get("etape", None),
|
||||
"email": etud.get("mail", "").strip(),
|
||||
"emailperso": etud.get("mailperso", "").strip(),
|
||||
@ -738,9 +736,9 @@ def do_import_etud_admission(
|
||||
if x:
|
||||
args[sco_field] = x
|
||||
# Champs spécifiques:
|
||||
sexe = gender2sex(etud["gender"].strip())
|
||||
if sexe:
|
||||
args["sexe"] = sexe
|
||||
civilite = gender2civilite(etud["gender"].strip())
|
||||
if civilite:
|
||||
args["civilite"] = civilite
|
||||
|
||||
scolars.identite_edit_nocheck(cnx, args)
|
||||
|
||||
|
@ -337,13 +337,7 @@ def _trombino_pdf(context, groups_infos, REQUEST):
|
||||
[img],
|
||||
[
|
||||
Paragraph(
|
||||
SU(
|
||||
scolars.format_sexe(t["sexe"])
|
||||
+ " "
|
||||
+ scolars.format_prenom(t["prenom"])
|
||||
+ " "
|
||||
+ scolars.format_nom(t["nom"])
|
||||
),
|
||||
SU(scolars.format_nomprenom(t)),
|
||||
StyleSheet["Normal"],
|
||||
)
|
||||
],
|
||||
@ -422,13 +416,7 @@ def _listeappel_photos_pdf(context, groups_infos, REQUEST):
|
||||
t = groups_infos.members[i]
|
||||
img = _get_etud_platypus_image(context, t, image_width=PHOTOWIDTH)
|
||||
txt = Paragraph(
|
||||
SU(
|
||||
scolars.format_sexe(t["sexe"])
|
||||
+ " "
|
||||
+ scolars.format_prenom(t["prenom"])
|
||||
+ " "
|
||||
+ scolars.format_nom(t["nom"])
|
||||
),
|
||||
SU(scolars.format_nomprenom(t)),
|
||||
StyleSheet["Normal"],
|
||||
)
|
||||
if currow:
|
||||
|
@ -704,7 +704,7 @@ if WITH_PYDOT:
|
||||
junk_graph = pydot.Dot("junk")
|
||||
junk_graph.add_node(pydot.Node("a"))
|
||||
n = junk_graph.get_node("a")
|
||||
if type(n) == type([]):
|
||||
if type(n) == type([]): # "modern" pydot
|
||||
|
||||
def pydot_get_node(g, name):
|
||||
r = g.get_node(name)
|
||||
@ -713,7 +713,7 @@ if WITH_PYDOT:
|
||||
else:
|
||||
return r[0]
|
||||
|
||||
else:
|
||||
else: # very old pydot
|
||||
|
||||
def pydot_get_node(g, name):
|
||||
return g.get_node(name)
|
||||
|
79
scolars.py
79
scolars.py
@ -101,7 +101,7 @@ def format_etud_ident(etud):
|
||||
else:
|
||||
etud["nom_usuel"] = ""
|
||||
etud["prenom"] = format_prenom(etud["prenom"])
|
||||
etud["sexe"] = format_sexe(etud["sexe"])
|
||||
etud["civilite_str"] = format_civilite(etud["civilite"])
|
||||
# Nom à afficher:
|
||||
if etud["nom_usuel"]:
|
||||
etud["nom_disp"] = etud["nom_usuel"]
|
||||
@ -111,10 +111,12 @@ def format_etud_ident(etud):
|
||||
etud["nom_disp"] = etud["nom"]
|
||||
|
||||
etud["nomprenom"] = format_nomprenom(etud) # M. Pierre DUPONT
|
||||
if etud["sexe"] == "M.":
|
||||
if etud["civilite"] == "M":
|
||||
etud["ne"] = ""
|
||||
else:
|
||||
elif etud["civilite"] == "F":
|
||||
etud["ne"] = "e"
|
||||
else: # 'X'
|
||||
etud["ne"] = "(e)"
|
||||
# Mail à utiliser pour les envois vers l'étudiant:
|
||||
# choix qui pourrait être controé par une preference
|
||||
# ici priorité au mail institutionnel:
|
||||
@ -127,15 +129,22 @@ def force_uppercase(s):
|
||||
return s
|
||||
|
||||
|
||||
def format_nomprenom(etud):
|
||||
"formatte sexe/nom/prenom pour affichages"
|
||||
return " ".join(
|
||||
[format_sexe(etud["sexe"]), format_prenom(etud["prenom"]), etud["nom_disp"]]
|
||||
)
|
||||
def format_nomprenom(etud, reverse=False):
|
||||
"""Formatte civilité/nom/prenom pour affichages: "M. Pierre Dupont"
|
||||
Si reverse, "Dupont Pierre", sans civilité.
|
||||
"""
|
||||
nom = etud.get("nom_disp", "") or etud.get("nom_usuel", "") or etud["nom"]
|
||||
prenom = format_prenom(etud["prenom"])
|
||||
civilite = format_civilite(etud["civilite"])
|
||||
if reverse:
|
||||
fs = [nom, prenom]
|
||||
else:
|
||||
fs = [civilite, prenom, nom]
|
||||
return " ".join([x for x in fs if x])
|
||||
|
||||
|
||||
def format_prenom(s):
|
||||
"formatte prenom etudiant pour affichage"
|
||||
"Formatte prenom etudiant pour affichage"
|
||||
if not s:
|
||||
return ""
|
||||
frags = s.split()
|
||||
@ -162,22 +171,33 @@ def format_nom(s, uppercase=True):
|
||||
return format_prenom(s)
|
||||
|
||||
|
||||
def format_sexe(sexe):
|
||||
sexe = scu.strlower(sexe)
|
||||
if sexe == "mr" or sexe == "m." or sexe == "m":
|
||||
return "M."
|
||||
else:
|
||||
return "Mme"
|
||||
def input_civilite(s):
|
||||
"""Converts external representation of civilite to internal:
|
||||
'M', 'F', or 'X' (and nothing else).
|
||||
Raises valueError if conversion fails.
|
||||
"""
|
||||
s = scu.strupper(s).strip()
|
||||
if s in ("M", "M.", "MR", "H"):
|
||||
return "M"
|
||||
elif s in ("F", "MLLE", "MLLE.", "MELLE", "MME"):
|
||||
return "F"
|
||||
elif s == "X" or not s:
|
||||
return "X"
|
||||
raise ValueError("valeur invalide pour la civilité: %s" % s)
|
||||
|
||||
|
||||
def normalize_sexe(sexe):
|
||||
"returns 'MR' ou 'MME'"
|
||||
sexe = scu.strupper(sexe).strip()
|
||||
if sexe in ("M.", "M", "MR", "H"):
|
||||
return "MR"
|
||||
elif sexe in ("MLLE", "MLLE.", "MELLE", "MME", "F"):
|
||||
return "MME"
|
||||
raise ValueError("valeur invalide pour le sexe: %s" % sexe)
|
||||
def format_civilite(civilite):
|
||||
"""returns 'M.' ou 'Mme' ou '' (pour le genre neutre,
|
||||
personne ne souhaitant pas d'affichage)
|
||||
"""
|
||||
try:
|
||||
return {
|
||||
"M": "M.",
|
||||
"F": "Mme",
|
||||
"X": "",
|
||||
}[civilite]
|
||||
except KeyError:
|
||||
raise ValueError("valeur invalide pour la civilité: %s" % civilite)
|
||||
|
||||
|
||||
def format_lycee(nomlycee):
|
||||
@ -241,7 +261,7 @@ _identiteEditor = EditableTable(
|
||||
"nom",
|
||||
"nom_usuel",
|
||||
"prenom",
|
||||
"sexe",
|
||||
"civilite", # 'M", "F", or "X"
|
||||
"date_naissance",
|
||||
"lieu_naissance",
|
||||
"dept_naissance",
|
||||
@ -257,10 +277,10 @@ _identiteEditor = EditableTable(
|
||||
input_formators={
|
||||
"nom": force_uppercase,
|
||||
"prenom": force_uppercase,
|
||||
"sexe": force_uppercase,
|
||||
"civilite": input_civilite,
|
||||
"date_naissance": DateDMYtoISO,
|
||||
},
|
||||
output_formators={"date_naissance": DateISOtoDMY, "sexe": normalize_sexe},
|
||||
output_formators={"date_naissance": DateISOtoDMY},
|
||||
convert_null_outputs_to_empty=True,
|
||||
allow_set_id=True, # car on specifie le code Apogee a la creation
|
||||
)
|
||||
@ -269,13 +289,14 @@ identite_delete = _identiteEditor.delete
|
||||
|
||||
|
||||
def identite_list(cnx, *a, **kw):
|
||||
"list, add 'annee_naissance'"
|
||||
"""List, adding on the fly 'annee_naissance' and 'civilite_str' (M., Mme, "")."""
|
||||
objs = _identiteEditor.list(cnx, *a, **kw)
|
||||
for o in objs:
|
||||
if o["date_naissance"]:
|
||||
o["annee_naissance"] = int(o["date_naissance"].split("/")[2])
|
||||
else:
|
||||
o["annee_naissance"] = o["date_naissance"]
|
||||
o["civilite_str"] = format_civilite(o["civilite"])
|
||||
return objs
|
||||
|
||||
|
||||
@ -372,7 +393,6 @@ def identite_edit(cnx, args, context=None, REQUEST=None):
|
||||
if notify_to:
|
||||
# etat AVANT edition pour envoyer diffs
|
||||
before = identite_list(cnx, {"etudid": args["etudid"]})[0]
|
||||
before["sexe"] = format_sexe(before["sexe"])
|
||||
|
||||
identite_edit_nocheck(cnx, args)
|
||||
|
||||
@ -380,7 +400,6 @@ def identite_edit(cnx, args, context=None, REQUEST=None):
|
||||
if notify_to:
|
||||
etud = context.getEtudInfo(etudid=args["etudid"], filled=True)[0]
|
||||
after = identite_list(cnx, {"etudid": args["etudid"]})[0]
|
||||
after["sexe"] = format_sexe(after["sexe"])
|
||||
notify_etud_change(
|
||||
context,
|
||||
notify_to,
|
||||
@ -412,7 +431,7 @@ def notify_etud_change(context, email_addr, etud, before, after, subject):
|
||||
"""
|
||||
txt = [
|
||||
"Code NIP:" + etud["code_nip"],
|
||||
"Genre: " + etud["sexe"],
|
||||
"Civilité: " + etud["civilite_str"],
|
||||
"Nom: " + etud["nom"],
|
||||
"Prénom: " + etud["prenom"],
|
||||
"Etudid: " + etud["etudid"],
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
"""Outils pour environnements de démo.
|
||||
|
||||
Change aléatoirement les identites (nip, sexe, nom, prenom) des étudiants d'un semestre.
|
||||
Change aléatoirement les identites (nip, civilite, nom, prenom) des étudiants d'un semestre.
|
||||
|
||||
Le NIP est choisi aléatoirement (nombre entier à 8 chiffres).
|
||||
Les noms et prénoms sont issus des fichiers noms.txt, prenoms-h.txt, prenoms-f.txt
|
||||
(ce sont simlement les plus fréquemment rencontrés en France).
|
||||
Le sexe est choisi aléatoirement 50-50.
|
||||
La civilité est choisie aléatoirement 50-50 Homme/Femme.
|
||||
"""
|
||||
|
||||
import sys
|
||||
@ -54,17 +54,17 @@ cursor.execute(
|
||||
wcursor = cnx.cursor()
|
||||
n = 0
|
||||
for (etudid,) in cursor:
|
||||
sexe = random.choice(("M.", "MME"))
|
||||
nom, prenom = nomprenom(sexe)
|
||||
civilite = random.choice(("M", "F")) # pas de neutre, on pourrait ajouter 'X'
|
||||
nom, prenom = nomprenom(civilite)
|
||||
print(f"{etudid}: {nom}\t{prenom}")
|
||||
args = {
|
||||
"nom": nom,
|
||||
"prenom": prenom,
|
||||
"sexe": sexe,
|
||||
"civilite": civilite,
|
||||
"etudid": etudid,
|
||||
"code_nip": random.randrange(10000000, 99999999),
|
||||
}
|
||||
req = "update identite set nom=%(nom)s, prenom=%(prenom)s, sexe=%(sexe)s where etudid=%(etudid)s"
|
||||
req = "update identite set nom=%(nom)s, prenom=%(prenom)s, civilite=%(civilite)s where etudid=%(etudid)s"
|
||||
# print( req % args)
|
||||
wcursor.execute(req, args)
|
||||
n += 1
|
||||
|
@ -10,14 +10,19 @@ cur_dir = Path(os.path.abspath(__file__)).parent
|
||||
NOMS = [x.strip() for x in open(cur_dir / "noms.txt").readlines()]
|
||||
PRENOMS_H = [x.strip() for x in open(cur_dir / "prenoms-h.txt").readlines()]
|
||||
PRENOMS_F = [x.strip() for x in open(cur_dir / "prenoms-f.txt").readlines()]
|
||||
PRENOMS_X = [x.strip() for x in open(cur_dir / "prenoms-x.txt").readlines()]
|
||||
|
||||
|
||||
def nomprenom(sexe):
|
||||
"""un nom et un prenom au hasard,
|
||||
toujours en majuscules.
|
||||
def nomprenom(civilite):
|
||||
"""Un nom et un prenom au hasard,
|
||||
toujours en majuscules. Pour tests et démos.
|
||||
"""
|
||||
if "e" in sexe.lower() or "f" in sexe.lower():
|
||||
if civilite == "F":
|
||||
prenom = random.choice(PRENOMS_F)
|
||||
else:
|
||||
elif civilite == "M":
|
||||
prenom = random.choice(PRENOMS_H)
|
||||
elif civilite == "X":
|
||||
prenom = random.choice(PRENOMS_X)
|
||||
else:
|
||||
raise ValueError("civilite must be M, F or X")
|
||||
return random.choice(NOMS).upper(), prenom.upper()
|
||||
|
10
scotests/demo/prenoms-x.txt
Normal file
10
scotests/demo/prenoms-x.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Camille
|
||||
Sacha
|
||||
Eden
|
||||
Maxime
|
||||
Morgan
|
||||
Charlie
|
||||
Alix
|
||||
Claude
|
||||
Ufuk
|
||||
Lou
|
@ -38,6 +38,7 @@ DEMODIR = sco_utils.SCO_SRCDIR + "/scotests/demo/"
|
||||
NOMS = [x.strip() for x in open(DEMODIR + "/noms.txt").readlines()]
|
||||
PRENOMS_H = [x.strip() for x in open(DEMODIR + "/prenoms-h.txt").readlines()]
|
||||
PRENOMS_F = [x.strip() for x in open(DEMODIR + "/prenoms-f.txt").readlines()]
|
||||
PRENOMS_X = [x.strip() for x in open(DEMODIR + "/prenoms-x.txt").readlines()]
|
||||
# nb: en python2, les chaines ci-dessus sont en utf8
|
||||
|
||||
|
||||
@ -66,16 +67,20 @@ class ScoFake:
|
||||
sys.stderr.flush()
|
||||
log("ScoFake: " + str(msg))
|
||||
|
||||
def sexenomprenom(self):
|
||||
def civilitenomprenom(self):
|
||||
"""un nom et un prenom au hasard,
|
||||
toujours en majuscules.
|
||||
"""
|
||||
sexe = random.choice(("M", "F"))
|
||||
if "e" in sexe.lower() or "f" in sexe.lower():
|
||||
civilite = random.choice(("M", "M", "M", "F", "F", "F", "X"))
|
||||
if civilite == "F":
|
||||
prenom = random.choice(PRENOMS_F)
|
||||
else:
|
||||
elif civilite == "M":
|
||||
prenom = random.choice(PRENOMS_H)
|
||||
return sexe, random.choice(NOMS).upper(), prenom.upper()
|
||||
elif civilite == "X":
|
||||
prenom = random.choice(PRENOMS_X)
|
||||
else:
|
||||
raise ValueError("invalid civilite value")
|
||||
return civilite, random.choice(NOMS).upper(), prenom.upper()
|
||||
|
||||
@logging_meth
|
||||
def create_etud(
|
||||
@ -85,7 +90,7 @@ class ScoFake:
|
||||
nom="",
|
||||
prenom="",
|
||||
code_ine="",
|
||||
sexe="",
|
||||
civilite="",
|
||||
etape="TST1",
|
||||
email="test@localhost",
|
||||
emailperso="perso@localhost",
|
||||
@ -106,10 +111,10 @@ class ScoFake:
|
||||
cnx = self.context.GetDBConnexion()
|
||||
if code_nip == "":
|
||||
code_nip = str(random.randint(10000, 99999))
|
||||
if not sexe or not nom or not prenom:
|
||||
r_sexe, r_nom, r_prenom = self.sexenomprenom()
|
||||
if not sexe:
|
||||
sexe = r_sexe
|
||||
if not civilite or not nom or not prenom:
|
||||
r_civilite, r_nom, r_prenom = self.civilitenomprenom()
|
||||
if not civilite:
|
||||
civilite = r_civilite
|
||||
if not nom:
|
||||
nom = r_nom
|
||||
if not prenom:
|
||||
|
@ -332,8 +332,7 @@ h2.listesems {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
table.semlist tr.gt_firstrow th {
|
||||
}
|
||||
/* table.semlist tr.gt_firstrow th {} */
|
||||
|
||||
table.semlist tr td {
|
||||
border: none;
|
||||
@ -690,8 +689,7 @@ a.stdlink:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.link_accessible {
|
||||
}
|
||||
/* a.link_accessible {} */
|
||||
a.link_unauthorized, a.link_unauthorized:visited {
|
||||
color: rgb(75,75,75);
|
||||
}
|
||||
@ -712,8 +710,8 @@ span.spanlink:hover {
|
||||
margin-bottom: 3px;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
// non std for webkit:
|
||||
work-break: break-word;
|
||||
/* non std for webkit: */
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
@ -913,9 +911,10 @@ span.eval_title {
|
||||
font-weight: bold;
|
||||
font-size: 14pt;
|
||||
}
|
||||
#saisie_notes span.eval_title {
|
||||
/* border-bottom: 1px solid rgb(100,100,100); */
|
||||
/* #saisie_notes span.eval_title {
|
||||
border-bottom: 1px solid rgb(100,100,100);
|
||||
}
|
||||
*/
|
||||
|
||||
span.jurylink {
|
||||
margin-left: 1.5em;
|
||||
@ -1012,9 +1011,6 @@ h2.formsemestre, .gtrcontent h2 {
|
||||
border-width: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.formsemestre_page_title table.semtitle {
|
||||
/* width: 100%; */
|
||||
}
|
||||
|
||||
.formsemestre_page_title {
|
||||
width: 100%;
|
||||
@ -1058,6 +1054,9 @@ h2.formsemestre, .gtrcontent h2 {
|
||||
#formnotes .tf-ro-field.formnote_bareme {
|
||||
font-weight: bold;
|
||||
}
|
||||
#formnotes td.tf-fieldlabel {
|
||||
border-bottom: 1px dotted #fdcaca;
|
||||
}
|
||||
/*
|
||||
.formsemestre_menubar {
|
||||
border-top: 3px solid #67A7E3;
|
||||
@ -1105,8 +1104,6 @@ h2.formsemestre, .gtrcontent h2 {
|
||||
width : 200px;
|
||||
}
|
||||
|
||||
.sco_dropdown_menu {
|
||||
}
|
||||
.sco_dropdown_menu > li {
|
||||
width : auto; /* 120px !important; */
|
||||
font-size: 12px;
|
||||
@ -1133,10 +1130,6 @@ span.inscr_addremove_menu {
|
||||
font-weight: bold;
|
||||
padding-right: 1px;
|
||||
}
|
||||
.formsemestre_page_title span.lock {
|
||||
|
||||
}
|
||||
|
||||
div.formsemestre_status {
|
||||
-moz-border-radius: 8px;
|
||||
-khtml-border-radius: 8px;
|
||||
@ -1227,10 +1220,6 @@ ul.ue_inscr_list li.etud {
|
||||
border-spacing: 1px;
|
||||
}
|
||||
|
||||
#grouplists td {
|
||||
}
|
||||
|
||||
|
||||
/* Modules */
|
||||
div.moduleimpl_tableaubord {
|
||||
padding: 7px;
|
||||
@ -1264,20 +1253,10 @@ th.moduleimpl_evaluations a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
tr.moduleimpl_evaluation_row {
|
||||
}
|
||||
|
||||
td.moduleimpl_evaluation_row {
|
||||
}
|
||||
|
||||
tr.mievr {
|
||||
background-color:#eeeeee;
|
||||
}
|
||||
|
||||
tr.mievr_spaced {
|
||||
/* margin-top: 20px; */
|
||||
}
|
||||
|
||||
tr.mievr_rattr {
|
||||
background-color:#dddddd;
|
||||
}
|
||||
@ -1575,8 +1554,6 @@ tr.recap_row_min, tr.recap_row_max {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
tr.recap_row_coef {
|
||||
}
|
||||
tr.recap_row_moy {
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -1809,9 +1786,6 @@ div.bulletin_menubar {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.bull_appreciations {
|
||||
}
|
||||
|
||||
.bull_appreciations p {
|
||||
margin: 0;
|
||||
font-style: italic;
|
||||
@ -1867,9 +1841,6 @@ input.note_saved {
|
||||
color: green;
|
||||
}
|
||||
|
||||
input.note {
|
||||
}
|
||||
|
||||
span.history {
|
||||
font-style: italic;
|
||||
}
|
||||
@ -2016,9 +1987,6 @@ td.fvs_val_inf {
|
||||
color: red;
|
||||
}
|
||||
|
||||
td.fvs_chk {
|
||||
}
|
||||
|
||||
td.fvs_tit {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
@ -2274,8 +2242,6 @@ table.recap_hide_details tr.sem_courant td.ue_acro span, table.recap_hide_detail
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
td.rcp_moy {
|
||||
}
|
||||
td.sem_ects_tit {
|
||||
text-align: right;
|
||||
}
|
||||
@ -2308,9 +2274,6 @@ td.ue_cmp {
|
||||
color: green;
|
||||
}
|
||||
|
||||
td.ue {
|
||||
}
|
||||
|
||||
td.ue_capitalized {
|
||||
text-decoration: underline;
|
||||
}
|
||||
@ -2354,9 +2317,6 @@ div.pas_sembox {
|
||||
font-family: arial,verdana,sans-serif;
|
||||
}
|
||||
|
||||
div.pas_empty_sems {
|
||||
}
|
||||
|
||||
span.sp_etape {
|
||||
display: inline-block;
|
||||
width: 4em;
|
||||
@ -2365,10 +2325,6 @@ span.sp_etape {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.inscrit {
|
||||
/* font-weight: bold; */
|
||||
}
|
||||
|
||||
.inscrailleurs {
|
||||
font-weight: bold;
|
||||
color: red !important;
|
||||
@ -2534,9 +2490,6 @@ td.calday {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.cal_evaluations table.monthcalendar td.calcol {
|
||||
}
|
||||
|
||||
div.cal_evaluations table.monthcalendar td.calcell {
|
||||
padding-left: 0.6em;
|
||||
width: 6em;
|
||||
@ -2585,24 +2538,24 @@ div.update_warning_sub {
|
||||
padding-left: 8ex;
|
||||
}
|
||||
|
||||
/* Titres des tabs: */
|
||||
.nav-tabs li a {
|
||||
/* font-variant: small-caps; */
|
||||
/*font-size: 13pt;*/
|
||||
}
|
||||
/*
|
||||
Titres des tabs:
|
||||
.nav-tabs li a {
|
||||
font-variant: small-caps;
|
||||
font-size: 13pt;
|
||||
}
|
||||
|
||||
/*
|
||||
#group-tabs {
|
||||
clear: both;
|
||||
}
|
||||
#group-tabs {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#group-tabs ul {
|
||||
display: inline;
|
||||
}
|
||||
#group-tabs ul {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#group-tabs ul li {
|
||||
display: inline;
|
||||
}
|
||||
#group-tabs ul li {
|
||||
display: inline;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Page accueil */
|
||||
@ -2758,10 +2711,6 @@ div.apo_csv_list {
|
||||
div.apo_compare_csv_form_but {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
div.apo_compare_csv_form_submit {
|
||||
|
||||
|
||||
}
|
||||
div.apo_compare_csv_form_submit input {
|
||||
margin-top: 2ex;
|
||||
@ -2892,12 +2841,9 @@ div#formsemestre_ext_edit_ue_validations {
|
||||
form.tf_ext_edit_ue_validations table {
|
||||
border-collapse: collapse;
|
||||
width: 97%;
|
||||
margin-left: 1em;ext
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
form.tf_ext_edit_ue_validations table, form.tf_ext_edit_ue_validations table th, form.tf_ext_edit_ue_validations table td {
|
||||
/* border: 1px solid black; */
|
||||
}
|
||||
form.tf_ext_edit_ue_validations table th, form.tf_ext_edit_ue_validations table td {
|
||||
border-bottom: 1px solid rgb(168, 168, 168);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user