MDL-82905 core_badges: Criteria as list only if multiple items

This commit is contained in:
Laurent David 2024-09-12 10:51:47 +02:00
parent ecfcf00d92
commit e1ee1bfdb5

View File

@ -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;
}
/**