use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project OpenOLAT by OpenOLAT.
the class OverviewRepositoryListController method doOpenMark.
private RepositoryEntryListController doOpenMark(UserRequest ureq) {
cleanUp();
SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
searchParams.setMarked(Boolean.TRUE);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Favorits", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
markedStackPanel = new BreadcrumbedStackedPanel("mrkstack", getTranslator(), this);
markedCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, true, false, "marked", markedStackPanel);
markedStackPanel.pushController(translate("search.mark"), markedCtrl);
listenTo(markedCtrl);
currentCtrl = markedCtrl;
favoritDirty = false;
addToHistory(ureq, markedCtrl);
mainVC.put("segmentCmp", markedStackPanel);
return markedCtrl;
}
use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project openolat by klemens.
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);
}
use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project openolat by klemens.
the class RepositoryEntryMyCourseQueriesTest method searchViews_orderBy.
@Test
public void searchViews_orderBy() {
Identity id = JunitTestHelper.createAndPersistIdentityAsRndUser("mycourses-view-2-");
dbInstance.commit();
Roles roles = securityManager.getRoles(id);
SearchMyRepositoryEntryViewParams params = new SearchMyRepositoryEntryViewParams(id, roles);
params.setMarked(Boolean.TRUE);
for (OrderBy orderBy : OrderBy.values()) {
params.setOrderBy(orderBy);
params.setOrderByAsc(true);
List<RepositoryEntryMyView> viewAsc = repositoryEntryMyCourseViewQueries.searchViews(params, 0, 10);
Assert.assertNotNull(viewAsc);
params.setOrderByAsc(false);
List<RepositoryEntryMyView> viewDesc = repositoryEntryMyCourseViewQueries.searchViews(params, 0, 10);
Assert.assertNotNull(viewDesc);
}
}
use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project openolat by klemens.
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;
}
use of org.olat.repository.model.SearchMyRepositoryEntryViewParams in project openolat by klemens.
the class OverviewRepositoryListController method doOpenMark.
private RepositoryEntryListController doOpenMark(UserRequest ureq) {
cleanUp();
SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
searchParams.setMarked(Boolean.TRUE);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Favorits", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
markedStackPanel = new BreadcrumbedStackedPanel("mrkstack", getTranslator(), this);
markedCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, true, false, "marked", markedStackPanel);
markedStackPanel.pushController(translate("search.mark"), markedCtrl);
listenTo(markedCtrl);
currentCtrl = markedCtrl;
favoritDirty = false;
addToHistory(ureq, markedCtrl);
mainVC.put("segmentCmp", markedStackPanel);
return markedCtrl;
}
Aggregations