Package org.olat.course.condition

Examples of org.olat.course.condition.Condition


   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == readerCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = readerCondContr.getCondition();
        foNode.setPreConditionReader(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }else if(event instanceof BGContextEvent) {
        //fired by condition edit controllers if areas / groups created
        //updated other condition controllers -> e.g. change create link to choose
        moderatorCondContr.updateGroupsAndAreasCheck();
        posterCondContr.updateGroupsAndAreasCheck();
      }
    } else if (source == posterCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = posterCondContr.getCondition();
        foNode.setPreConditionPoster(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }else if(event instanceof BGContextEvent) {
        //fired by condition edit controllers if areas / groups created
        //updated other condition controllers -> e.g. change create link to choose
        readerCondContr.updateGroupsAndAreasCheck();
        moderatorCondContr.updateGroupsAndAreasCheck();
      }
    } else if (source == moderatorCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = moderatorCondContr.getCondition();
        foNode.setPreConditionModerator(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }else if(event instanceof BGContextEvent) {
        //fired by condition edit controllers if areas / groups created
        //updated other condition controllers -> e.g. change create link to choose
View Full Code Here


    myContent.put(fcPanel.getComponentName(), fcPanel);
   
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();
    //Accessibility precondition
    Condition accessCondition = courseNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, accessCondition,
        "accessabilityConditionForm", AssessmentHelper.getAssessableNodes(editorModel, spCourseNode), euce);   
    this.listenTo(accessibilityCondContr);
   
  }
View Full Code Here

   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == accessibilityCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = accessibilityCondContr.getCondition();
        courseNode.setPreConditionAccess(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }
    }
    else if (source == fccecontr) {
View Full Code Here

    accessVC = new VelocityContainer("accessVC", FeedNodeEditController.class, "access", getTranslator(), this);
    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();

    // Moderator precondition
    Condition moderatorCondition = node.getPreConditionModerator();
    moderatroCtr = new ConditionEditController(ureq, getWindowControl(), groupMgr, moderatorCondition, "moderatorConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, node), uce);
    this.listenTo(moderatroCtr);
    accessVC.put("moderatorCondition", moderatroCtr.getInitialComponent());

    // Poster precondition
    Condition posterCondition = node.getPreConditionPoster();
    posterCtr = new ConditionEditController(ureq, getWindowControl(), groupMgr, posterCondition, "posterConditionForm", AssessmentHelper
        .getAssessableNodes(editorModel, node), uce);
    this.listenTo(posterCtr);
    accessVC.put("posterCondition", posterCtr.getInitialComponent());

    // Reader precondition
    Condition readerCondition = node.getPreConditionReader();
    readerCtr = new ConditionEditController(ureq, getWindowControl(), groupMgr, readerCondition, "readerConditionForm", AssessmentHelper
        .getAssessableNodes(editorModel, node), uce);
    this.listenTo(readerCtr);
    accessVC.put("readerCondition", readerCtr.getInitialComponent());
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == moderatroCtr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = moderatroCtr.getCondition();
        node.setPreConditionModerator(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      } else if (event instanceof BGContextEvent) {
        // fired by condition edit controllers if areas / groups created
        // updated other condition controllers -> e.g. change create link to
        // choose
        readerCtr.updateGroupsAndAreasCheck();
        posterCtr.updateGroupsAndAreasCheck();
      }
    } else if (source == posterCtr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = posterCtr.getCondition();
        node.setPreConditionPoster(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      } else if (event instanceof BGContextEvent) {
        // fired by condition edit controllers if areas / groups created
        // updated other condition controllers -> e.g. change create link to
        // choose
        moderatroCtr.updateGroupsAndAreasCheck();
        readerCtr.updateGroupsAndAreasCheck();
      }
    } else if (source == readerCtr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = readerCtr.getCondition();
        node.setPreConditionReader(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      } else if (event instanceof BGContextEvent) {
        // fired by condition edit controllers if areas / groups created
        // updated other condition controllers -> e.g. change create link to
View Full Code Here

    // Find assessable children nodes
    assessableChildren = AssessmentHelper.getAssessableNodes(editorModel, stNode);

    // Accessibility precondition
    Condition accessCondition = stNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, accessCondition, "accessabilityConditionForm",
        assessableChildren, euce);   
    this.listenTo(accessibilityCondContr);

    ScoreCalculator scoreCalc = stNode.getScoreCalculator();
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == accessibilityCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = accessibilityCondContr.getCondition();
        stNode.setPreConditionAccess(cond);
        fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }
    } else if (event == FileChooseCreateEditController.FILE_CHANGED_EVENT) {
      chosenFile = fccecontr.getChosenFile();
View Full Code Here

    myTabbedPane = null;
       
    accessabiliryContent = this.createVelocityContainer("edit");

    // Uploader precondition
    Condition uploadCondition = bcNode.getPreConditionUploaders();
    uploaderCondContr = new ConditionEditController(ureq, getWindowControl(), course.getCourseEnvironment().getCourseGroupManager(),
        uploadCondition, "uploaderConditionForm", AssessmentHelper
            .getAssessableNodes(course.getEditorTreeModel(), bcNode), euce);   
    this.listenTo(uploaderCondContr);
    accessabiliryContent.put("uploadCondition", uploaderCondContr.getInitialComponent());

    // Uploader precondition
    Condition downloadCondition = bcNode.getPreConditionDownloaders();
    downloaderCondContr = new ConditionEditController(ureq, getWindowControl(), course.getCourseEnvironment().getCourseGroupManager(),
        downloadCondition, "downloadConditionForm", AssessmentHelper
            .getAssessableNodes(course.getEditorTreeModel(), bcNode), euce);   
    this.listenTo(downloaderCondContr);
    accessabiliryContent.put("downloadCondition", downloaderCondContr.getInitialComponent());
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == uploaderCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = uploaderCondContr.getCondition();
        bcNode.setPreConditionUploaders(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }else if(event instanceof BGContextEvent) {
        //fired by condition edit controllers if areas / groups created
        //updated other condition controllers -> e.g. change create link to choose
        downloaderCondContr.updateGroupsAndAreasCheck();
       
      }
    } else if (source == downloaderCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = downloaderCondContr.getCondition();
        bcNode.setPreConditionDownloaders(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }else if(event instanceof BGContextEvent) {
        //fired by condition edit controllers if areas / groups created
        //updated other condition controllers -> e.g. change create link to choose
View Full Code Here

    this.listenTo(dropConditionC);
    Boolean hasDropboxValue = ((Boolean) config.get(TACourseNode.CONF_DROPBOX_ENABLED)!=null) ? (Boolean) config.get(TACourseNode.CONF_DROPBOX_ENABLED) : false;
    if (hasDropboxValue) accessabilityVC.put("dropCondition", dropConditionC.getInitialComponent());
       
    //returnbox precondition - use dropbox condition if none defined for returnbox
    Condition dropboxCondition = node.getConditionDrop();   
    Condition returnboxCondition = node.getConditionReturnbox();
    if(dropboxCondition!=null && returnboxCondition!= null && returnboxCondition.getConditionExpression()==null) {
      //old courses: use ConditionExpression from dropbox if none defined for returnbox     
      returnboxCondition = dropboxCondition;
      returnboxCondition.setConditionId(TACourseNode.ACCESS_RETURNBOX);
      node.setConditionReturnbox(returnboxCondition);     
    }
    returnboxConditionC = new ConditionEditController(ureq, getWindowControl(), groupMgr, returnboxCondition, "returnboxConditionForm",
        AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), node), euce);
    this.listenTo(returnboxConditionC);
View Full Code Here

TOP

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

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.