MSIN-4419 — Update SQL query for participant statistics to count total participations without deduplication by email. Adjust comments for clarity regarding participation counting. Increment version code.

This commit is contained in:
2026-07-20 12:54:44 -04:00
parent b4637ddeca
commit f0bdefd805

View File

@ -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-4419Participations (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 .= '<div class="promoteur-hub-flash">';
// MSIN-4451 — Duo : épreuves vendues (KPI) + participants uniques (sous-ligne)
// MSIN-4451 / MSIN-4419 — Duo : épreuves vendues (KPI) + participations (sous-ligne)
$html .= '<div class="phub-flash-item phub-flash-main">';
$html .= '<span class="phub-flash-num">' . intval($arrFlash['total_vendus']) . '</span>';
$html .= '<span class="phub-flash-lbl">' . fxPromoteurHubEsc(fxPromoteurHubTexte('promoteur_hub_flash_inscrits', 0)) . '</span>';