Package org.olat.course.condition

Examples of org.olat.course.condition.Condition


   */
  public ScoreCalculator getScoreCalculator() {
    if (scoreCalculator == null) {
      scoreCalculator = new ScoreCalculator(null, null);
    }
    passedExpression = new Condition();
    passedExpression.setConditionId("passed");
    if (scoreCalculator.getPassedExpression() != null) {
      passedExpression.setConditionExpression(scoreCalculator.getPassedExpression());
      passedExpression.setExpertMode(true);
    }
    scoreExpression = new Condition();
    scoreExpression.setConditionId("score");
    if (scoreCalculator.getScoreExpression() != null) {
      scoreExpression.setConditionExpression(scoreCalculator.getScoreExpression());
      scoreExpression.setExpertMode(true);
    }
View Full Code Here


    // loop over all conditions, all must be true
    for (Iterator iter = listOfConditionExpressions.iterator(); iter.hasNext();) {
      ConditionExpression conditionExpression = (ConditionExpression) iter.next();
      Tracing.logDebug("conditionExpression=" + conditionExpression, this.getClass());
      Tracing.logDebug("conditionExpression.getId()=" + conditionExpression.getId(), this.getClass());
      Condition condition = new Condition();
      condition.setConditionId(conditionExpression.getId());
      condition.setConditionExpression(conditionExpression.getExptressionString());
      if ( !ci.evaluateCondition(condition) ) {
        allConditionAreValid = false;
      }
    }
    return allConditionAreValid;
View Full Code Here

    cpMenuForm.addSubmitKey("save", "save");
    cpMenuForm.addListener(this);
    cpConfigurationVc.put("cpMenuForm", cpMenuForm);

    // Accessibility precondition
    Condition accessCondition = cpNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), course.getCourseEnvironment().getCourseGroupManager(),
        accessCondition, "accessabilityConditionForm", AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), cpNode), euce);   
    listenTo(accessibilityCondContr);

    main.setContent(cpConfigurationVc);
View Full Code Here

        }
      }
      // else cancelled repo search
    } else if (source == accessibilityCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = accessibilityCondContr.getCondition();
        cpNode.setPreConditionAccess(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }
    }
  }
View Full Code Here

    myContent.put(tuConfigForm.getComponentName(), tuConfigForm);

    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, tuCourseNode), euce);   
    this.listenTo(accessibilityCondContr);

    // Enable preview button only if node configuration is valid
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);
      }
    }
  }
View Full Code Here

   *
   * @return Condition
   */
  public Condition getPreConditionAccess() {
    if (preConditionAccess == null) {
      preConditionAccess = new Condition();
    }
    preConditionAccess.setConditionId("accessability");
    return preConditionAccess;
  }
View Full Code Here

    myContent.put(configForm);

    // not needed: setInitialComponent(myContent);
    // Accessibility precondition
    Condition accessCondition = courseNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, getWindowControl(), course.getCourseEnvironment().getCourseGroupManager(),
        accessCondition, "accessabilityConditionForm", AssessmentHelper.getAssessableNodes(course
            .getEditorTreeModel(), coCourseNode),euce);   
    this.listenTo(accessibilityCondContr);
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 == accessibilityCondContr) {
      if (event == Event.CHANGED_EVENT) {
        Condition cond = accessibilityCondContr.getCondition();
        courseNode.setPreConditionAccess(cond);
        fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
      }
    }
  }
View Full Code Here

    this.moduleConfiguration = moduleConfiguration;
    this.courseNode = courseNode;

    editVc = this.createVelocityContainer("edit");

    Condition accessCondition = courseNode.getPreConditionAccess();
    accessibilityCondContr = new ConditionEditController(ureq, wControl, course.getCourseEnvironment().getCourseGroupManager(),
        accessCondition, "accessabilityConditionForm", AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), courseNode),
        userCourseEnv);
    this.listenTo(accessibilityCondContr);
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.