Examples of CourseEditorEnv


Examples of org.olat.course.editor.CourseEditorEnv

    if (!(inStack[0] instanceof String)) {
      return handleException(new ArgumentParseException(ArgumentParseException.WRONG_ARGUMENT_FORMAT,
        name, "", "error.argtype.attributename", "solution.example.name.infunction"));
    }
   
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      // return emtyp string to continue with condition evaluation test
      return defaultValue();
    }
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

   *
   * @param e
   * @return default value of function
   */
  protected Object handleException(Exception e){
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      cev.pushError(e);
    }
    return defaultValue();
  }
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

        "error.argtype.attribvalue", "solution.example.name.infunction"));
    String attributeId = (String) inStack[0];
    /*
     * check reference integrity
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      // remember the reference to the attribute for this condtion
      cev.addSoftReference("attribute", attributeId);
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }


View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

        name, "", "error.argtype.coursnodeidexpeted", "solution.example.node.infunction"));
    String nodeId = (String) inStack[0];
    /*
     * check reference integrity
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      if (!cev.existsNode(nodeId)) { return handleException(new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name,
          nodeId, "error.notfound.coursenodeid", "solution.copypastenodeid")); }
      if (!cev.isEnrollmentNode(nodeId)) { return handleException(new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name,
          nodeId, "error.notenrollment.coursenodeid", "solution.chooseenrollment")); }
      // remember the reference to the node id for this condtion
      cev.addSoftReference("courseNodeId", nodeId);
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }

    /*
 
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

        "error.argtype.username", "solution.example.name.infunction"));
    String userName = (String)inStack[0];
    /*
     * expression check only if cev != null
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }
   
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

   */
  public Object call(Object[] inStack) {
    /*
     * expression check only if cev != null
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }

View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

    // the precondition
    }
    /*
     *  not empty, now test precondition syntax and for existing soft references
     */
    CourseEditorEnv cev = euce.getCourseEditorEnv();
    ConditionExpression ce = new ConditionExpression(conditionId,tprecond.getValue());
    ConditionErrorMessage[] cerrmsg = cev.validateConditionExpression(ce);
    /*
     * display any error detected in the condition expression testing.
     */
    if (cerrmsg != null && cerrmsg.length >0) {
      //the error message
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

 
  /**
   * @see com.neemsoft.jmep.VariableCB#getValue()
   */
  public Object getValue() {
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if(cev!=null) {
      return new Double(0);
    }
    CourseEnvironment ce = getUserCourseEnv().getCourseEnvironment();
    long time = ce.getCurrentTimeMillis();
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

    String areaName = (String)inStack[0];
    areaName = areaName != null ? areaName.trim() : areaName;
    /*
     * check reference integrity
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      if (!cev.existsArea(areaName)) { return handleException( new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name, areaName,
          "error.notfound.name", "solution.checkgroupmanagement")); }
      // remember the reference to the node id for this condtion
      cev.addSoftReference("areaId", areaName);
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }

    /*
 
View Full Code Here

Examples of org.olat.course.editor.CourseEditorEnv

    String groupName = (String)inStack[0];
    groupName = groupName != null ? groupName.trim() : null;
    /*
     * check reference integrity
     */
    CourseEditorEnv cev = getUserCourseEnv().getCourseEditorEnv();
    if (cev != null) {
      if (!cev.existsGroup(groupName)) { return handleException( new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name, groupName,
          "error.notfound.name", "solution.checkgroupmanagement")); }
      // remember the reference to the node id for this condtion
      cev.addSoftReference("groupId", groupName);
      // return a valid value to continue with condition evaluation test
      return defaultValue();
    }

    /*
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.