Search in sources :

Example 66 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class SharedFolderHandler method createEditorController.

@Override
public Controller createEditorController(RepositoryEntry re, UserRequest ureq, WindowControl wControl, TooledStackedPanel toolbar) {
    Controller sharedFolderCtr = new SharedFolderEditorController(re, ureq, wControl);
    // use on column layout
    LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, sharedFolderCtr);
    // dispose content on layout dispose
    layoutCtr.addDisposableChildController(sharedFolderCtr);
    return layoutCtr;
}
Also used : LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) StepsMainRunController(org.olat.core.gui.control.generic.wizard.StepsMainRunController) CorruptedCourseController(org.olat.repository.ui.CorruptedCourseController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController) SharedFolderDisplayController(org.olat.modules.sharedfolder.SharedFolderDisplayController) SharedFolderEditorController(org.olat.modules.sharedfolder.SharedFolderEditorController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) RepositoryEntryRuntimeController(org.olat.repository.ui.RepositoryEntryRuntimeController) Controller(org.olat.core.gui.control.Controller) SharedFolderEditorController(org.olat.modules.sharedfolder.SharedFolderEditorController)

Example 67 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class RepositoyUIFactory method createRepoEntryDisabledDueToSecurityMessageController.

/**
 * Create main controller that does nothing but displaying a message that
 * this resource is disabled due to security constraints
 *
 * @param ureq
 * @param wControl
 * @return
 */
public static GenericMainController createRepoEntryDisabledDueToSecurityMessageController(UserRequest ureq, WindowControl wControl) {
    // wrap simple message into mainLayout
    GenericMainController glc = new GenericMainController(ureq, wControl) {

        @Override
        public void init(UserRequest uureq) {
            Panel empty = new Panel("empty");
            setTranslator(Util.createPackageTranslator(RepositoryModule.class, uureq.getLocale()));
            MessageController contentCtr = MessageUIFactory.createInfoMessage(uureq, getWindowControl(), translate("security.disabled.title"), translate("security.disabled.info"));
            // auto dispose later
            listenTo(contentCtr);
            Component resComp = contentCtr.getInitialComponent();
            LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(uureq, getWindowControl(), empty, resComp, /*do not save no prefs*/
            null);
            // auto dispose later
            listenTo(columnLayoutCtr);
            putInitialPanel(columnLayoutCtr.getInitialComponent());
        }

        @Override
        protected Controller handleOwnMenuTreeEvent(Object uobject, UserRequest uureq) {
            // no menutree means no menu events.
            return null;
        }
    };
    glc.init(ureq);
    return glc;
}
Also used : Panel(org.olat.core.gui.components.panel.Panel) MessageController(org.olat.core.gui.control.generic.messages.MessageController) GenericMainController(org.olat.core.gui.control.generic.layout.GenericMainController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Component(org.olat.core.gui.components.Component) UserRequest(org.olat.core.gui.UserRequest) RepositoryModule(org.olat.repository.RepositoryModule)

Example 68 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class IQManager method createLockedMessageController.

private GenericMainController createLockedMessageController(UserRequest ureq, WindowControl wControl, String fullName) {
    // wrap simple message into mainLayout
    GenericMainController glc = new GenericMainController(ureq, wControl) {

        @Override
        public void init(UserRequest uureq) {
            Panel empty = new Panel("empty");
            setTranslator(Util.createPackageTranslator(this.getClass(), uureq.getLocale()));
            Controller contentCtr = MessageUIFactory.createInfoMessage(uureq, getWindowControl(), translate("status.currently.locked.title"), translate("status.currently.locked", fullName));
            // auto dispose later
            listenTo(contentCtr);
            Component resComp = contentCtr.getInitialComponent();
            LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(uureq, getWindowControl(), empty, resComp, /*do not save no prefs*/
            null);
            // auto dispose later
            listenTo(columnLayoutCtr);
            putInitialPanel(columnLayoutCtr.getInitialComponent());
        }

        @Override
        protected Controller handleOwnMenuTreeEvent(Object uobject, UserRequest uureq) {
            // no menutree means no menu events.
            return null;
        }
    };
    glc.init(ureq);
    return glc;
}
Also used : Panel(org.olat.core.gui.components.panel.Panel) GenericMainController(org.olat.core.gui.control.generic.layout.GenericMainController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) GenericMainController(org.olat.core.gui.control.generic.layout.GenericMainController) IQEditController(org.olat.course.nodes.iq.IQEditController) OLATResourceableListeningWrapperController(org.olat.core.util.controller.OLATResourceableListeningWrapperController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController) Controller(org.olat.core.gui.control.Controller) Component(org.olat.core.gui.components.Component) UserRequest(org.olat.core.gui.UserRequest)

Example 69 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class EfficiencyStatementArtefactHandler method createDetailsController.

@Override
public Controller createDetailsController(UserRequest ureq, WindowControl wControl, AbstractArtefact artefact, boolean readOnlyMode) {
    EPFrontendManager ePFMgr = CoreSpringFactory.getImpl(EPFrontendManager.class);
    String statementXml = ePFMgr.getArtefactFullTextContent(artefact);
    EfficiencyStatement statement = null;
    if (StringHelper.containsNonWhitespace(statementXml)) {
        try {
            statement = (EfficiencyStatement) myXStream.fromXML(statementXml);
        } catch (Exception e) {
            log.error("Cannot load efficiency statement from artefact", e);
        }
    }
    CertificateAndEfficiencyStatementController efficiencyCtrl = new CertificateAndEfficiencyStatementController(wControl, ureq, statement);
    return new LayoutMain3ColsController(ureq, wControl, efficiencyCtrl);
}
Also used : LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) CertificateAndEfficiencyStatementController(org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController) EfficiencyStatement(org.olat.course.assessment.EfficiencyStatement) EPFrontendManager(org.olat.portfolio.manager.EPFrontendManager)

Example 70 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class QTI21AssessmentRunController method doStart.

private void doStart(UserRequest ureq) {
    removeAsListenerAndDispose(displayCtrl);
    OLATResourceable ores = OresHelper.createOLATResourceableTypeWithoutCheck("test");
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = addToHistory(ureq, ores, null);
    RepositoryEntry courseRe = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
    displayCtrl = new AssessmentTestDisplayController(ureq, bwControl, this, testEntry, courseRe, courseNode.getIdent(), deliveryOptions, overrideOptions, true, false, false);
    listenTo(displayCtrl);
    if (displayCtrl.getAssessmentTest() == null) {
        logError("Test cannot be read: " + testEntry + " in course: " + courseRe + " element: " + courseNode.getIdent(), null);
        showError("error.resource.corrupted");
    } else if (displayCtrl.isEnded()) {
        if (!displayCtrl.isResultsVisible()) {
            doExitAssessment(ureq, null, true);
            initAssessment(ureq);
        }
    } else {
        // in case displayController was unable to initialize, a message was set by displayController
        // this is the case if no more attempts or security check was unsuccessfull
        displayContainerController = new QTI21AssessmentMainLayoutController(ureq, getWindowControl(), displayCtrl);
        // autodispose
        listenTo(displayContainerController);
        // empty panel set as "menu" and "tool"
        Panel empty = new Panel("empty");
        Controller courseCloser = new DisposedCourseRestartController(ureq, getWindowControl(), courseRe);
        Controller disposedRestartController = new LayoutMain3ColsController(ureq, getWindowControl(), empty, courseCloser.getInitialComponent(), "disposed");
        displayContainerController.setDisposedMessageController(disposedRestartController);
        boolean fullWindow = deliveryOptions.isHideLms();
        if (fullWindow) {
            displayContainerController.setAsFullscreen(ureq);
        }
        displayContainerController.activate();
        assessmentStopped = false;
        singleUserEventCenter.registerFor(this, getIdentity(), assessmentInstanceOres);
        singleUserEventCenter.fireEventToListenersOf(new AssessmentEvent(AssessmentEvent.TYPE.STARTED, ureq.getUserSession()), assessmentEventOres);
        ThreadLocalUserActivityLogger.log(QTI21LoggingAction.QTI_START_IN_COURSE, getClass());
    }
}
Also used : Panel(org.olat.core.gui.components.panel.Panel) OLATResourceable(org.olat.core.id.OLATResourceable) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) AssessmentTestDisplayController(org.olat.ims.qti21.ui.AssessmentTestDisplayController) RepositoryEntry(org.olat.repository.RepositoryEntry) DisposedCourseRestartController(org.olat.course.DisposedCourseRestartController) WindowControl(org.olat.core.gui.control.WindowControl) DisposedCourseRestartController(org.olat.course.DisposedCourseRestartController) HighScoreRunController(org.olat.course.highscore.ui.HighScoreRunController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) BasicController(org.olat.core.gui.control.controller.BasicController) AssessmentResultController(org.olat.ims.qti21.ui.AssessmentResultController) IFrameDisplayController(org.olat.core.gui.control.generic.iframe.IFrameDisplayController) Controller(org.olat.core.gui.control.Controller) AssessmentTestDisplayController(org.olat.ims.qti21.ui.AssessmentTestDisplayController)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)80 WindowControl (org.olat.core.gui.control.WindowControl)38 Controller (org.olat.core.gui.control.Controller)36 UserRequest (org.olat.core.gui.UserRequest)34 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)28 Panel (org.olat.core.gui.components.panel.Panel)12 BasicController (org.olat.core.gui.control.controller.BasicController)12 RepositoryEntry (org.olat.repository.RepositoryEntry)12 MainLayoutController (org.olat.core.gui.control.generic.layout.MainLayoutController)10 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)10 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)8 OLATResourceable (org.olat.core.id.OLATResourceable)8 ContextEntry (org.olat.core.id.context.ContextEntry)8 AssertException (org.olat.core.logging.AssertException)8 ICourse (org.olat.course.ICourse)8 GlossaryMainController (org.olat.core.commons.modules.glossary.GlossaryMainController)6 Component (org.olat.core.gui.components.Component)6 TooledStackedPanel (org.olat.core.gui.components.stack.TooledStackedPanel)6 CloneController (org.olat.core.gui.control.generic.clone.CloneController)6 CertificateAndEfficiencyStatementController (org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController)6