forked from ScoDoc/ScoDoc
migration en cours
This commit is contained in:
parent
597b83e6a4
commit
ede5aa680d
@ -1205,7 +1205,7 @@ class NotesTable:
|
|||||||
and moy_ue_cap >= self.parcours.NOTES_BARRE_VALID_UE
|
and moy_ue_cap >= self.parcours.NOTES_BARRE_VALID_UE
|
||||||
):
|
):
|
||||||
if not cnx:
|
if not cnx:
|
||||||
cnx = self.context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
sco_parcours_dut.do_formsemestre_validate_ue(
|
sco_parcours_dut.do_formsemestre_validate_ue(
|
||||||
cnx,
|
cnx,
|
||||||
nt_cap,
|
nt_cap,
|
||||||
|
@ -437,7 +437,7 @@ def GetAbsDescription(context, a, cursor=None):
|
|||||||
if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL":
|
if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL":
|
||||||
# Trouver le nom du module
|
# Trouver le nom du module
|
||||||
Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list(
|
Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list(
|
||||||
context.Notes, moduleimpl_id=a["moduleimpl_id"]
|
context, moduleimpl_id=a["moduleimpl_id"]
|
||||||
)
|
)
|
||||||
if Mlist:
|
if Mlist:
|
||||||
M = Mlist[0]
|
M = Mlist[0]
|
||||||
@ -1055,8 +1055,8 @@ def invalidateAbsEtudDate(context, etudid, date):
|
|||||||
True # efface toujours le PDF car il affiche en général les absences
|
True # efface toujours le PDF car il affiche en général les absences
|
||||||
)
|
)
|
||||||
|
|
||||||
context.Notes._inval_cache(
|
sco_core.inval_cache(
|
||||||
pdfonly=pdfonly, formsemestre_id=sem["formsemestre_id"]
|
context, pdfonly=pdfonly, formsemestre_id=sem["formsemestre_id"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Inval cache compteurs absences:
|
# Inval cache compteurs absences:
|
||||||
|
@ -62,7 +62,7 @@ def abs_notify(context, etudid, date):
|
|||||||
debut_sem = ndb.DateDMYtoISO(sem["date_debut"])
|
debut_sem = ndb.DateDMYtoISO(sem["date_debut"])
|
||||||
fin_sem = ndb.DateDMYtoISO(sem["date_fin"])
|
fin_sem = ndb.DateDMYtoISO(sem["date_fin"])
|
||||||
nbabs = sco_abs.CountAbs(context, etudid, debut=debut_sem, fin=fin_sem)
|
nbabs = sco_abs.CountAbs(context, etudid, debut=debut_sem, fin=fin_sem)
|
||||||
nbabsjust = context.CountAbsJust(etudid, debut=debut_sem, fin=fin_sem)
|
nbabsjust = sco_abs.CountAbsJust(context, etudid, debut=debut_sem, fin=fin_sem)
|
||||||
|
|
||||||
do_abs_notify(context, sem, etudid, date, nbabs, nbabsjust)
|
do_abs_notify(context, sem, etudid, date, nbabs, nbabsjust)
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ def CalAbs(context, REQUEST=None): # etud implied
|
|||||||
datedebut = str(anneescolaire) + "-08-31"
|
datedebut = str(anneescolaire) + "-08-31"
|
||||||
datefin = str(anneescolaire + 1) + "-07-31"
|
datefin = str(anneescolaire + 1) + "-07-31"
|
||||||
nbabs = sco_abs.CountAbs(context, etudid=etudid, debut=datedebut, fin=datefin)
|
nbabs = sco_abs.CountAbs(context, etudid=etudid, debut=datedebut, fin=datefin)
|
||||||
nbabsjust = context.CountAbsJust(etudid=etudid, debut=datedebut, fin=datefin)
|
nbabsjust = sco_abs.CountAbsJust(context, etudid=etudid, debut=datedebut, fin=datefin)
|
||||||
events = []
|
events = []
|
||||||
for a in sco_abs.ListeAbsJust(context, etudid=etudid, datedebut=datedebut):
|
for a in sco_abs.ListeAbsJust(context, etudid=etudid, datedebut=datedebut):
|
||||||
events.append(
|
events.append(
|
||||||
|
@ -360,7 +360,7 @@ def _write_formsemestre_aux(context, sem, fieldname, valuename):
|
|||||||
# uniquify
|
# uniquify
|
||||||
values = set([str(x) for x in sem[fieldname]])
|
values = set([str(x) for x in sem[fieldname]])
|
||||||
|
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
||||||
tablename = "notes_formsemestre_" + fieldname
|
tablename = "notes_formsemestre_" + fieldname
|
||||||
try:
|
try:
|
||||||
|
@ -968,7 +968,7 @@ def formsemestre_fix_validation_ues(context, formsemestre_id, REQUEST=None):
|
|||||||
) # > get_etudids, get_etud_decision_sem, get_ues, get_etud_decision_ues, get_etud_ue_status
|
) # > get_etudids, get_etud_decision_sem, get_ues, get_etud_decision_ues, get_etud_ue_status
|
||||||
etudids = nt.get_etudids()
|
etudids = nt.get_etudids()
|
||||||
modifs = [] # liste d'étudiants modifiés
|
modifs = [] # liste d'étudiants modifiés
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
for etudid in etudids:
|
for etudid in etudids:
|
||||||
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
||||||
Se = sco_parcours_dut.SituationEtudParcours(context, etud, formsemestre_id)
|
Se = sco_parcours_dut.SituationEtudParcours(context, etud, formsemestre_id)
|
||||||
@ -1046,7 +1046,7 @@ def formsemestre_fix_validation_ues(context, formsemestre_id, REQUEST=None):
|
|||||||
def formsemestre_validation_suppress_etud(context, formsemestre_id, etudid):
|
def formsemestre_validation_suppress_etud(context, formsemestre_id, etudid):
|
||||||
"""Suppression des decisions de jury pour un etudiant."""
|
"""Suppression des decisions de jury pour un etudiant."""
|
||||||
log("formsemestre_validation_suppress_etud( %s, %s)" % (formsemestre_id, etudid))
|
log("formsemestre_validation_suppress_etud( %s, %s)" % (formsemestre_id, etudid))
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
||||||
args = {"formsemestre_id": formsemestre_id, "etudid": etudid}
|
args = {"formsemestre_id": formsemestre_id, "etudid": etudid}
|
||||||
try:
|
try:
|
||||||
@ -1228,7 +1228,7 @@ def do_formsemestre_validate_previous_ue(
|
|||||||
cette UE (utile seulement pour les semestres extérieurs).
|
cette UE (utile seulement pour les semestres extérieurs).
|
||||||
"""
|
"""
|
||||||
sem = sco_formsemestre.get_formsemestre(context, formsemestre_id)
|
sem = sco_formsemestre.get_formsemestre(context, formsemestre_id)
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
nt = sco_core.get_notes_cache(context).get_NotesTable(
|
nt = sco_core.get_notes_cache(context).get_NotesTable(
|
||||||
context, formsemestre_id
|
context, formsemestre_id
|
||||||
) # > get_etud_ue_status
|
) # > get_etud_ue_status
|
||||||
|
@ -269,7 +269,7 @@ def scolars_import_excel_file(
|
|||||||
et les inscrit dans le semestre indiqué (et à TOUS ses modules)
|
et les inscrit dans le semestre indiqué (et à TOUS ses modules)
|
||||||
"""
|
"""
|
||||||
log("scolars_import_excel_file: formsemestre_id=%s" % formsemestre_id)
|
log("scolars_import_excel_file: formsemestre_id=%s" % formsemestre_id)
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
||||||
annee_courante = time.localtime()[0]
|
annee_courante = time.localtime()[0]
|
||||||
always_require_ine = sco_preferences.get_preference(context, "always_require_ine")
|
always_require_ine = sco_preferences.get_preference(context, "always_require_ine")
|
||||||
@ -495,6 +495,35 @@ def scolars_import_excel_file(
|
|||||||
return diag
|
return diag
|
||||||
|
|
||||||
|
|
||||||
|
def students_import_admission(
|
||||||
|
context, csvfile, type_admission="", REQUEST=None, formsemestre_id=None
|
||||||
|
):
|
||||||
|
"import donnees admission from Excel file (v2016)"
|
||||||
|
diag = scolars_import_admission(
|
||||||
|
csvfile,
|
||||||
|
context,
|
||||||
|
REQUEST,
|
||||||
|
formsemestre_id=formsemestre_id,
|
||||||
|
type_admission=type_admission,
|
||||||
|
)
|
||||||
|
if REQUEST:
|
||||||
|
H = [
|
||||||
|
html_sco_header.sco_header(
|
||||||
|
context, REQUEST, page_title="Import données admissions"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
H.append("<p>Import terminé !</p>")
|
||||||
|
H.append(
|
||||||
|
'<p><a class="stdlink" href="%s">Continuer</a></p>'
|
||||||
|
% "formsemestre_status?formsemestre_id=%s"
|
||||||
|
% formsemestre_id
|
||||||
|
)
|
||||||
|
if diag:
|
||||||
|
H.append("<p>Diagnostic: <ul><li>%s</li></ul></p>" % "</li><li>".join(diag))
|
||||||
|
|
||||||
|
return "\n".join(H) + html_sco_header.sco_footer(REQUEST)
|
||||||
|
|
||||||
|
|
||||||
def _import_one_student(
|
def _import_one_student(
|
||||||
context,
|
context,
|
||||||
cnx,
|
cnx,
|
||||||
|
@ -543,7 +543,7 @@ class SituationEtudParcoursGeneric:
|
|||||||
"""Enregistre la decision (instance de DecisionSem)
|
"""Enregistre la decision (instance de DecisionSem)
|
||||||
Enregistre codes semestre et UE, et autorisations inscription.
|
Enregistre codes semestre et UE, et autorisations inscription.
|
||||||
"""
|
"""
|
||||||
cnx = self.context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
# -- check
|
# -- check
|
||||||
if decision.code_etat in self.parcours.UNUSED_CODES:
|
if decision.code_etat in self.parcours.UNUSED_CODES:
|
||||||
raise ScoValueError("code decision invalide dans ce parcours")
|
raise ScoValueError("code decision invalide dans ce parcours")
|
||||||
@ -909,7 +909,7 @@ def formsemestre_validate_ues(
|
|||||||
Les UE des semestres NON ASSIDUS ne sont jamais validées (code AJ).
|
Les UE des semestres NON ASSIDUS ne sont jamais validées (code AJ).
|
||||||
"""
|
"""
|
||||||
valid_semestre = CODES_SEM_VALIDES.get(code_etat_sem, False)
|
valid_semestre = CODES_SEM_VALIDES.get(code_etat_sem, False)
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
nt = sco_core.get_notes_cache(context).get_NotesTable(
|
nt = sco_core.get_notes_cache(context).get_NotesTable(
|
||||||
context, formsemestre_id
|
context, formsemestre_id
|
||||||
) # > get_ues, get_etud_ue_status
|
) # > get_ues, get_etud_ue_status
|
||||||
|
@ -472,7 +472,7 @@ def _notes_add(context, uid, evaluation_id, notes, comment=None, do_it=True):
|
|||||||
# Recherche notes existantes
|
# Recherche notes existantes
|
||||||
NotesDB = sco_evaluations.do_evaluation_get_all_notes(context, evaluation_id)
|
NotesDB = sco_evaluations.do_evaluation_get_all_notes(context, evaluation_id)
|
||||||
# Met a jour la base
|
# Met a jour la base
|
||||||
cnx = context.GetDBConnexion(autocommit=False)
|
cnx = ndb.GetDBConnexion(autocommit=False)
|
||||||
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
cursor = cnx.cursor(cursor_factory=ndb.ScoDocCursor)
|
||||||
nb_changed = 0
|
nb_changed = 0
|
||||||
nb_suppress = 0
|
nb_suppress = 0
|
||||||
|
@ -765,8 +765,8 @@ def EtatAbsencesGr(
|
|||||||
nbabs = sco_abs.CountAbs(
|
nbabs = sco_abs.CountAbs(
|
||||||
context, etudid=etud["etudid"], debut=datedebut, fin=datefin
|
context, etudid=etud["etudid"], debut=datedebut, fin=datefin
|
||||||
)
|
)
|
||||||
nbabsjust = context.CountAbsJust(
|
nbabsjust = sco_abs.CountAbsJust(
|
||||||
etudid=etud["etudid"], debut=datedebut, fin=datefin
|
context, etudid=etud["etudid"], debut=datedebut, fin=datefin
|
||||||
)
|
)
|
||||||
nbjustifs_noabs = len(
|
nbjustifs_noabs = len(
|
||||||
sco_abs.ListeJustifs(
|
sco_abs.ListeJustifs(
|
||||||
@ -918,11 +918,11 @@ def EtatAbsencesDate(
|
|||||||
)
|
)
|
||||||
if (nbabsam != 0) or (nbabspm != 0):
|
if (nbabsam != 0) or (nbabspm != 0):
|
||||||
nbetud += 1
|
nbetud += 1
|
||||||
nbabsjustam = context.CountAbsJust(
|
nbabsjustam = sco_abs.CountAbsJust(
|
||||||
etudid=etud["etudid"], debut=dateiso, fin=dateiso, matin=1
|
context, etudid=etud["etudid"], debut=dateiso, fin=dateiso, matin=1
|
||||||
)
|
)
|
||||||
nbabsjustpm = context.CountAbsJust(
|
nbabsjustpm = sco_abs.CountAbsJust(
|
||||||
etudid=etud["etudid"], debut=dateiso, fin=dateiso, matin=0
|
context, etudid=etud["etudid"], debut=dateiso, fin=dateiso, matin=0
|
||||||
)
|
)
|
||||||
H.append(
|
H.append(
|
||||||
"""<tr bgcolor="#FFFFFF"><td>
|
"""<tr bgcolor="#FFFFFF"><td>
|
||||||
@ -1210,7 +1210,8 @@ def deleteBilletAbsence(context, billet_id, REQUEST=None, dialog_confirmed=False
|
|||||||
)
|
)
|
||||||
if not dialog_confirmed:
|
if not dialog_confirmed:
|
||||||
tab = _tableBillets(context, billets)
|
tab = _tableBillets(context, billets)
|
||||||
return context.confirmDialog(
|
return scu.confirm_dialog(
|
||||||
|
context,
|
||||||
"""<h2>Supprimer ce billet ?</h2>""" + tab.html(),
|
"""<h2>Supprimer ce billet ?</h2>""" + tab.html(),
|
||||||
dest_url="",
|
dest_url="",
|
||||||
REQUEST=REQUEST,
|
REQUEST=REQUEST,
|
||||||
|
@ -73,7 +73,7 @@ def sidebar(context, REQUEST):
|
|||||||
"barre gauche (overide std sco sidebar)"
|
"barre gauche (overide std sco sidebar)"
|
||||||
# rewritten from legacy DTML code
|
# rewritten from legacy DTML code
|
||||||
# XXX rare cas restant d'utilisation de l'acquisition Zope2: à revoir
|
# XXX rare cas restant d'utilisation de l'acquisition Zope2: à revoir
|
||||||
params = {"ScoURL": context.ScoURL()}
|
params = {"ScoURL": scu.ScoURL()}
|
||||||
H = [
|
H = [
|
||||||
"""<div id="sidebar-container">
|
"""<div id="sidebar-container">
|
||||||
<div class="sidebar">""",
|
<div class="sidebar">""",
|
||||||
@ -285,7 +285,7 @@ def entreprise_contact_list(context, entreprise_id=None, format="html", REQUEST=
|
|||||||
c["etud"] = context.getEtudInfo(etudid=c["etudid"], filled=1)[0]
|
c["etud"] = context.getEtudInfo(etudid=c["etudid"], filled=1)[0]
|
||||||
c["etudnom"] = c["etud"]["nomprenom"]
|
c["etudnom"] = c["etud"]["nomprenom"]
|
||||||
c["_etudnom_target"] = "%s/ficheEtud?etudid=%s" % (
|
c["_etudnom_target"] = "%s/ficheEtud?etudid=%s" % (
|
||||||
context.ScoURL(),
|
scu.ScoURL(),
|
||||||
c["etudid"],
|
c["etudid"],
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -1012,7 +1012,7 @@ def entreprise_delete(context, entreprise_id, REQUEST=None):
|
|||||||
for c in Cts:
|
for c in Cts:
|
||||||
H.append("""<li>%(date)s %(description)s</li>""" % c)
|
H.append("""<li>%(date)s %(description)s</li>""" % c)
|
||||||
H.append("""</ul>""")
|
H.append("""</ul>""")
|
||||||
tf = context.TrivialFormulator(
|
tf = TrivialFormulator(
|
||||||
REQUEST.URL0,
|
REQUEST.URL0,
|
||||||
REQUEST.form,
|
REQUEST.form,
|
||||||
(("entreprise_id", {"input_type": "hidden"}),),
|
(("entreprise_id", {"input_type": "hidden"}),),
|
||||||
@ -1290,7 +1290,7 @@ def entreprise_edit(context, entreprise_id, REQUEST=None, start=1):
|
|||||||
etud = etud[0]
|
etud = etud[0]
|
||||||
H.append(
|
H.append(
|
||||||
"""<a href="%s/ficheEtud?etudid=%s">%s</a>"""
|
"""<a href="%s/ficheEtud?etudid=%s">%s</a>"""
|
||||||
% (context.ScoURL(), c["etudid"], etud["nomprenom"])
|
% (scu.ScoURL(), c["etudid"], etud["nomprenom"])
|
||||||
)
|
)
|
||||||
if c["description"]:
|
if c["description"]:
|
||||||
H.append("(%s)" % c["description"])
|
H.append("(%s)" % c["description"])
|
||||||
|
@ -847,7 +847,7 @@ def edit_moduleimpl_resp(context, REQUEST, moduleimpl_id):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_expr_help = """<p class="help">Expérimental: formule de calcul de la moyenne %(target)s</p>
|
_EXPR_HELP = """<p class="help">Expérimental: formule de calcul de la moyenne %(target)s</p>
|
||||||
<p class="help">Attention: l'utilisation de formules ralenti considérablement
|
<p class="help">Attention: l'utilisation de formules ralenti considérablement
|
||||||
les traitements. A utiliser uniquement dans els cas ne pouvant pas être traités autrement.</p>
|
les traitements. A utiliser uniquement dans els cas ne pouvant pas être traités autrement.</p>
|
||||||
<p class="help">Dans la formule, les variables suivantes sont définies:</p>
|
<p class="help">Dans la formule, les variables suivantes sont définies:</p>
|
||||||
@ -885,7 +885,7 @@ def edit_moduleimpl_expr(context, REQUEST, moduleimpl_id):
|
|||||||
% (moduleimpl_id, M["module"]["titre"]),
|
% (moduleimpl_id, M["module"]["titre"]),
|
||||||
sem,
|
sem,
|
||||||
),
|
),
|
||||||
context._expr_help
|
_EXPR_HELP
|
||||||
% {
|
% {
|
||||||
"target": "du module",
|
"target": "du module",
|
||||||
"objs": "évaluations",
|
"objs": "évaluations",
|
||||||
@ -1041,7 +1041,7 @@ def edit_ue_expr(context, REQUEST, formsemestre_id, ue_id):
|
|||||||
% (ue["acronyme"], ue["titre"]),
|
% (ue["acronyme"], ue["titre"]),
|
||||||
sem,
|
sem,
|
||||||
),
|
),
|
||||||
context._expr_help % {"target": "de l'UE", "objs": "modules", "ordre": ""},
|
_EXPR_HELP % {"target": "de l'UE", "objs": "modules", "ordre": ""},
|
||||||
]
|
]
|
||||||
el = sco_compute_moy.formsemestre_ue_computation_expr_list(
|
el = sco_compute_moy.formsemestre_ue_computation_expr_list(
|
||||||
cnx, {"formsemestre_id": formsemestre_id, "ue_id": ue_id}
|
cnx, {"formsemestre_id": formsemestre_id, "ue_id": ue_id}
|
||||||
@ -1636,6 +1636,7 @@ def formsemestre_bulletins_mailetuds_choice(
|
|||||||
):
|
):
|
||||||
"""Choix version puis envois classeur bulletins pdf"""
|
"""Choix version puis envois classeur bulletins pdf"""
|
||||||
if version:
|
if version:
|
||||||
|
# XXX devrait plutôt utiliser un redirect #sco8
|
||||||
return context.formsemestre_bulletins_mailetuds(
|
return context.formsemestre_bulletins_mailetuds(
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
REQUEST,
|
REQUEST,
|
||||||
@ -2451,10 +2452,10 @@ def check_integrity_all(context, REQUEST=None):
|
|||||||
for F in sco_formations.formation_list(
|
for F in sco_formations.formation_list(
|
||||||
context,
|
context,
|
||||||
):
|
):
|
||||||
context.check_form_integrity(F["formation_id"], REQUEST=REQUEST)
|
check_form_integrity(context, F["formation_id"], REQUEST=REQUEST)
|
||||||
# semestres
|
# semestres
|
||||||
for sem in sco_formsemestre.do_formsemestre_list(context):
|
for sem in sco_formsemestre.do_formsemestre_list(context):
|
||||||
context.check_formsemestre_integrity(sem["formsemestre_id"], REQUEST=REQUEST)
|
check_formsemestre_integrity(context, sem["formsemestre_id"], REQUEST=REQUEST)
|
||||||
return (
|
return (
|
||||||
html_sco_header.sco_header(context, REQUEST=REQUEST)
|
html_sco_header.sco_header(context, REQUEST=REQUEST)
|
||||||
+ "<p>empty page: see logs and mails</p>"
|
+ "<p>empty page: see logs and mails</p>"
|
||||||
|
@ -757,7 +757,8 @@ def formSuppressPhoto(context, etudid=None, REQUEST=None, dialog_confirmed=False
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def formDem(context, etudid, formsemestre_id, REQUEST):
|
def formDem(context, etudid, formsemestre_id, REQUEST):
|
||||||
"Formulaire Démission Etudiant"
|
"Formulaire Démission Etudiant"
|
||||||
return context._formDem_of_Def(
|
return _formDem_of_Def(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
REQUEST=REQUEST,
|
REQUEST=REQUEST,
|
||||||
@ -771,7 +772,8 @@ def formDem(context, etudid, formsemestre_id, REQUEST):
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def formDef(context, etudid, formsemestre_id, REQUEST):
|
def formDef(context, etudid, formsemestre_id, REQUEST):
|
||||||
"Formulaire Défaillance Etudiant"
|
"Formulaire Défaillance Etudiant"
|
||||||
return context._formDem_of_Def(
|
return _formDem_of_Def(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
REQUEST=REQUEST,
|
REQUEST=REQUEST,
|
||||||
@ -833,7 +835,8 @@ def _formDem_of_Def(
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def doDemEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=None):
|
def doDemEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=None):
|
||||||
"Déclare la démission d'un etudiant dans le semestre"
|
"Déclare la démission d'un etudiant dans le semestre"
|
||||||
return context._doDem_or_Def_Etudiant(
|
return _do_dem_or_def_etud(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
event_date=event_date,
|
event_date=event_date,
|
||||||
@ -849,7 +852,8 @@ def doDemEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=Non
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def doDefEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=None):
|
def doDefEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=None):
|
||||||
"Déclare la défaillance d'un etudiant dans le semestre"
|
"Déclare la défaillance d'un etudiant dans le semestre"
|
||||||
return context._doDem_or_Def_Etudiant(
|
return _do_dem_or_def_etud(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
event_date=event_date,
|
event_date=event_date,
|
||||||
@ -860,7 +864,7 @@ def doDefEtudiant(context, etudid, formsemestre_id, event_date=None, REQUEST=Non
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _doDem_or_Def_Etudiant(
|
def _do_dem_or_def_etud(
|
||||||
context,
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
@ -909,7 +913,8 @@ def doCancelDem(
|
|||||||
context, etudid, formsemestre_id, dialog_confirmed=False, args=None, REQUEST=None
|
context, etudid, formsemestre_id, dialog_confirmed=False, args=None, REQUEST=None
|
||||||
):
|
):
|
||||||
"Annule une démission"
|
"Annule une démission"
|
||||||
return context._doCancelDem_or_Def(
|
return _do_cancel_dem_or_def(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
dialog_confirmed=dialog_confirmed,
|
dialog_confirmed=dialog_confirmed,
|
||||||
@ -930,7 +935,8 @@ def doCancelDef(
|
|||||||
context, etudid, formsemestre_id, dialog_confirmed=False, args=None, REQUEST=None
|
context, etudid, formsemestre_id, dialog_confirmed=False, args=None, REQUEST=None
|
||||||
):
|
):
|
||||||
"Annule la défaillance de l'étudiant"
|
"Annule la défaillance de l'étudiant"
|
||||||
return context._doCancelDem_or_Def(
|
return _do_cancel_dem_or_def(
|
||||||
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
dialog_confirmed=dialog_confirmed,
|
dialog_confirmed=dialog_confirmed,
|
||||||
@ -944,7 +950,7 @@ def doCancelDef(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _doCancelDem_or_Def(
|
def _do_cancel_dem_or_def(
|
||||||
context,
|
context,
|
||||||
etudid,
|
etudid,
|
||||||
formsemestre_id,
|
formsemestre_id,
|
||||||
@ -1010,7 +1016,7 @@ def _doCancelDem_or_Def(
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def etudident_create_form(context, REQUEST=None):
|
def etudident_create_form(context, REQUEST=None):
|
||||||
"formulaire creation individuelle etudiant"
|
"formulaire creation individuelle etudiant"
|
||||||
return context._etudident_create_or_edit_form(REQUEST, edit=False)
|
return _etudident_create_or_edit_form(context, REQUEST, edit=False)
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/etudident_edit_form")
|
@bp.route("/etudident_edit_form")
|
||||||
@ -1018,7 +1024,7 @@ def etudident_create_form(context, REQUEST=None):
|
|||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
def etudident_edit_form(context, REQUEST=None):
|
def etudident_edit_form(context, REQUEST=None):
|
||||||
"formulaire edition individuelle etudiant"
|
"formulaire edition individuelle etudiant"
|
||||||
return context._etudident_create_or_edit_form(REQUEST, edit=True)
|
return _etudident_create_or_edit_form(context, REQUEST, edit=True)
|
||||||
|
|
||||||
|
|
||||||
def _etudident_create_or_edit_form(context, REQUEST, edit):
|
def _etudident_create_or_edit_form(context, REQUEST, edit):
|
||||||
@ -1904,7 +1910,8 @@ def form_students_import_infos_admissions(context, REQUEST, formsemestre_id=None
|
|||||||
scu.ScoURL() + "/formsemestre_status?formsemestre_id=" + formsemestre_id
|
scu.ScoURL() + "/formsemestre_status?formsemestre_id=" + formsemestre_id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return context._students_import_admission(
|
return sco_import_etuds.students_import_admission(
|
||||||
|
context,
|
||||||
tf[2]["csvfile"],
|
tf[2]["csvfile"],
|
||||||
type_admission=tf[2]["type_admission"],
|
type_admission=tf[2]["type_admission"],
|
||||||
REQUEST=REQUEST,
|
REQUEST=REQUEST,
|
||||||
@ -1912,36 +1919,6 @@ def form_students_import_infos_admissions(context, REQUEST, formsemestre_id=None
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# unpublished
|
|
||||||
def _students_import_admission(
|
|
||||||
context, csvfile, type_admission="", REQUEST=None, formsemestre_id=None
|
|
||||||
):
|
|
||||||
"import donnees admission from Excel file (v2016)"
|
|
||||||
diag = sco_import_etuds.scolars_import_admission(
|
|
||||||
csvfile,
|
|
||||||
context,
|
|
||||||
REQUEST,
|
|
||||||
formsemestre_id=formsemestre_id,
|
|
||||||
type_admission=type_admission,
|
|
||||||
)
|
|
||||||
if REQUEST:
|
|
||||||
H = [
|
|
||||||
html_sco_header.sco_header(
|
|
||||||
context, REQUEST, page_title="Import données admissions"
|
|
||||||
)
|
|
||||||
]
|
|
||||||
H.append("<p>Import terminé !</p>")
|
|
||||||
H.append(
|
|
||||||
'<p><a class="stdlink" href="%s">Continuer</a></p>'
|
|
||||||
% "formsemestre_status?formsemestre_id=%s"
|
|
||||||
% formsemestre_id
|
|
||||||
)
|
|
||||||
if diag:
|
|
||||||
H.append("<p>Diagnostic: <ul><li>%s</li></ul></p>" % "</li><li>".join(diag))
|
|
||||||
|
|
||||||
return "\n".join(H) + html_sco_header.sco_footer(REQUEST)
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/formsemestre_import_etud_admission")
|
@bp.route("/formsemestre_import_etud_admission")
|
||||||
@permission_required(Permission.ScoEtudChangeAdr)
|
@permission_required(Permission.ScoEtudChangeAdr)
|
||||||
@scodoc7func(context)
|
@scodoc7func(context)
|
||||||
|
Loading…
Reference in New Issue
Block a user