forked from ScoDoc/DocScoDoc
Fix absences/cal
This commit is contained in:
parent
3d176a945f
commit
c40c806c63
@ -955,7 +955,7 @@ def MonthTableBody(
|
||||
% (bgcolor, weekclass, attrs, d, day)
|
||||
)
|
||||
cc = []
|
||||
for morning in (1, 0):
|
||||
for morning in (True, False):
|
||||
color = None
|
||||
legend = ""
|
||||
href = ""
|
||||
|
@ -74,7 +74,8 @@ def doSignaleAbsence(
|
||||
"""
|
||||
etud = sco_etud.get_etud_info(filled=1, etudid=etudid, REQUEST=REQUEST)[0]
|
||||
etudid = etud["etudid"]
|
||||
|
||||
if not moduleimpl_id:
|
||||
moduleimpl_id = None
|
||||
description_abs = description
|
||||
dates = sco_abs.DateRangeISO(context, datedebut, datefin)
|
||||
nbadded = 0
|
||||
@ -186,7 +187,7 @@ def SignaleAbsenceEtud(context, REQUEST=None): # etudid implied
|
||||
menu_module = """
|
||||
<script type="text/javascript">
|
||||
function form_enable_disable() {
|
||||
if ( $("select#sel_moduleimpl_id").val() == "NULL" ) {
|
||||
if ( $("select#sel_moduleimpl_id").val() == "" ) {
|
||||
$("#butsubmit").prop("disabled", true);
|
||||
} else {
|
||||
$("#butsubmit").prop("disabled", false);
|
||||
@ -203,7 +204,7 @@ def SignaleAbsenceEtud(context, REQUEST=None): # etudid implied
|
||||
menu_module = (
|
||||
"""<p>Module: <select id="sel_moduleimpl_id" name="moduleimpl_id">"""
|
||||
)
|
||||
menu_module += """<option value="NULL" selected>(Module)</option>"""
|
||||
menu_module += """<option value="" selected>(Module)</option>"""
|
||||
|
||||
for ue in ues:
|
||||
modimpls = nt.get_modimpls(ue_id=ue["ue_id"])
|
||||
@ -725,10 +726,10 @@ def CalAbs(context, etudid, sco_year=None):
|
||||
"""Calendrier des absences d'un etudiant"""
|
||||
# crude portage from 1999 DTML
|
||||
REQUEST = None # XXX
|
||||
etud = sco_etud.get_etud_info(filled=1, REQUEST=REQUEST)[0]
|
||||
etud = sco_etud.get_etud_info(filled=1, etudid=etudid, REQUEST=REQUEST)[0]
|
||||
etudid = etud["etudid"]
|
||||
anneescolaire = int(scu.AnneeScolaire(sco_year))
|
||||
datedebut = str(anneescolaire) + "-08-31"
|
||||
datedebut = str(anneescolaire) + "-08-01"
|
||||
datefin = str(anneescolaire + 1) + "-07-31"
|
||||
nbabs = sco_abs.count_abs(etudid=etudid, debut=datedebut, fin=datefin)
|
||||
nbabsjust = sco_abs.count_abs_just(etudid=etudid, debut=datedebut, fin=datefin)
|
||||
@ -815,7 +816,7 @@ def ListeAbsEtud(
|
||||
sco_year: année scolaire à utiliser. Si non spécifier, utilie l'année en cours. e.g. "2005"
|
||||
"""
|
||||
absjust_only = int(absjust_only) # si vrai, table absjust seule (export xls ou pdf)
|
||||
datedebut = "%s-08-31" % scu.AnneeScolaire(sco_year=sco_year)
|
||||
datedebut = "%s-08-01" % scu.AnneeScolaire(sco_year=sco_year)
|
||||
|
||||
etud = sco_etud.get_etud_info(etudid=etudid, filled=True)[0]
|
||||
|
||||
@ -915,7 +916,9 @@ def _TablesAbsEtud(
|
||||
absjust_only=0,
|
||||
REQUEST=None,
|
||||
):
|
||||
"""Tables des absences justifiees et non justifiees d'un étudiant sur l'année en cours"""
|
||||
"""Tables des absences justifiees et non justifiees d'un étudiant
|
||||
sur l'année en cours
|
||||
"""
|
||||
absjust = sco_abs.list_abs_just(etudid=etudid, datedebut=datedebut)
|
||||
absnonjust = sco_abs.list_abs_non_just(etudid=etudid, datedebut=datedebut)
|
||||
# examens ces jours là ?
|
||||
|
@ -467,7 +467,7 @@ def retreive_formsemestre_from_request():
|
||||
group_ids = args.get("group_ids", [])
|
||||
if "formsemestre_id" in args:
|
||||
formsemestre_id = args["formsemestre_id"]
|
||||
elif "moduleimpl_id" in args:
|
||||
elif "moduleimpl_id" in args and args["moduleimpl_id"]:
|
||||
modimpl = sco_moduleimpl.do_moduleimpl_list(
|
||||
context, moduleimpl_id=args["moduleimpl_id"]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user