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 23, 2024
1 parent ecfcf00 commit e1ee1bf
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 e1ee1bf

Please sign in to comment.