Package org.olat.course.condition

Examples of org.olat.course.condition.GroupOrAreaSelectionController


 
  @Override
  protected void  formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == groupChooserLink) {
      removeAsListenerAndDispose (groupChooser);
      groupChooser = new GroupOrAreaSelectionController(
          0, //group
          getWindowControl(), ureq,
          "group", course.getCourseEnvironment().getCourseGroupManager(),
          group.getValue()
      );
      listenTo(groupChooser);
       
      removeAsListenerAndDispose(cmc);
      cmc = new CloseableModalController(
        getWindowControl(),
        translate("close"),
        groupChooser.getInitialComponent()
      );
      listenTo(cmc);
      cmc.activate();
     
    } else if (source == areaChooserLink) {
      removeAsListenerAndDispose (areaChooser);
      areaChooser = new GroupOrAreaSelectionController(
          1, // area
          getWindowControl(), ureq,
          "area", course.getCourseEnvironment().getCourseGroupManager(),
          area.getValue()
      );
View Full Code Here


      // user wants to choose groups.. either link clicked -> Startpoint for
      // group choosing workflow
      if (groupChooseC != null) groupChooseC.dispose();

      // already groups -> it is about selecting groups
      groupChooseC = new GroupOrAreaSelectionController(0, getWindowControl(), ureq, "group", cev.getCourseGroupManager(),
          easyGroupTE.getValue());
      groupChooseC.addControllerListener(this);


      //the main form gets overlayed -> hence do not mark as dirty
      //otherwise clicking any link in the overlay results in a
      //alert box -> "you have unsaved form data"
      //one has to listen for cmc closing events and then reactivate
      //dirty setting!! TODO:pb: find a better solution as this is error prone
      this.flc.getRootForm().setDirtyMarking(false);
      if (cmc != null) cmc.dispose();
      cmc = new CloseableModalController(getWindowControl(), "close", groupChooseC.getInitialComponent(), true, getTranslator().translate("popupchoosegroups"));
      cmc.addControllerListener(this);
      cmc.activate();

    } else if (source == createGroupsLink) {
      // no groups in group management -> directly show group create dialog
      BGContext bgContext = getDefaultBGContext();
      String[] csvGroupName = easyGroupTE.isEmpty() ? new String[0] : easyGroupTE.getValue().split(",");
      // determine if bulkmode or not
      if (groupCreateCntrllr != null) groupCreateCntrllr.dispose();
      boolean bulkMode = csvGroupName.length > 1;
      groupCreateCntrllr = BGControllerFactory.getInstance().createNewBGController(ureq, getWindowControl(), true,
          bgContext, bulkMode, easyGroupTE.getValue());
      groupCreateCntrllr.addControllerListener(this);

      //the main form gets overlayed -> hence do not mark as dirty
      //otherwise clicking any link in the overlay results in a
      //alert box -> "you have unsaved form data"
      //one has to listen for cmc closing events and then reactivate
      //dirty setting!! TODO:pb: find a better solution as this is error prone
      this.flc.getRootForm().setDirtyMarking(false);
      if (cmc != null) cmc.dispose();
      cmc = new CloseableModalController(getWindowControl(), "close", groupCreateCntrllr.getInitialComponent());
      cmc.addControllerListener(this);
      cmc.activate();

    } else if (source == chooseAreasLink) {
      if (areaChooseC != null) areaChooseC.dispose();

      // already areas -> choose areas
      if (areaChooseC != null) areaChooseC.dispose();
      areaChooseC = new GroupOrAreaSelectionController(1, getWindowControl(), ureq, "area", cev.getCourseGroupManager(),
          easyAreaTE.getValue());
      areaChooseC.addControllerListener(this);
     
      //the main form gets overlayed -> hence do not mark as dirty
      //otherwise clicking any link in the overlay results in a
View Full Code Here

TOP

Related Classes of org.olat.course.condition.GroupOrAreaSelectionController

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.