use of org.olat.group.ui.main.SearchMembersParams in project OpenOLAT by OpenOLAT.
the class MemberSearchForm method fireSearchEvent.
private void fireSearchEvent(UserRequest ureq) {
SearchMembersParams params = new SearchMembersParams();
// roles
Collection<String> selectedKeys = rolesEl.getSelectedKeys();
params.setRepoOwners(selectedKeys.contains("owner"));
params.setRepoTutors(selectedKeys.contains("tutor"));
params.setGroupTutors(selectedKeys.contains("tutor"));
params.setRepoParticipants(selectedKeys.contains("attendee"));
params.setGroupParticipants(selectedKeys.contains("attendee"));
params.setGroupWaitingList(selectedKeys.contains("waiting"));
// origin
if (!originEl.isOneSelected() || originEl.isSelected(0)) {
params.setRepoOrigin(true);
params.setGroupOrigin(true);
} else if (originEl.isSelected(1)) {
params.setRepoOrigin(true);
params.setGroupOrigin(false);
} else if (originEl.isSelected(2)) {
params.setRepoOrigin(false);
params.setGroupOrigin(true);
}
String loginVal = login.getValue();
if (StringHelper.containsNonWhitespace(loginVal)) {
params.setLogin(loginVal);
}
// user properties
Map<String, String> userPropertiesSearch = new HashMap<String, String>();
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null)
continue;
FormItem ui = propFormItems.get(userPropertyHandler.getName());
String uiValue = userPropertyHandler.getStringValue(ui);
if (StringHelper.containsNonWhitespace(uiValue)) {
userPropertiesSearch.put(userPropertyHandler.getName(), uiValue);
}
}
if (!userPropertiesSearch.isEmpty()) {
params.setUserPropertiesSearch(userPropertiesSearch);
}
fireEvent(ureq, params);
}
use of org.olat.group.ui.main.SearchMembersParams in project OpenOLAT by OpenOLAT.
the class MembersOverviewController method updateParticipants.
private AbstractMemberListController updateParticipants(UserRequest ureq) {
if (participantsCtrl == null) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(SEG_PARTICIPANTS_MEMBERS, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
SearchMembersParams searchParams = new SearchMembersParams(false, false, true, false, true, false, true);
String infos = translate("participants.infos");
participantsCtrl = new MemberListWithOriginFilterController(ureq, bwControl, toolbarPanel, repoEntry, coachCourseEnv, searchParams, infos);
listenTo(participantsCtrl);
}
participantsCtrl.reloadModel();
participantsCtrl.overrideManaged(ureq, overrideManaged);
mainVC.put("membersCmp", participantsCtrl.getInitialComponent());
addToHistory(ureq, participantsCtrl);
return participantsCtrl;
}
use of org.olat.group.ui.main.SearchMembersParams in project OpenOLAT by OpenOLAT.
the class MembersOverviewController method updateTutors.
private AbstractMemberListController updateTutors(UserRequest ureq) {
if (tutorsCtrl == null) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(SEG_TUTORS_MEMBERS, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
SearchMembersParams searchParams = new SearchMembersParams(false, true, false, true, false, false, false);
String infos = translate("tutors.infos");
tutorsCtrl = new MemberListWithOriginFilterController(ureq, bwControl, toolbarPanel, repoEntry, coachCourseEnv, searchParams, infos);
listenTo(tutorsCtrl);
}
tutorsCtrl.reloadModel();
tutorsCtrl.overrideManaged(ureq, overrideManaged);
mainVC.put("membersCmp", tutorsCtrl.getInitialComponent());
addToHistory(ureq, tutorsCtrl);
return tutorsCtrl;
}
use of org.olat.group.ui.main.SearchMembersParams in project openolat by klemens.
the class MemberSearchForm method fireSearchEvent.
private void fireSearchEvent(UserRequest ureq) {
SearchMembersParams params = new SearchMembersParams();
// roles
Collection<String> selectedKeys = rolesEl.getSelectedKeys();
params.setRepoOwners(selectedKeys.contains("owner"));
params.setRepoTutors(selectedKeys.contains("tutor"));
params.setGroupTutors(selectedKeys.contains("tutor"));
params.setRepoParticipants(selectedKeys.contains("attendee"));
params.setGroupParticipants(selectedKeys.contains("attendee"));
params.setGroupWaitingList(selectedKeys.contains("waiting"));
// origin
if (!originEl.isOneSelected() || originEl.isSelected(0)) {
params.setRepoOrigin(true);
params.setGroupOrigin(true);
} else if (originEl.isSelected(1)) {
params.setRepoOrigin(true);
params.setGroupOrigin(false);
} else if (originEl.isSelected(2)) {
params.setRepoOrigin(false);
params.setGroupOrigin(true);
}
String loginVal = login.getValue();
if (StringHelper.containsNonWhitespace(loginVal)) {
params.setLogin(loginVal);
}
// user properties
Map<String, String> userPropertiesSearch = new HashMap<String, String>();
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null)
continue;
FormItem ui = propFormItems.get(userPropertyHandler.getName());
String uiValue = userPropertyHandler.getStringValue(ui);
if (StringHelper.containsNonWhitespace(uiValue)) {
userPropertiesSearch.put(userPropertyHandler.getName(), uiValue);
}
}
if (!userPropertiesSearch.isEmpty()) {
params.setUserPropertiesSearch(userPropertiesSearch);
}
fireEvent(ureq, params);
}
use of org.olat.group.ui.main.SearchMembersParams in project openolat by klemens.
the class MembersOverviewController method updateAllMembers.
private AbstractMemberListController updateAllMembers(UserRequest ureq) {
if (allMemberListCtrl == null) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(SEG_ALL_MEMBERS, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
SearchMembersParams searchParams = new SearchMembersParams(true, true, true, true, true, false, true);
allMemberListCtrl = new MemberListWithOriginFilterController(ureq, bwControl, toolbarPanel, repoEntry, coachCourseEnv, searchParams, null);
listenTo(allMemberListCtrl);
}
allMemberListCtrl.reloadModel();
allMemberListCtrl.overrideManaged(ureq, overrideManaged);
mainVC.put("membersCmp", allMemberListCtrl.getInitialComponent());
addToHistory(ureq, allMemberListCtrl);
return allMemberListCtrl;
}
Aggregations