Merge branch 'master' of https://scodoc.org/git/viennet/ScoDoc into ScoDoc8

This commit is contained in:
Emmanuel Viennet 2021-01-23 22:58:27 +01:00
commit f1ec103b25
6 changed files with 30 additions and 16 deletions

View File

@ -70,6 +70,7 @@ from TrivialFormulator import TrivialFormulator, TF
from gen_tables import GenTable
import scolars
import sco_formsemestre
import sco_moduleimpl
import sco_groups
import sco_groups_view
import sco_excel
@ -547,8 +548,8 @@ class ZAbsences(
desc = a["description"]
if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL":
# Trouver le nom du module
Mlist = self.Notes.do_moduleimpl_withmodule_list(
moduleimpl_id=a["moduleimpl_id"]
Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list(
self.Notes, moduleimpl_id=a["moduleimpl_id"]
)
if Mlist:
M = Mlist[0]
@ -713,8 +714,8 @@ class ZAbsences(
mod_inscrits = set(
[
x["etudid"]
for x in self.Notes.do_moduleimpl_inscription_list(
moduleimpl_id=moduleimpl_id
for x in sco_moduleimpl.do_moduleimpl_inscription_list(
self.Notes, moduleimpl_id=moduleimpl_id
)
]
)
@ -847,8 +848,8 @@ class ZAbsences(
mod_inscrits = set(
[
x["etudid"]
for x in self.Notes.do_moduleimpl_inscription_list(
moduleimpl_id=moduleimpl_id
for x in sco_moduleimpl.do_moduleimpl_inscription_list(
self.Notes, moduleimpl_id=moduleimpl_id
)
]
)
@ -1221,8 +1222,8 @@ class ZAbsences(
return ""
ex = []
for ev in a["evals"]:
mod = self.Notes.do_moduleimpl_withmodule_list(
moduleimpl_id=ev["moduleimpl_id"]
mod = sco_moduleimpl.do_moduleimpl_withmodule_list(
self.Notes, moduleimpl_id=ev["moduleimpl_id"]
)[0]
if format == "html":
ex.append(
@ -1238,8 +1239,8 @@ class ZAbsences(
def descr_abs(a):
ex = []
for ev in a.get("absent", []):
mod = self.Notes.do_moduleimpl_withmodule_list(
moduleimpl_id=ev["moduleimpl_id"]
mod = sco_moduleimpl.do_moduleimpl_withmodule_list(
self.Notes, moduleimpl_id=ev["moduleimpl_id"]
)[0]
if format == "html":
ex.append(

View File

@ -3,6 +3,12 @@
debian_version=$(cat /etc/debian_version)
debian_version=${debian_version%%.*}
die() {
echo
echo "Erreur: $1"
echo
exit 1
}
# Fix path
export PATH="${PATH}":/usr/sbin:/sbin
@ -12,7 +18,8 @@ umask 0022
export SCODOC_DIR=/opt/scodoc/Products/ScoDoc
export SCODOC_VAR_DIR=$(realpath "$SCODOC_DIR/../../var/scodoc")
SCODOC_VAR_DIR=$(realpath -L "$SCODOC_DIR/../../var/scodoc") || die "can't set SCODOC_VAR_DIR"
export SCODOC_VAR_DIR
# = /opt/scodoc/var/scodoc
export SCODOC_VERSION_DIR="${SCODOC_VAR_DIR}/config/version"
export SCODOC_LOGOS_DIR="${SCODOC_VAR_DIR}/config/logos"

View File

@ -82,6 +82,7 @@ then
exit 0
else
echo 'Attention: pas de configuration trouvee pour "'"$DEPT"'"'
echo " fichier cherché: $cfg_pathname"
echo " => ne fait rien."
exit 0
fi

View File

@ -896,8 +896,10 @@ class NotesTable:
sum_coefs_ue = 0
for mu in moy_ues.values():
# mu["moy"] can be a number, or "NA", or "ERR" (user-defined UE formulas)
if isnumber(mu["moy"]) and (
mu["est_inscrit"] or mu["is_capitalized"]
if (
(mu["ue"]["type"] != UE_SPORT)
and isnumber(mu["moy"])
and (mu["est_inscrit"] or mu["is_capitalized"])
):
coef_ue = mu["ue"]["coefficient"]
sum_moy_ue += mu["moy"] * coef_ue

View File

@ -240,8 +240,11 @@ def do_moduleimpl_inscrit_etuds(
# Inscriptions au module:
inmod_set = set(
[
# hum ?
x["etudid"]
for x in context.do_moduleimpl_inscription_list(moduleimpl_id=moduleimpl_id)
for x in do_moduleimpl_inscription_list(
context, moduleimpl_id=moduleimpl_id
)
]
)
for etudid in etudids:

View File

@ -813,8 +813,8 @@ def _pvjury_pdf_type(
"""<para spaceBefore="10mm" align="right">
Le %s, %s</para>"""
% (
context.get_preference("DirectorTitle", formsemestre_id),
context.get_preference("DirectorName", formsemestre_id),
context.get_preference("DirectorTitle", formsemestre_id) or "",
context.get_preference("DirectorName", formsemestre_id) or "",
),
style,
)