diff --git a/app/scodoc/gen_tables.py b/app/scodoc/gen_tables.py index 078017e8c..3791c8142 100644 --- a/app/scodoc/gen_tables.py +++ b/app/scodoc/gen_tables.py @@ -628,8 +628,6 @@ class GenTable(object): H.append( self.html_header or html_sco_header.sco_header( - context, - REQUEST, page_title=page_title, javascripts=javascripts, init_qtip=init_qtip, diff --git a/app/scodoc/html_sco_header.py b/app/scodoc/html_sco_header.py index 2401ee7cb..7381cc734 100644 --- a/app/scodoc/html_sco_header.py +++ b/app/scodoc/html_sco_header.py @@ -30,6 +30,8 @@ import html +from flask import g +from flask import request from flask_login import current_user import app.scodoc.sco_utils as scu @@ -136,10 +138,7 @@ def scodoc_top_html_header(page_title="ScoDoc: bienvenue"): # Header: def sco_header( - context, - REQUEST=None, # optional args - container=None, # objet qui a lancé la demande page_title="", # page title no_side_bar=False, # hide sidebar cssstyles=[], # additionals CSS sheets @@ -159,15 +158,13 @@ def sco_header( from app.scodoc.sco_formsemestre_status import formsemestre_page_title context = None # XXX TODO à enlever #context - # context est une instance de ZScolar. container est une instance qui "acquiert" ZScolar - # Add a HTTP header (can be used by Apache to log requests) - if REQUEST.AUTHENTICATED_USER: - REQUEST.RESPONSE.setHeader("X-ScoDoc-User", str(REQUEST.AUTHENTICATED_USER)) - - # Get more parameters from REQUEST - if not head_message and "head_message" in REQUEST.form: - head_message = REQUEST.form["head_message"] + # Get head message from http request: + if not head_message: + if request.method == "POST": + head_message = request.form.get("head_message", "") + elif request.method == "GET": + head_message = request.args.get("head_message", "") params = { "page_title": page_title or VERSION.SCONAME, @@ -175,7 +172,7 @@ def sco_header( "ScoURL": scu.ScoURL(), "encoding": scu.SCO_ENCODING, "titrebandeau_mkup": "
Cette fonction génère un ensemble de fichiers permettant d'éditer des avis de poursuites d'études. diff --git a/app/scodoc/sco_abs_views.py b/app/scodoc/sco_abs_views.py index 06f2749fe..80693c8b4 100644 --- a/app/scodoc/sco_abs_views.py +++ b/app/scodoc/sco_abs_views.py @@ -132,8 +132,6 @@ def doSignaleAbsence( M = "dans le module %s" % modimpl["module"]["code"] H = [ html_sco_header.sco_header( - context, - REQUEST, page_title="Signalement d'une absence pour %(nomprenom)s" % etud, ), """