Search in sources :

Example 6 with SearchCoachedIdentityParams

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());
}
Also used : SearchCoachedIdentityParams(org.olat.modules.coach.model.SearchCoachedIdentityParams) StudentStatEntry(org.olat.modules.coach.model.StudentStatEntry) Test(org.junit.Test)

Example 7 with SearchCoachedIdentityParams

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);
    }
}
Also used : SearchCoachedIdentityParams(org.olat.modules.coach.model.SearchCoachedIdentityParams)

Example 8 with SearchCoachedIdentityParams

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);
}
Also used : SearchCoachedIdentityParams(org.olat.modules.coach.model.SearchCoachedIdentityParams)

Aggregations

SearchCoachedIdentityParams (org.olat.modules.coach.model.SearchCoachedIdentityParams)8 Test (org.junit.Test)4 StudentStatEntry (org.olat.modules.coach.model.StudentStatEntry)4 File (java.io.File)2 URL (java.net.URL)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 Identity (org.olat.core.id.Identity)2 User (org.olat.core.id.User)2 BusinessGroup (org.olat.group.BusinessGroup)2 CoachingLargeTest (org.olat.modules.coach.CoachingLargeTest)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 UserPropertyHandler (org.olat.user.propertyhandlers.UserPropertyHandler)2