From f0bdefd8057f3fe44400bfbdc02c75c63120c7d6 Mon Sep 17 00:00:00 2001 From: stephan Date: Mon, 20 Jul 2026 12:54:44 -0400 Subject: [PATCH] =?UTF-8?q?MSIN-4419=20=E2=80=94=20Update=20SQL=20query=20?= =?UTF-8?q?for=20participant=20statistics=20to=20count=20total=20participa?= =?UTF-8?q?tions=20without=20deduplication=20by=20email.=20Adjust=20commen?= =?UTF-8?q?ts=20for=20clarity=20regarding=20participation=20counting.=20In?= =?UTF-8?q?crement=20version=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/inc_fx_promoteur_hub.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/php/inc_fx_promoteur_hub.php b/php/inc_fx_promoteur_hub.php index a122776..f726d85 100644 --- a/php/inc_fx_promoteur_hub.php +++ b/php/inc_fx_promoteur_hub.php @@ -980,16 +980,11 @@ function fxPromoteurHubGetEpreuveStats($intEveId, $strLangue = 'fr') } } - // MSIN-4451 — Humains uniques (même personne sur 2 épreuves = 1). - // Clé : courriel normalisé ; sans courriel → par_id_original (pas de fusion). + // MSIN-4419 — Participations (1 humain × 1 épreuve = 1). Même personne sur 5 épreuves = 5. + // Pas de dédup par courriel (contrairement à MSIN-4451). $intFlashParticipants = 0; $sqlParticipants = " - SELECT COUNT(DISTINCT - CASE - WHEN TRIM(IFNULL(p.par_courriel, '')) <> '' THEN LOWER(TRIM(p.par_courriel)) - ELSE CONCAT('id:', p.par_id_original) - END - ) AS nb + SELECT COUNT(*) AS nb FROM resultats_epreuves_commandees e JOIN resultats_participants p ON p.epr_id = e.epr_id AND p.pec_id = e.pec_id_original @@ -1236,7 +1231,7 @@ function fxPromoteurHubRenderFlash($arrStats, $strLangue = 'fr') // ---- Bande flash ---- $html .= '
'; - // MSIN-4451 — Duo : épreuves vendues (KPI) + participants uniques (sous-ligne) + // MSIN-4451 / MSIN-4419 — Duo : épreuves vendues (KPI) + participations (sous-ligne) $html .= '
'; $html .= '' . intval($arrFlash['total_vendus']) . ''; $html .= '' . fxPromoteurHubEsc(fxPromoteurHubTexte('promoteur_hub_flash_inscrits', 0)) . '';