Search in sources :

Example 6 with WindowControl

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

the class BinderController method doOpenPublish.

private PublishController doOpenPublish(UserRequest ureq) {
    OLATResourceable bindersOres = OresHelper.createOLATResourceableInstance("Publish", 0l);
    WindowControl swControl = addToHistory(ureq, bindersOres, null);
    publishCtrl = new PublishController(ureq, swControl, stackPanel, secCallback, binder, config);
    listenTo(publishCtrl);
    popUpToBinderController(ureq);
    stackPanel.pushController(translate("portfolio.publish"), publishCtrl);
    segmentButtonsCmp.setSelectedButton(publishLink);
    return publishCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 7 with WindowControl

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

the class BinderController method doOpenOverview.

private TableOfContentController doOpenOverview(UserRequest ureq) {
    popUpToBinderController(ureq);
    if (overviewCtrl == null) {
        OLATResourceable bindersOres = OresHelper.createOLATResourceableInstance("Toc", 0l);
        WindowControl swControl = addToHistory(ureq, bindersOres, null);
        overviewCtrl = new TableOfContentController(ureq, swControl, stackPanel, secCallback, binder, config);
        // because it will not end in the stackPanel as a pushed controller
        overviewCtrl.initTools();
        listenTo(overviewCtrl);
    } else {
        overviewCtrl.loadModel();
        overviewCtrl.updateSummaryView(ureq);
    }
    segmentButtonsCmp.setSelectedButton(overviewLink);
    mainPanel.setContent(overviewCtrl.getInitialComponent());
    return overviewCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 8 with WindowControl

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

the class BinderListController method doOpenBinder.

protected BinderController doOpenBinder(UserRequest ureq, Binder binder) {
    if (binder == null) {
        showWarning("warning.portfolio.not.found");
        return null;
    } else {
        removeAsListenerAndDispose(binderCtrl);
        portfolioService.updateBinderUserInformations(binder, getIdentity());
        OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
        WindowControl swControl = addToHistory(ureq, binderOres, null);
        BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForOwnedBinder(binder);
        BinderConfiguration config = BinderConfiguration.createConfig(binder);
        binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
        listenTo(binderCtrl);
        stackPanel.pushController(binder.getTitle(), binderCtrl);
        return binderCtrl;
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) BinderConfiguration(org.olat.modules.portfolio.BinderConfiguration)

Example 9 with WindowControl

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

the class BinderRuntimeController method doAssessmentTool.

private Activateable2 doAssessmentTool(UserRequest ureq) {
    OLATResourceable ores = OresHelper.createOLATResourceableType("TestStatistics");
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl = addToHistory(ureq, ores, null);
    if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
        AssessmentToolSecurityCallback secCallback = new AssessmentToolSecurityCallback(reSecurity.isEntryAdmin(), reSecurity.isEntryAdmin(), reSecurity.isCourseCoach(), reSecurity.isGroupCoach(), null);
        AssessableResource el = getAssessableElement();
        AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), el, secCallback);
        listenTo(ctrl);
        assessmentToolCtrl = pushController(ureq, "Statistics", ctrl);
        currentToolCtr = assessmentToolCtrl;
        setActiveTool(assessmentLink);
        enableRuntimeNavBar(false);
        return assessmentToolCtrl;
    }
    return null;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) AssessmentToolSecurityCallback(org.olat.modules.assessment.ui.AssessmentToolSecurityCallback) AssessableResource(org.olat.modules.assessment.ui.AssessableResource) WindowControl(org.olat.core.gui.control.WindowControl) AssessmentToolController(org.olat.modules.assessment.ui.AssessmentToolController)

Example 10 with WindowControl

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

the class DeletedBinderController method doOpenBinder.

@Override
protected BinderController doOpenBinder(UserRequest ureq, Binder binder) {
    if (binder == null) {
        showWarning("warning.portfolio.not.found");
        return null;
    } else {
        removeAsListenerAndDispose(binderCtrl);
        OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
        WindowControl swControl = addToHistory(ureq, binderOres, null);
        BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForDeletedBinder();
        BinderConfiguration config = BinderConfiguration.createConfig(binder);
        binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
        listenTo(binderCtrl);
        stackPanel.pushController(binder.getTitle(), binderCtrl);
        return binderCtrl;
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) BinderConfiguration(org.olat.modules.portfolio.BinderConfiguration)

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