Package org.olat.core.gui.control

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


      public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
        return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
          @SuppressWarnings("synthetic-access")
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            // wrapp 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;
          }
        });
      }
    };
   
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), controller, courseNode, "o_tu_icon");
    if(ctrl instanceof CloneableController) {
      cloneC= new CloneController(ureq, getWindowControl(), (CloneableController)ctrl, clccc);
      listenTo(cloneC);
      main.setContent(cloneC.getInitialComponent());
    } else {
View Full Code Here


    FeedSecurityCallback callback = new FeedNodeSecurityCallback(ne, isAdmin, isGuest);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(this));
    FeedMainController podcastCtr = PodcastUIFactory.getInstance(ureq.getLocale()).createMainController(entry.getOlatResource(), ureq, control,
        callback, courseId, nodeId);
    podcastCtr.activate(ureq, nodecmd);
    Controller wrapperCtrl = TitledWrapperHelper.getWrapper(ureq, control, podcastCtr, this, "o_podcast_icon");
    NodeRunConstructionResult result = new NodeRunConstructionResult(wrapperCtrl);
    return result;
  }
View Full Code Here

      String nodeId = this.getIdent();
      boolean isAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
      boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
      FeedSecurityCallback callback = new FeedNodeSecurityCallback(ne, isAdmin, isGuest);
      FeedUIFactory uiFactory = PodcastUIFactory.getInstance(ureq.getLocale());
      Controller peekViewController = new FeedPeekviewController(entry.getOlatResource(), ureq, wControl, callback, courseId, nodeId, uiFactory, 2, "o_podcast_peekview");
      return peekViewController;
    } else {
      // use standard peekview
      return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
View Full Code Here

  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq) {
    NodeRunConstructionResult ncr;
    if (isExternalMenuConfigured()) {
      // integrate it into the olat menu
      Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), this, cpNode, "o_cp_icon");
      ncr = new NodeRunConstructionResult(ctrl, treeModel, selNodeId, treeNodeClickListener);
    } else { // no menu to integrate
      Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), this, cpNode, "o_cp_icon");
      ncr = new NodeRunConstructionResult(ctrl);
    }
    return ncr;
  }
View Full Code Here

    FeedSecurityCallback callback = new FeedNodeSecurityCallback(ne, isAdmin, isGuest);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(this));
    FeedMainController blogCtr = BlogUIFactory.getInstance(ureq.getLocale()).createMainController(entry.getOlatResource(), ureq, wControl, callback,
        courseId, nodeId);
    blogCtr.activate(ureq, nodecmd);
    Controller wrapperCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, blogCtr, this, "o_blog_icon");
    NodeRunConstructionResult result = new NodeRunConstructionResult(wrapperCtrl);
    return result;

  }
View Full Code Here

      String nodeId = this.getIdent();
      boolean isAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
      boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
      FeedSecurityCallback callback = new FeedNodeSecurityCallback(ne, isAdmin, isGuest);
      FeedUIFactory uiFactory = BlogUIFactory.getInstance(ureq.getLocale());
      Controller peekViewController = new FeedPeekviewController(entry.getOlatResource(), ureq, wControl, callback, courseId, nodeId, uiFactory, 2, "o_blog_peekview");
      return peekViewController;
    } else {
      // use standard peekview
      return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
View Full Code Here

      }

      public Controller createController(UserRequest ureq, WindowControl wControl, Object arg) {
        if (arg instanceof ICourse) {
          ICourse course = (ICourse) arg;
          Controller ctr = new CampusManagementController(ureq, wControl, course);
          return ctr;
        } else throw new AssertException("SAPCampusMgntExtension needs a ICourse as the argument parameter: arg = "+arg);
      }
    });
  }
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 start questionnaires
    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 {
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      SurveyFileResource fr = new SurveyFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
        IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
        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_iqsurv_icon");
    return new NodeRunConstructionResult(ctrl);
  }
View Full Code Here

      public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
        return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
          @SuppressWarnings("synthetic-access")
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            // wrapp 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

          if (dt == null) {
            // does not yet exist -> create and add
            dt = dts.createDTab(repoEntry.getOlatResource(), repoEntry.getDisplayname());
            // tabs full
            if (dt != null) {
              Controller runCtr = RepositoyUIFactory.createLaunchController(repoEntry, null, ureq, getWindowControl());         
              dt.setController(runCtr);
              dts.addDTab(dt);
              dts.activate(ureq, dt, null); // null: do not activate to a certain view
            }
          }
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.