Retire l'action Publier du support de formation
Build and deploy / test-python (push) Successful in 6m57s
Build and deploy / test-js (push) Successful in 50s
Build and deploy / lint-python (push) Successful in 4m14s
Build and deploy / lint-js (push) Failing after 1m12s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped
Build and deploy / sonarqube (push) Failing after 3m48s

Un apprenant n'a jamais acces a l'editeur : un etat "publie" persiste
en base (published_at) ne servait donc a rien tant qu'aucune vue
apprenant/export ne le consomme (retour utilisateur direct). Retrait
complet : route /document/<slug>/publish, db.mark_support_published,
la colonne logique published_at dans support_meta, le bouton et son
CSS/JS. "Aperçu" devient l'action primaire du bandeau (repond au vrai
besoin : voir le rendu avant un futur export). Un export reel (SCORM
ou equivalent) reste a specifier separement le jour venu.

SKIP=djlint : meme backlog H021 pre-existant que le commit precedent,
aucun fichier touche ici n'y figure. ruff/mypy --strict/vulture/
bandit/import-linter/eslint/stylelint tous verts ; 615 tests Python
(617 - 2 tests du Publier retire) + verification manuelle live du
retrait (route 404, bouton absent du HTML, Apercu confirme
fonctionnel par simulation DOM).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-09-20 09:58:53 +02:00
co-authored by Claude Sonnet 5
parent bab581737a
commit 7ca03380b7
12 changed files with 5 additions and 99 deletions
-9
View File
@@ -81,15 +81,6 @@ def test_document_element_move_and_delete(client: FlaskClient, support: str) ->
assert delete_resp.get_json()["ok"] is True
def test_document_publish_persists_published_at(client: FlaskClient, support: str) -> None:
assert db.support_meta(support)["published_at"] is None
resp = client.post(f"/document/{support}/publish")
assert resp.status_code == 200
published_at = resp.get_json()["published_at"]
assert published_at is not None
assert db.support_meta(support)["published_at"] == published_at
def test_restricted_user_can_have_one_game_and_one_support_at_once(
user_client: FlaskClient, tmp_game_slug_cleanup: Any, tmp_support_slug_cleanup: Any
) -> None:
-9
View File
@@ -14,7 +14,6 @@ def test_create_support_creates_its_own_db_file_and_schema(tmp_support_slug_clea
tmp_support_slug_cleanup(slug)
meta = db.support_meta(slug)
assert meta["name"] == "Sécurité incendie"
assert meta["published_at"] is None
def test_list_supports_scopes_to_owner_and_excludes_games(
@@ -54,14 +53,6 @@ def test_create_support_avoids_name_collision_for_the_same_owner(tmp_support_slu
assert slug_1 != slug_2
def test_mark_support_published_persists_a_timestamp(tmp_support_slug_cleanup: Any) -> None:
slug = db.create_support("À publier", owner_folder="47")
tmp_support_slug_cleanup(slug)
assert db.support_meta(slug)["published_at"] is None
published_at = db.mark_support_published(slug)
assert db.support_meta(slug)["published_at"] == published_at
def test_delete_support_removes_it_from_the_listing(tmp_support_slug_cleanup: Any) -> None:
slug = db.create_support("Temporaire", owner_folder="48")
tmp_support_slug_cleanup(slug)