diff --git a/app/forms/main/create_bug_report.py b/app/forms/main/create_bug_report.py index 5e3541927..e94920f85 100644 --- a/app/forms/main/create_bug_report.py +++ b/app/forms/main/create_bug_report.py @@ -53,7 +53,9 @@ class CreateBugReport(FlaskForm): ) etab = StringField(label="Etablissement") include_dump = BooleanField( - "Inclure une copie anonymisée de la base de données ? (ces données permettent aux développeur·euse·s de reproduire l'erreur rencontrée)", + """Inclure une copie anonymisée de la base de données ? + Ces données faciliteront le traitement du problème et resteront strictement confidentielles. + """, default=False, ) submit = SubmitField("Envoyer") diff --git a/app/scodoc/sco_bug_report.py b/app/scodoc/sco_bug_report.py index 3c4fdee0c..c7df1a111 100644 --- a/app/scodoc/sco_bug_report.py +++ b/app/scodoc/sco_bug_report.py @@ -36,18 +36,22 @@ Le principe est le suivant: informations fournies par l'utilisateur + quelques métadonnées. """ - -import app.scodoc.sco_utils as scu, sco_version, requests from flask import g from flask_login import current_user +import requests + +import app.scodoc.sco_utils as scu +import sco_version + from app import log -from app.scodoc.sco_exceptions import ScoValueError from app.scodoc.sco_dump_db import sco_dump_and_send_db +from app.scodoc.sco_exceptions import ScoValueError def sco_bug_report( title: str = "", message: str = "", etab: str = "", include_dump: bool = False ) -> requests.Response: + """Envoi d'un bug report (ticket)""" dump_id = None if include_dump: @@ -56,8 +60,9 @@ def sco_bug_report( try: dump_id = dump.json()["dump_id"] except (requests.exceptions.JSONDecodeError, KeyError): - dump_id = "inconnu" + dump_id = "inconnu (erreur)" + log(f"sco_bug_report: {scu.SCO_BUG_REPORT_URL} by {current_user.user_name}") try: r = requests.post( scu.SCO_BUG_REPORT_URL, diff --git a/app/templates/scolar/index.j2 b/app/templates/scolar/index.j2 index 21d67fe8c..2c3584a5d 100644 --- a/app/templates/scolar/index.j2 +++ b/app/templates/scolar/index.j2 @@ -297,7 +297,10 @@ div.effectif { rel="noopener noreferrer">Contact (Discord)