Search in sources :

Example 6 with SearchMyRepositoryEntryViewParams

use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project openolat by klemens.

the class OverviewRepositoryListController method doOpenSearchCourses.

private RepositoryEntryListController doOpenSearchCourses(UserRequest ureq) {
    cleanUp();
    SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
    searchParams.setMembershipMandatory(false);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance("Search", 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    searchCoursesStackPanel = new BreadcrumbedStackedPanel("search", getTranslator(), this);
    searchCoursesCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, false, true, "my-search", searchCoursesStackPanel);
    searchCoursesStackPanel.pushController(translate("search.mycourses.student"), searchCoursesCtrl);
    listenTo(searchCoursesCtrl);
    currentCtrl = searchCoursesCtrl;
    addToHistory(ureq, searchCoursesCtrl);
    mainVC.put("segmentCmp", searchCoursesStackPanel);
    return searchCoursesCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Example 7 with SearchMyRepositoryEntryViewParams

use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project OpenOLAT by OpenOLAT.

the class OverviewRepositoryListController method doOpenMyCourses.

private RepositoryEntryListController doOpenMyCourses(UserRequest ureq) {
    cleanUp();
    SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
    searchParams.setMembershipMandatory(true);
    searchParams.setClosed(Boolean.FALSE);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance("My", 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    myCoursesStackPanel = new BreadcrumbedStackedPanel("mystack", getTranslator(), this);
    myCoursesCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, true, false, "my", myCoursesStackPanel);
    myCoursesStackPanel.pushController(translate("search.mycourses.student"), myCoursesCtrl);
    listenTo(myCoursesCtrl);
    currentCtrl = myCoursesCtrl;
    myDirty = false;
    addToHistory(ureq, myCoursesCtrl);
    mainVC.put("segmentCmp", myCoursesStackPanel);
    return myCoursesCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Example 8 with SearchMyRepositoryEntryViewParams

use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project OpenOLAT by OpenOLAT.

the class OverviewRepositoryListController method doOpenSearchCourses.

private RepositoryEntryListController doOpenSearchCourses(UserRequest ureq) {
    cleanUp();
    SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
    searchParams.setMembershipMandatory(false);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance("Search", 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    searchCoursesStackPanel = new BreadcrumbedStackedPanel("search", getTranslator(), this);
    searchCoursesCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, false, true, "my-search", searchCoursesStackPanel);
    searchCoursesStackPanel.pushController(translate("search.mycourses.student"), searchCoursesCtrl);
    listenTo(searchCoursesCtrl);
    currentCtrl = searchCoursesCtrl;
    addToHistory(ureq, searchCoursesCtrl);
    mainVC.put("segmentCmp", searchCoursesStackPanel);
    return searchCoursesCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Example 9 with SearchMyRepositoryEntryViewParams

use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project OpenOLAT by OpenOLAT.

the class OverviewRepositoryListController method doOpenClosedCourses.

private RepositoryEntryListController doOpenClosedCourses(UserRequest ureq) {
    cleanUp();
    SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
    searchParams.setMembershipMandatory(true);
    searchParams.setClosed(Boolean.TRUE);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance("Closed", 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    myCoursesStackPanel = new BreadcrumbedStackedPanel("mystack", getTranslator(), this);
    closedCoursesCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, true, false, "closed", myCoursesStackPanel);
    myCoursesStackPanel.pushController(translate("search.mycourses.student"), closedCoursesCtrl);
    listenTo(closedCoursesCtrl);
    currentCtrl = closedCoursesCtrl;
    myDirty = false;
    addToHistory(ureq, closedCoursesCtrl);
    mainVC.put("segmentCmp", myCoursesStackPanel);
    return closedCoursesCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Example 10 with SearchMyRepositoryEntryViewParams

use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project OpenOLAT by OpenOLAT.

the class RepositoryEntryMyCourseQueriesTest method searchViews.

@Test
public void searchViews() {
    Identity id = JunitTestHelper.createAndPersistIdentityAsRndUser("mycourses-view-1-");
    dbInstance.commit();
    Roles roles = securityManager.getRoles(id);
    SearchMyRepositoryEntryViewParams params = new SearchMyRepositoryEntryViewParams(id, roles);
    params.setMarked(Boolean.TRUE);
    List<RepositoryEntryMyView> views = repositoryEntryMyCourseViewQueries.searchViews(params, 0, 10);
    Assert.assertNotNull(views);
}
Also used : RepositoryEntryMyView(org.olat.repository.RepositoryEntryMyView) Roles(org.olat.core.id.Roles) Identity(org.olat.core.id.Identity) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) Test(org.junit.Test)

Aggregations

SearchMyRepositoryEntryViewParams (org.olat.repository.model.SearchMyRepositoryEntryViewParams)12 BreadcrumbedStackedPanel (org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)8 WindowControl (org.olat.core.gui.control.WindowControl)8 OLATResourceable (org.olat.core.id.OLATResourceable)8 Test (org.junit.Test)4 Identity (org.olat.core.id.Identity)4 Roles (org.olat.core.id.Roles)4 RepositoryEntryMyView (org.olat.repository.RepositoryEntryMyView)4 OrderBy (org.olat.repository.model.SearchMyRepositoryEntryViewParams.OrderBy)2