Search in sources :

Example 81 with ControllerCreator

use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.

the class OlatFooterController method doOpenImpressum.

protected void doOpenImpressum(UserRequest ureq) {
    ControllerCreator impressumControllerCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new ImpressumMainController(lureq, lwControl);
        }
    };
    PopupBrowserWindow popupBrowserWindow;
    if (ureq.getUserSession().isAuthenticated()) {
        popupBrowserWindow = Windows.getWindows(ureq).getWindowManager().createNewPopupBrowserWindowFor(ureq, impressumControllerCreator);
    } else {
        popupBrowserWindow = Windows.getWindows(ureq).getWindowManager().createNewUnauthenticatedPopupWindowFor(ureq, impressumControllerCreator);
    }
    popupBrowserWindow.open(ureq);
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) ImpressumMainController(org.olat.core.commons.controllers.impressum.ImpressumMainController) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 82 with ControllerCreator

use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.

the class QTI12AssessmentStatisticsController method printPages.

private void printPages(UserRequest ureq) {
    ControllerCreator printControllerCreator = new ControllerCreator() {

        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new QTI12PrintController(lureq, lwControl, resourceResult);
        }
    };
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(printControllerCreator);
    openInNewBrowserWindow(ureq, layoutCtrlr);
}
Also used : WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 83 with ControllerCreator

use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.

the class AssessmentResultController method doPrint.

private void doPrint(UserRequest ureq) {
    ControllerCreator creator = (uureq, wwControl) -> {
        AssessmentResultController printViewCtrl = new AssessmentResultController(uureq, wwControl, assessedIdentity, anonym, candidateSession, fUnzippedDirRoot, mapperUri, submissionMapperUri, options, false, true, false);
        printViewCtrl.flc.contextPut("printCommand", Boolean.TRUE);
        listenTo(printViewCtrl);
        return printViewCtrl;
    };
    openInNewBrowserWindow(ureq, creator);
}
Also used : Date(java.util.Date) AssessmentItemSession(org.olat.ims.qti21.AssessmentItemSession) Autowired(org.springframework.beans.factory.annotation.Autowired) Identifier(uk.ac.ed.ph.jqtiplus.types.Identifier) ItemVariable(uk.ac.ed.ph.jqtiplus.node.result.ItemVariable) MediaResource(org.olat.core.gui.media.MediaResource) BigDecimal(java.math.BigDecimal) ControlObjectSessionState(uk.ac.ed.ph.jqtiplus.state.ControlObjectSessionState) Map(java.util.Map) DownloadeableMediaResource(org.olat.fileresource.DownloadeableMediaResource) URI(java.net.URI) ImsQTI21Resource(org.olat.fileresource.types.ImsQTI21Resource) TestPlan(uk.ac.ed.ph.jqtiplus.state.TestPlan) AssessmentResult(uk.ac.ed.ph.jqtiplus.node.result.AssessmentResult) TestNodeType(uk.ac.ed.ph.jqtiplus.state.TestPlanNode.TestNodeType) SessionStatus(uk.ac.ed.ph.jqtiplus.node.result.SessionStatus) WindowControl(org.olat.core.gui.control.WindowControl) UserShortDescription(org.olat.admin.user.UserShortDescription) Component(org.olat.core.gui.components.Component) Value(uk.ac.ed.ph.jqtiplus.value.Value) Mapper(org.olat.core.dispatcher.mapper.Mapper) FeedbackResultFormItem(org.olat.ims.qti21.ui.components.FeedbackResultFormItem) QTI21Service(org.olat.ims.qti21.QTI21Service) OutcomeVariable(uk.ac.ed.ph.jqtiplus.node.result.OutcomeVariable) List(java.util.List) QtiNodesExtractor(org.olat.ims.qti21.model.xml.QtiNodesExtractor) Identity(org.olat.core.id.Identity) NumberValue(uk.ac.ed.ph.jqtiplus.value.NumberValue) TestPlanNode(uk.ac.ed.ph.jqtiplus.state.TestPlanNode) ItemResult(uk.ac.ed.ph.jqtiplus.node.result.ItemResult) TestResult(uk.ac.ed.ph.jqtiplus.node.result.TestResult) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) ItemBodyResultFormItem(org.olat.ims.qti21.ui.components.ItemBodyResultFormItem) AssessmentSectionSessionState(uk.ac.ed.ph.jqtiplus.state.AssessmentSectionSessionState) ResourceLocator(uk.ac.ed.ph.jqtiplus.xmlutils.locators.ResourceLocator) ResolvedAssessmentItem(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentItem) HashMap(java.util.HashMap) QTI21Constants(org.olat.ims.qti21.QTI21Constants) ItemSessionState(uk.ac.ed.ph.jqtiplus.state.ItemSessionState) QTI21QuestionType(org.olat.ims.qti21.model.QTI21QuestionType) FormItem(org.olat.core.gui.components.form.flexible.FormItem) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) ArrayList(java.util.ArrayList) AssessmentTest(uk.ac.ed.ph.jqtiplus.node.test.AssessmentTest) Event(org.olat.core.gui.control.Event) FormBasicController(org.olat.core.gui.components.form.flexible.impl.FormBasicController) HttpServletRequest(javax.servlet.http.HttpServletRequest) FormItemContainer(org.olat.core.gui.components.form.flexible.FormItemContainer) AssessmentItem(uk.ac.ed.ph.jqtiplus.node.item.AssessmentItem) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) AssessmentItemRef(uk.ac.ed.ph.jqtiplus.node.test.AssessmentItemRef) TestPlanNodeKey(uk.ac.ed.ph.jqtiplus.state.TestPlanNodeKey) PathResourceLocator(org.olat.fileresource.types.ImsQTI21Resource.PathResourceLocator) QTI21AssessmentResultsOptions(org.olat.ims.qti21.QTI21AssessmentResultsOptions) BooleanValue(uk.ac.ed.ph.jqtiplus.value.BooleanValue) Controller(org.olat.core.gui.control.Controller) CodeHelper(org.olat.core.util.CodeHelper) File(java.io.File) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) NotFoundMediaResource(org.olat.core.gui.media.NotFoundMediaResource) UserManager(org.olat.user.UserManager) AssessmentHelper(org.olat.course.assessment.AssessmentHelper) TerminatedStaticCandidateSessionContext(org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext) UserRequest(org.olat.core.gui.UserRequest) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator)

Example 84 with ControllerCreator

use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.

the class QTI21AssessmentTestStatisticsController method printPages.

private void printPages(UserRequest ureq) {
    ControllerCreator printControllerCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new QTI21PrintController(lureq, lwControl, resourceResult);
        }
    };
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(printControllerCreator);
    openInNewBrowserWindow(ureq, layoutCtrlr);
}
Also used : WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 85 with ControllerCreator

use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.

the class AuthBFWCParts method createHeaderController.

/**
 * @see org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts#createHeaderController(org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
 */
@Override
public Controller createHeaderController(UserRequest ureq, WindowControl wControl) {
    Controller headerCtr = null;
    // ----------- header, optional (e.g. for logo, advertising ) ------------------
    if (CoreSpringFactory.containsBean("fullWebApp.HeaderControllerCreator")) {
        ControllerCreator headerControllerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.HeaderControllerCreator");
        headerCtr = headerControllerCreator.createController(ureq, wControl);
    }
    return headerCtr;
}
Also used : LockableController(org.olat.core.commons.fullWebApp.LockableController) Controller(org.olat.core.gui.control.Controller) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator)

Aggregations

ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)92 UserRequest (org.olat.core.gui.UserRequest)72 WindowControl (org.olat.core.gui.control.WindowControl)72 Controller (org.olat.core.gui.control.Controller)42 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)28 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 LockableController (org.olat.core.commons.fullWebApp.LockableController)20 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)12 Identity (org.olat.core.id.Identity)12 ArrayList (java.util.ArrayList)10 List (java.util.List)10 FormBasicController (org.olat.core.gui.components.form.flexible.impl.FormBasicController)10 TableEvent (org.olat.core.gui.components.table.TableEvent)10 AssertException (org.olat.core.logging.AssertException)10 UserInfoMainController (org.olat.user.UserInfoMainController)10 OlatFooterController (org.olat.gui.control.OlatFooterController)8 HashMap (java.util.HashMap)6 SingleIdentityChosenEvent (org.olat.basesecurity.events.SingleIdentityChosenEvent)6 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)6 Event (org.olat.core.gui.control.Event)6