From e1ee1bfdb5ad6ad303d67e7a7bd60c370958af8a Mon Sep 17 00:00:00 2001 From: Laurent David Date: Thu, 12 Sep 2024 10:51:47 +0200 Subject: [PATCH] MDL-82905 core_badges: Criteria as list only if multiple items --- badges/renderer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/badges/renderer.php b/badges/renderer.php index 9649ce8f6d3..363ee5bc78f 100644 --- a/badges/renderer.php +++ b/badges/renderer.php @@ -690,7 +690,9 @@ class core_badges_renderer extends plugin_renderer_base { } } - return $overalldescr . $condition . html_writer::alist($items, array(), 'ul');; + $criteriadesc = count($items) > 1 ? html_writer::alist($items, [], 'ul') : reset($items); + + return $overalldescr . $condition . $criteriadesc; } /**