From b01a4dff1305605889ec1e34165158e421422651 Mon Sep 17 00:00:00 2001 From: viennet Date: Wed, 14 Oct 2020 15:28:09 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20nom=20dans=20PV=20archiv=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZScolar.py | 28 +++++++++++----------------- sco_archives.py | 17 ++++++++--------- sco_formsemestre_status.py | 30 ++++++++++++++++-------------- 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/ZScolar.py b/ZScolar.py index 4a536358..d47a3060 100644 --- a/ZScolar.py +++ b/ZScolar.py @@ -424,8 +424,7 @@ UE11 Découverte métiers (code UCOD46, 16 ECTS, Apo (code UCOD46, 16 ECTS, Apo (code UCOD46, 16 ECTS, Apo (code UCOD46, 16 ECTS, Apo (code UCOD46, 16 ECTS, Apo Erreur !", "

", msg, "

"] if DeptId: H.append( diff --git a/sco_archives.py b/sco_archives.py index d6f31c63..9f6274af 100644 --- a/sco_archives.py +++ b/sco_archives.py @@ -190,7 +190,7 @@ class BaseArchiver: return archive_id def store(self, archive_id, filename, data): - """Store data in archive, under given filename. + """Store data in archive, under given filename. Filename may be modified (sanitized): return used filename The file is created or replaced. """ @@ -216,8 +216,7 @@ class BaseArchiver: return open(fname).read() def get_archived_file(self, context, REQUEST, oid, archive_name, filename): - """Recupere donnees du fichier indiqué et envoie au client - """ + """Recupere donnees du fichier indiqué et envoie au client""" # XXX très incomplet: devrait inférer et assigner un type MIME archive_id = self.get_id_from_name(context, oid, archive_name) data = self.get(archive_id, filename) @@ -260,6 +259,7 @@ def do_formsemestre_archive( numeroArrete=None, VDICode=None, showTitle=False, + with_paragraph_nom=False, anonymous=False, bulVersion="long", ): @@ -348,6 +348,7 @@ def do_formsemestre_archive( numeroArrete=numeroArrete, VDICode=VDICode, showTitle=showTitle, + with_paragraph_nom=with_paragraph_nom, anonymous=anonymous, ) if data: @@ -467,6 +468,7 @@ enregistrés et non modifiables, on peut les retrouver ultérieurement. numeroArrete=tf[2]["numeroArrete"], VDICode=tf[2]["VDICode"], showTitle=tf[2]["showTitle"], + with_paragraph_nom=tf[2]["with_paragraph_nom"], anonymous=tf[2]["anonymous"], bulVersion=tf[2]["bulVersion"], ) @@ -480,8 +482,7 @@ enregistrés et non modifiables, on peut les retrouver ultérieurement. def formsemestre_list_archives(context, REQUEST, formsemestre_id): - """Page listing archives - """ + """Page listing archives""" L = [] for archive_id in PVArchive.list_obj_archives(context, formsemestre_id): a = { @@ -525,8 +526,7 @@ def formsemestre_list_archives(context, REQUEST, formsemestre_id): def formsemestre_get_archived_file( context, REQUEST, formsemestre_id, archive_name, filename ): - """Send file to client. - """ + """Send file to client.""" return PVArchive.get_archived_file( context, REQUEST, formsemestre_id, archive_name, filename ) @@ -535,8 +535,7 @@ def formsemestre_get_archived_file( def formsemestre_delete_archive( context, REQUEST, formsemestre_id, archive_name, dialog_confirmed=False ): - """Delete an archive - """ + """Delete an archive""" if not context._can_edit_pv(REQUEST, formsemestre_id): raise AccessDenied( "opération non autorisée pour %s" % str(REQUEST.AUTHENTICATED_USER) diff --git a/sco_formsemestre_status.py b/sco_formsemestre_status.py index 28184576..cc65b0f0 100644 --- a/sco_formsemestre_status.py +++ b/sco_formsemestre_status.py @@ -77,7 +77,12 @@ def makeMenu(title, items, css_class="", base_url="", alone=False): item["urlq"] = item.get("url", "#") item["attr"] = item.get("attr", "") submenu = item.get("submenu", None) - H.append("
  • %(title)s' % item) + H.append( + "
  • %(title)s' % item + ) if submenu: gen_menu_items(submenu) H.append("
  • ") @@ -326,7 +331,7 @@ def formsemestre_status_menubar(context, sem, REQUEST): "title": "Resynchroniser données identité", "url": "formsemestre_import_etud_admission?formsemestre_id=" + formsemestre_id, - "enabled": authuser.has_permission(ScoEtudInscrit, context) + "enabled": authuser.has_permission(ScoEtudChangeAdr, context) and context.get_preference("portal_url"), }, { @@ -463,7 +468,7 @@ def formsemestre_status_menubar(context, sem, REQUEST): def retreive_formsemestre_from_request(context, REQUEST): """Cherche si on a de quoi déduire le semestre affiché à partir des - arguments de la requête: + arguments de la requête: formsemestre_id ou moduleimpl ou evaluation ou group_id ou partition_id """ # Search formsemestre @@ -539,8 +544,7 @@ def formsemestre_page_title(context, REQUEST): def fill_formsemestre(context, sem, REQUEST=None): - """Add some useful fields to help display formsemestres - """ + """Add some useful fields to help display formsemestres""" # Notes URL notes_url = context.absolute_url() if "/Notes" not in notes_url: @@ -548,13 +552,12 @@ def fill_formsemestre(context, sem, REQUEST=None): sem["notes_url"] = notes_url formsemestre_id = sem["formsemestre_id"] if sem["etat"] != "1": - sem["locklink"] = ( - """%s""" - % ( - notes_url, - sem["formsemestre_id"], - icontag("lock_img", border="0", title="Semestre verrouillé"), - ) + sem[ + "locklink" + ] = """%s""" % ( + notes_url, + sem["formsemestre_id"], + icontag("lock_img", border="0", title="Semestre verrouillé"), ) else: sem["locklink"] = "" @@ -795,8 +798,7 @@ def html_expr_diagnostic(context, diagnostics): def formsemestre_status_head( context, formsemestre_id=None, REQUEST=None, page_title=None ): - """En-tête HTML des pages "semestre" - """ + """En-tête HTML des pages "semestre" """ semlist = sco_formsemestre.do_formsemestre_list( context, args={"formsemestre_id": formsemestre_id} )