Search in sources :

Example 66 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class OverviewAuthoringController method doOpenMark.

private AuthorListController doOpenMark(UserRequest ureq) {
    if (markedCtrl == null) {
        SearchAuthorRepositoryEntryViewParams searchParams = new SearchAuthorRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
        searchParams.setMarked(Boolean.TRUE);
        searchParams.setOwnedResourcesOnly(false);
        OLATResourceable ores = OresHelper.createOLATResourceableInstance("Favorits", 0l);
        ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
        markedCtrl = new AuthorListController(ureq, bwControl, "search.mark", searchParams, false, true);
        listenTo(markedCtrl);
    } else if (favoritDirty) {
        markedCtrl.reloadRows();
    } else {
        markedCtrl.reloadDirtyRows();
    }
    favoritDirty = false;
    currentCtrl = markedCtrl;
    addToHistory(ureq, markedCtrl);
    mainVC.put("segmentCmp", markedCtrl.getStackPanel());
    return markedCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl) SearchAuthorRepositoryEntryViewParams(org.olat.repository.model.SearchAuthorRepositoryEntryViewParams)

Example 67 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class OverviewAuthoringController method doSearchEntries.

private AuthorListController doSearchEntries(UserRequest ureq) {
    if (searchEntriesCtrl == null) {
        SearchAuthorRepositoryEntryViewParams searchParams = new SearchAuthorRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
        searchParams.setOwnedResourcesOnly(false);
        OLATResourceable ores = OresHelper.createOLATResourceableInstance("Search", 0l);
        ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
        searchEntriesCtrl = new AuthorListController(ureq, bwControl, "search.generic", searchParams, true, false);
        listenTo(searchEntriesCtrl);
    }
    currentCtrl = searchEntriesCtrl;
    addToHistory(ureq, searchEntriesCtrl);
    mainVC.put("segmentCmp", searchEntriesCtrl.getStackPanel());
    return searchEntriesCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl) SearchAuthorRepositoryEntryViewParams(org.olat.repository.model.SearchAuthorRepositoryEntryViewParams)

Example 68 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CatalogNodeController method selectCatalogEntry.

private CatalogNodeController selectCatalogEntry(UserRequest ureq, CatalogEntry entry) {
    if (entry != null && entry.getType() == CatalogEntry.TYPE_NODE) {
        removeAsListenerAndDispose(childNodeController);
        OLATResourceable ores = OresHelper.createOLATResourceableInstance("CatalogEntry", entry.getKey());
        ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, rootwControl);
        childNodeController = new CatalogNodeController(ureq, bwControl, rootwControl, entry, stackPanel, wrapInMainPanel);
        listenTo(childNodeController);
        stackPanel.pushController(entry.getName(), childNodeController);
        addToHistory(ureq, childNodeController);
    }
    return childNodeController;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 69 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doLectures.

private TeacherOverviewController doLectures(UserRequest ureq) {
    if (delayedClose == Delayed.lectures || requestForClose(ureq)) {
        removeCustomCSS();
        OLATResourceable ores = OresHelper.createOLATResourceableType("lectures");
        WindowControl swControl = addToHistory(ureq, ores, null);
        TeacherOverviewController ctrl = new TeacherOverviewController(ureq, swControl, toolbarPanel, getRepositoryEntry(), reSecurity.isEntryAdmin());
        lecturesCtrl = pushController(ureq, translate("command.lectures"), ctrl);
        setActiveTool(lecturesLink);
        currentToolCtr = lecturesCtrl;
        return lecturesCtrl;
    } else {
        delayedClose = Delayed.lectures;
        return null;
    }
}
Also used : TeacherOverviewController(org.olat.modules.lecture.ui.TeacherOverviewController) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 70 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doAssessmentStatistics.

/**
 * Only an helper method for the 2 methods above. Don't call it directly, there is no request on close guard.
 * @param ureq
 * @param i18nCrumbKey
 * @param typeName
 * @param tool
 * @param types
 * @return
 */
private Activateable2 doAssessmentStatistics(UserRequest ureq, String i18nCrumbKey, String typeName, Link tool, QTIType... types) {
    OLATResourceable ores = OresHelper.createOLATResourceableType(typeName);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl = addToHistory(ureq, ores, null);
    if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach() || hasCourseRight(CourseRights.RIGHT_STATISTICS)) {
        removeCustomCSS();
        UserCourseEnvironmentImpl uce = getUserCourseEnvironment();
        StatisticCourseNodesController ctrl = new StatisticCourseNodesController(ureq, swControl, toolbarPanel, reSecurity, uce, types);
        listenTo(ctrl);
        statsToolCtr = pushController(ureq, translate(i18nCrumbKey), ctrl);
        currentToolCtr = statsToolCtr;
        setActiveTool(tool);
        return statsToolCtr;
    }
    return null;
}
Also used : StatisticCourseNodesController(org.olat.course.statistic.StatisticCourseNodesController) UserCourseEnvironmentImpl(org.olat.course.run.userview.UserCourseEnvironmentImpl) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)628 OLATResourceable (org.olat.core.id.OLATResourceable)300 UserRequest (org.olat.core.gui.UserRequest)136 Controller (org.olat.core.gui.control.Controller)70 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)68 RepositoryEntry (org.olat.repository.RepositoryEntry)68 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)64 ContextEntry (org.olat.core.id.context.ContextEntry)58 Step (org.olat.core.gui.control.generic.wizard.Step)56 StepRunnerCallback (org.olat.core.gui.control.generic.wizard.StepRunnerCallback)56 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)56 BusinessControl (org.olat.core.id.context.BusinessControl)56 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)46 ArrayList (java.util.ArrayList)42 Identity (org.olat.core.id.Identity)38 StateSite (org.olat.core.id.context.StateSite)32 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 AssertException (org.olat.core.logging.AssertException)24 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)22 List (java.util.List)20