Package org.olat.course.condition.interpreter

Examples of org.olat.course.condition.interpreter.ConditionExpression


    }
    //
    String coS = getPreConditionDownloaders().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getPreConditionDownloaders().getConditionId());
      ce.setExpressionString(getPreConditionDownloaders().getConditionExpression());
      retVal.add(ce);
    }
    //
    coS = getPreConditionUploaders().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getPreConditionUploaders().getConditionId());
      ce.setExpressionString(getPreConditionUploaders().getConditionExpression());
      retVal.add(ce);
    }
    //
    return retVal;
  }
View Full Code Here


    }
    //
    String coS = getConditionDrop().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionDrop().getConditionId());
      ce.setExpressionString(getConditionDrop().getConditionExpression());
      retVal.add(ce);
    }
    coS = getConditionReturnbox().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionReturnbox().getConditionId());
      ce.setExpressionString(getConditionReturnbox().getConditionExpression());
      retVal.add(ce);
    else if(coS == null && getConditionDrop().getConditionExpression()!=null && !getConditionDrop().getConditionExpression().equals("")) {
      //old courses that had dropbox but no returnbox: use for returnbox the conditionExpression from dropbox
      ConditionExpression ce = new ConditionExpression(getConditionReturnbox().getConditionId());
      ce.setExpressionString(getConditionDrop().getConditionExpression());
      retVal.add(ce);
    }
    coS = getConditionScoring().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionScoring().getConditionId());
      ce.setExpressionString(getConditionScoring().getConditionExpression());
      retVal.add(ce);
    }
    coS = getConditionTask().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionTask().getConditionId());
      ce.setExpressionString(getConditionTask().getConditionExpression());
      retVal.add(ce);
    }
    //
    return retVal;
  }
View Full Code Here

    }
    //
    String coS = getConditionDrop().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionDrop().getConditionId());
      ce.setExpressionString(getConditionDrop().getConditionExpression());
      retVal.add(ce);
    }
    coS = getConditionScoring().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getConditionScoring().getConditionId());
      ce.setExpressionString(getConditionScoring().getConditionExpression());
      retVal.add(ce);
    }
    //
    return retVal;
  }
View Full Code Here

  public List<ConditionExpression> getConditionExpressions() {
    ArrayList<ConditionExpression> retVal = new ArrayList<ConditionExpression>();
    String coS = getPreConditionVisibility().getConditionExpression();
    if (coS != null && !coS.equals("")) {
      // an active condition is defined
      ConditionExpression ce = new ConditionExpression(getPreConditionVisibility().getConditionId());
      ce.setExpressionString(getPreConditionVisibility().getConditionExpression());
      retVal.add(ce);
    }
    //
    return retVal;
  }
View Full Code Here

     * there is course editor environment, we can check further. Iterate over
     * all conditions of this course node, validate the condition expression and
     * transform the condition error message into a status description
     */
    for (int i = 0; i < condExprs.size(); i++) {
      ConditionExpression ce = condExprs.get(i);
      ConditionErrorMessage[] cems = cev.validateConditionExpression(ce);
      if (cems != null && cems.length > 0) {
        for (int j = 0; j < cems.length; j++) {
          StatusDescription sd = new StatusDescription(StatusDescription.WARNING, cems[j].errorKey, cems[j].solutionMsgKey,
              cems[j].errorKeyParams, translatorStr);
View Full Code Here

TOP

Related Classes of org.olat.course.condition.interpreter.ConditionExpression

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.