diff --git a/app/models/assiduites.py b/app/models/assiduites.py index 908629bdf..e58e6aff2 100644 --- a/app/models/assiduites.py +++ b/app/models/assiduites.py @@ -503,6 +503,7 @@ class Justificatif(ScoDocModel): archiver: JustificatifArchiver = JustificatifArchiver() filenames = archiver.list_justificatifs(archive_name, self.etudiant) accessible_filenames = [] + # for filename in filenames: if int(filename[1]) == current_user.id or current_user.has_permission( Permission.AbsJustifView diff --git a/app/scodoc/sco_archive_formsemestre.py b/app/scodoc/sco_archives_formsemestre.py similarity index 100% rename from app/scodoc/sco_archive_formsemestre.py rename to app/scodoc/sco_archives_formsemestre.py diff --git a/app/scodoc/sco_archives_justificatifs.py b/app/scodoc/sco_archives_justificatifs.py index f2a50a19d..b0fb1d3ea 100644 --- a/app/scodoc/sco_archives_justificatifs.py +++ b/app/scodoc/sco_archives_justificatifs.py @@ -16,7 +16,9 @@ from app import log class Trace: - """gestionnaire de la trace des fichiers justificatifs""" + """gestionnaire de la trace des fichiers justificatifs + XXX TODO à documenter: rôle et format des fichier strace + """ def __init__(self, path: str) -> None: self.path: str = path + "/_trace.csv" @@ -205,6 +207,7 @@ class JustificatifArchiver(BaseArchiver): ) -> list[tuple[str, int]]: """ Retourne la liste des noms de fichiers dans l'archive donnée + avec l'uid de l'utilisateur ayant saisi le fichier. """ filenames: list[str] = [] archive_id = self.get_id_from_name(etud.id, archive_name, dept_id=etud.dept_id) @@ -212,9 +215,8 @@ class JustificatifArchiver(BaseArchiver): filenames = self.list_archive(archive_id, dept_id=etud.dept_id) trace: Trace = Trace(archive_id) traced = trace.get_trace(filenames) - retour = [(key, value[2]) for key, value in traced.items()] - return retour + return [(key, value[2]) for key, value in traced.items()] def get_justificatif_file(self, archive_name: str, etud: Identite, filename: str): """ diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 0d04b9ac7..7254fc275 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -56,12 +56,11 @@ from app.scodoc.sco_utils import ModuleType from app.scodoc.sco_permissions import Permission from app.scodoc.sco_exceptions import ( ScoValueError, - ScoInvalidDateError, ScoInvalidIdType, ) from app.scodoc import html_sco_header from app.scodoc import htmlutils -from app.scodoc import sco_archives +from app.scodoc import sco_archives_formsemestre from app.scodoc import sco_bulletins from app.scodoc import codes_cursus from app.scodoc import sco_compute_moy @@ -454,7 +453,9 @@ def formsemestre_status_menubar(formsemestre: FormSemestre) -> str: "title": "Documents archivés", "endpoint": "notes.formsemestre_list_archives", "args": {"formsemestre_id": formsemestre_id}, - "enabled": sco_archives.PV_ARCHIVER.list_obj_archives(formsemestre_id), + "enabled": sco_archives_formsemestre.PV_ARCHIVER.list_obj_archives( + formsemestre_id + ), }, ] diff --git a/app/static/css/assiduites.css b/app/static/css/assiduites.css index 2df17893a..10a7508a8 100644 --- a/app/static/css/assiduites.css +++ b/app/static/css/assiduites.css @@ -7,6 +7,7 @@ --color-justi-clair: #48f6ff; --color-justi-attente: yellow; --color-justi-attente-stripe: #29b990; /* pink #fa25cb; */ /* #789dbb;*/ + --color-justi-modifie: rgb(255, 230, 0); --color-justi-invalide: #a84476; --color-nonwork: #badfff; @@ -694,6 +695,9 @@ tr.row-justificatif.valide td.assi-type { tr.row-justificatif.attente td.assi-type { background-color: var(--color-justi-attente); } +tr.row-justificatif.modifie td.assi-type { + background-color: var(--color-justi-modifie); +} tr.row-justificatif.non_valide td.assi-type { background-color: var(--color-justi-invalide); } diff --git a/app/templates/assiduites/explication_etats_justifs.j2 b/app/templates/assiduites/explication_etats_justifs.j2 new file mode 100644 index 000000000..3c1f0903f --- /dev/null +++ b/app/templates/assiduites/explication_etats_justifs.j2 @@ -0,0 +1,59 @@ +{# Explication des états des justificatifs #} + +