Skip to content

Commit

Permalink
MDL-82905 core_badges: Criteria as list only if multiple items
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentdavid committed Oct 7, 2024
1 parent 67f5ee3 commit d57d20f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion badges/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ public function print_badge_criteria(badge $badge, $short = '') {
}
}

return $overalldescr . $condition . html_writer::alist($items, array(), 'ul');;
$criteriadesc = count($items) > 1 ? html_writer::alist($items, [], 'ul') : reset($items);

return $overalldescr . $condition . $criteriadesc;
}

/**
Expand Down

0 comments on commit d57d20f

Please sign in to comment.