Package org.olat.course.editor

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


   *
   * @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

        "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

        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

        "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

   */
  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

    // 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

 
  /**
   * @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

    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

    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

Related Classes of org.olat.course.editor.CourseEditorEnv

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.