Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.Controller


  }

  private void doLaunch(UserRequest ureq) {
    dockC = new DockController(ureq, getWindowControl(), false, new ControllerCreator(){
      public Controller createController(UserRequest lureq, WindowControl lwControl) {
        Controller foCtr = ForumUIFactory.getStandardForumController(lureq, lwControl, forum, foCallback);
        Controller titledCtrl = TitledWrapperHelper.getWrapper(lureq, lwControl, foCtr, courseNode, "o_fo_icon");
        foCtr.addControllerListener(FOCourseNodeRunController.this);
        return titledCtrl;
      }},
      new DockLayoutControllerCreatorCallback() {
        public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
          return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
            @SuppressWarnings("synthetic-access")
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              // Wrap in column layout, popup window needs a layout controller
              Controller ctr = contentControllerCreator.createController(lureq, lwControl);
              LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, ctr.getInitialComponent(),
                  null);
              layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), courseEnv));
              layoutCtr.addDisposableChildController(ctr);
              return layoutCtr;
            }
View Full Code Here


   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.course.run.userview.NodeEvaluation)
   */
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    // Do not allow guests to send anonymous emails
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
      controller = new CORunController(getModuleConfiguration(), ureq, wControl, userCourseEnv, this);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_co_icon");
    return new NodeRunConstructionResult(ctrl);
  }
View Full Code Here

      // build up the context path
      OLATResourceable businessOres = repositoryEntry;
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
      WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, dt.getWindowControl());
     
      Controller ctrl = typeToLaunch.getLaunchController(ores, null, ureq, bwControl);
      // if resource is an image, PDF or eq. (e.g. served by resulting media request), no controller is returned.
      // FIXME:fj:test this
      if (ctrl == null) return;
      dt.setController(ctrl);
      dts.addDTab(dt);
View Full Code Here

      if (dt == null){
        //null means DTabs are full -> warning is shown
        return;
      }
      //user activity logger is set by course factory
      Controller editorController = typeToEdit.getEditorController(ores, ureq, dt.getWindowControl());
      if(editorController == null){
        //editor could not be created -> warning is shown
        return;
      }
      dt.setController(editorController);
View Full Code Here

   *      org.olat.course.run.userview.NodeEvaluation)
   */
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    // Do not allow guests to start tests
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
      AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
      IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      TestFileResource fr = new TestFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        //QTI1
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
        String title = trans.translate("editor.lock.title");
        String message = trans.translate("editor.lock.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
      }
    }
   
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_iqtest_icon");
    return new NodeRunConstructionResult(ctrl);
  }
View Full Code Here

      listenTo(coFoCtr);//dispose as this controller is disposed
      myContent.put("myCoForm", coFoCtr.getInitialComponent());
      putInitialPanel(myContent);
    } else { // no email adresses at all
      String message = translate("error.msg.send.no.rcps");
      Controller mCtr = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), null, message);
      listenTo(mCtr);//to be disposed as this controller gets disposed
      putInitialPanel(mCtr.getInitialComponent());
    }
  }
View Full Code Here

   
   
    //disposed message controller
    //must be created beforehand
    Panel empty = new Panel("empty");//empty panel set as "menu" and "tool"
    Controller courseCloser = new DisposedBGAManagementController(ureq, wControl, this);
    Controller disposedBGAManagementController = new LayoutMain3ColsController(ureq, wControl, empty, empty, courseCloser.getInitialComponent(), "disposed " + "groupmngt" + bgContext.getKey());
    setDisposedMsgController(disposedBGAManagementController);

   
   
    // register for changes in this group context
View Full Code Here

   *      org.olat.course.run.userview.NodeEvaluation)
   */
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    CalRunController calCtlr = new CalRunController(wControl, ureq, this, userCourseEnv.getCourseEnvironment(), ne);
    Controller wrapperCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, calCtlr, this, "o_cal_icon");
    return new NodeRunConstructionResult(wrapperCtrl);
  }
View Full Code Here

    for (int i = 0; i < chdCnt; i++) {
      NodeEvaluation neChd = ne.getNodeEvaluationChildAt(i);
      if (neChd.isVisible()) {
        // Build and add child generic or specific peek view
        CourseNode child = neChd.getCourseNode();
        Controller childViewController = null;
        Controller childPeekViewController = null;
        if (displayType.equals(STCourseNodeEditController.CONFIG_VALUE_DISPLAY_PEEKVIEW)) {
          if (peekviewChildNodes.size() == 0) {
            // Special case: no child nodes configured. This is the case when
            // the node has been configured before it had any children. We just
            // use the first children as they appear in the list
View Full Code Here

   */
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    ScormRunController cprunC = new ScormRunController(getModuleConfiguration(), ureq, userCourseEnv, wControl, this, false);
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, cprunC, this, "o_scorm_icon");
    // no inline-in-olat-menu integration possible: no display configuration option
    return new NodeRunConstructionResult(ctrl);
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.Controller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.