Skip to content
Snippets Groups Projects
Commit 52830d2d authored by srosse's avatar srosse
Browse files

OO-3947: deduplicate list of coaches in portfolio

parent 7f719f5c
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ package org.olat.modules.portfolio.ui.wizard;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
......@@ -134,7 +135,8 @@ public class RepositoryEntryMembersController extends StepFormBasicController {
private void loadModel() {
List<Identity> members = repositoryService.getMembers(entry, RepositoryEntryRelationType.all, role.name());
userTableModel.setObjects(members);
List<Identity> deduplicatedMembers = new ArrayList<>(new HashSet<>(members));
userTableModel.setObjects(deduplicatedMembers);
tableEl.reset(true, true, true);
}
......
......@@ -230,20 +230,22 @@ public interface RepositoryService {
/**
* Get the members of the repository entry (the method doesn't
* follow the business groups or other relations).
* follow automatically the business groups or other relations).
*
* @param re The repository entry
* @param roles The roles to search for ()
* @return A list of identity which have at least one of the specified role
* @param relationType Type of relations to follow
* @param roles The roles to search for
* @return A list of identities which have at least one of the specified role
*/
public List<Identity> getMembers(RepositoryEntryRef re, RepositoryEntryRelationType relationType, String... roles);
/**
* Get the
* @param re
* @param followBusinessGroups
* @param roles
* @return
* Get the members of a list of repository entries.
*
* @param re The repository entry
* @param relationType Type of relations to follow
* @param roles The roles to search for
* @return A list of identities which have at least one of the specified role
*/
public List<Identity> getMembers(List<? extends RepositoryEntryRef> re, RepositoryEntryRelationType relationType, String... roles);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment