From be92c86baf6bb61cb0ea7e7465b0528bb094f330 Mon Sep 17 00:00:00 2001
From: Emmanuel Viennet
Date: Thu, 2 Jun 2022 11:37:13 +0200
Subject: [PATCH] cosmetic
---
app/scodoc/sco_evaluations.py | 14 ++++++++------
app/scodoc/sco_moduleimpl_status.py | 6 +++++-
app/scodoc/sco_saisie_notes.py | 4 +++-
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/app/scodoc/sco_evaluations.py b/app/scodoc/sco_evaluations.py
index 6152e8810..09bf21024 100644
--- a/app/scodoc/sco_evaluations.py
+++ b/app/scodoc/sco_evaluations.py
@@ -606,12 +606,10 @@ def formsemestre_evaluations_delai_correction(formsemestre_id, format="html"):
# -------------- VIEWS
-def evaluation_describe(evaluation_id="", edit_in_place=True):
+def evaluation_describe(evaluation_id="", edit_in_place=True, link_saisie=True):
"""HTML description of evaluation, for page headers
edit_in_place: allow in-place editing when permitted (not implemented)
"""
- from app.scodoc import sco_saisie_notes
-
E = sco_evaluation_db.do_evaluation_list({"evaluation_id": evaluation_id})[0]
moduleimpl_id = E["moduleimpl_id"]
M = sco_moduleimpl.moduleimpl_list(moduleimpl_id=moduleimpl_id)[0]
@@ -646,7 +644,7 @@ def evaluation_describe(evaluation_id="", edit_in_place=True):
if Mod["module_type"] == ModuleType.MALUS:
etit += ' (points de malus)'
H = [
- 'Evaluation%sModule : %s
'
+ 'Évaluation%sModule : %s
'
% (etit, mod_descr)
]
if Mod["module_type"] == ModuleType.MALUS:
@@ -689,12 +687,16 @@ def evaluation_describe(evaluation_id="", edit_in_place=True):
modifier l'évaluation
-
+ """
+ )
+ if link_saisie:
+ H.append(
+ f"""
saisie des notes
"""
- )
+ )
H.append("
")
return '' + "\n".join(H) + "
"
diff --git a/app/scodoc/sco_moduleimpl_status.py b/app/scodoc/sco_moduleimpl_status.py
index d6def3697..b9e6a3ee0 100644
--- a/app/scodoc/sco_moduleimpl_status.py
+++ b/app/scodoc/sco_moduleimpl_status.py
@@ -277,7 +277,11 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
if modimpl.module.is_apc():
H.append(_ue_coefs_html(modimpl.module.ue_coefs_list()))
else:
- H.append(f"Coef. dans le semestre: {modimpl.module.coefficient}")
+ H.append(
+ f"""Coef. dans le semestre: {
+ "non défini" if modimpl.module.coefficient is None else modimpl.module.coefficient
+ }"""
+ )
H.append(""" | """)
# 3ieme ligne: Formation
H.append(
diff --git a/app/scodoc/sco_saisie_notes.py b/app/scodoc/sco_saisie_notes.py
index 733ef1730..e75977359 100644
--- a/app/scodoc/sco_saisie_notes.py
+++ b/app/scodoc/sco_saisie_notes.py
@@ -943,7 +943,9 @@ def saisie_notes(evaluation_id, group_ids=[]):
cssstyles=sco_groups_view.CSSSTYLES,
init_qtip=True,
),
- sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
+ sco_evaluations.evaluation_describe(
+ evaluation_id=evaluation_id, link_saisie=False
+ ),
'Saisie des notes',
]
H.append("""