use of org.olat.modules.coach.model.SearchCoachedIdentityParams in project openolat by klemens.
the class CoachingLargeTest method getUsersStatistics.
@Test
public void getUsersStatistics() {
SearchCoachedIdentityParams params = new SearchCoachedIdentityParams();
params.setLogin(aStudent.getName());
List<StudentStatEntry> statEntries = coachingService.getUsersStatistics(params, userPropertyHandlers);
Assert.assertNotNull(statEntries);
Assert.assertEquals(1, statEntries.size());
StudentStatEntry statEntry = statEntries.get(0);
Assert.assertEquals(aStudent.getKey(), statEntry.getIdentityKey());
Assert.assertEquals(studentToCourseMap.get(aStudent).size(), statEntry.getCountRepo());
}
use of org.olat.modules.coach.model.SearchCoachedIdentityParams in project openolat by klemens.
the class UserSearchController method doSearchByIdentityKey.
private void doSearchByIdentityKey(UserRequest ureq, Long identityKey) {
SearchCoachedIdentityParams params = new SearchCoachedIdentityParams();
params.setIdentityKey(identityKey);
userListCtrl = new UserListController(ureq, getWindowControl(), stackPanel);
userListCtrl.search(params);
if (userListCtrl.size() == 1) {
userListCtrl.selectUniqueStudent(ureq);
stackPanel.pushController("Result", userListCtrl);
} else {
stackPanel.pushController("Results", userListCtrl);
}
}
use of org.olat.modules.coach.model.SearchCoachedIdentityParams in project openolat by klemens.
the class UserSearchController method doSearch.
private void doSearch(UserRequest ureq) {
String login = searchForm.getLogin();
boolean onlyActive = searchForm.isOnlyActive();
Map<String, String> searchProps = searchForm.getSearchProperties();
SearchCoachedIdentityParams params = new SearchCoachedIdentityParams();
params.setLogin(login);
params.setUserProperties(searchProps);
if (onlyActive) {
params.setStatus(Identity.STATUS_VISIBLE_LIMIT);
}
userListCtrl = new UserListController(ureq, getWindowControl(), stackPanel);
userListCtrl.search(params);
listenTo(userListCtrl);
stackPanel.popUpToRootController(ureq);
stackPanel.pushController(translate("results"), userListCtrl);
}
Aggregations