Examples of CourseNode


Examples of org.olat.course.nodes.CourseNode

   */
  public void evaluateAll() {
    cachedScoreEvals.clear();
    recursionCnt = 0;
    // collect all assessable nodes and eval 'em
    CourseNode root = userCourseEnvironment.getCourseEnvironment().getRunStructure().getRootNode();
    // breadth first traversal gives an easier order of evaluation for debugging
    // however, for live it is absolutely mandatory to use depth first since using breadth first
    // the score accoutings local cache hash map will never be used. this can slow down things like
    // crazy (course with 10 tests, 300 users and some crazy score and passed calculations will have
    // 10 time performance differences)
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   * ----- to called by getScoreFunction only -----
   * @param childId
   * @return Float
   */
  public Float evalScoreOfCourseNode(String childId) {
    CourseNode foundNode = findChildByID(childId);
    if (foundNode == null) {
      error = true;
      childNotFoundError = true;
      wrongChildID = childId;
      return new Float(-9999999.0f);
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   * ----- to be called by getPassedFunction only -----
   * @param childId
   * @return Boolean
   */
  public Boolean evalPassedOfCourseNode(String childId) {
    CourseNode foundNode = findChildByID(childId);
    if (foundNode == null) {
      error = true;
      childNotFoundError = true;
      wrongChildID = childId;
      return Boolean.FALSE;
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    //System.out.println("scoreInfoChanged - calc anew:\n"+cachedScoreEvals.toString());
    evaluateAll();
  }

  private CourseNode findChildByID(String id) {
    CourseNode foundNode = userCourseEnvironment.getCourseEnvironment().getRunStructure().getNode(id);
    return foundNode;
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

  /**
   * @see org.olat.core.util.tree.Visitor#visit(org.olat.core.util.nodes.INode)
   */
  public void visit(INode node) {
    CourseNode cn = (CourseNode) node;
    if (cn instanceof AssessableCourseNode) {
      AssessableCourseNode acn = (AssessableCourseNode) cn;
      evalCourseNode(acn);
      // evalCourseNode will cache all infos
    }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

  /**
   * @see org.olat.core.util.tree.Visitor#visit(org.olat.core.util.nodes.INode)
   */
  public void visit(INode node) {
    CourseNode cn = (CourseNode) node;
    cn.archiveNodeData(locale, course, exportPath, charset);
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   * Visitor pattern to delete the course nodes
   *
   * @see org.olat.core.util.tree.Visitor#visit(org.olat.core.util.nodes.INode)
   */
  public void visit(INode node) {
    CourseNode cNode = (CourseNode) node;
    cNode.cleanupOnDelete(course);
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_SELECT_NODE)) {
          int rowid = te.getRowId();
          Map nodeData = (Map) nodeTableModel.getObject(rowid);
          CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
          this.currentCourseNode = node;
          archiveNode(ureq);         
          showInfo("archive."+nodeType.getType()+".successfully");
        }
      }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

        ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
    nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1, CMD_SELECT_NODE, ureq.getLocale()));

    // get list of course node data and populate table data model
    ICourse course = CourseFactory.loadCourse(ores);
    CourseNode rootNode = course.getRunStructure().getRootNode();
    List nodesTableObjectArrayList = addNodesAndParentsToList(0, rootNode);

    // only populate data model if data available
    if (nodesTableObjectArrayList == null) {
      nodeChoose.contextPut("hasNodes", Boolean.FALSE);
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

  @SuppressWarnings("unchecked")
  private List addNodesAndParentsToList(int recursionLevel, CourseNode courseNode) {
    // 1) Get list of children data using recursion of this method
    List childrenData = new ArrayList();
    for (int i = 0; i < courseNode.getChildCount(); i++) {
      CourseNode child = (CourseNode) courseNode.getChildAt(i);
      List childData = addNodesAndParentsToList((recursionLevel + 1), child);
      if (childData != null) childrenData.addAll(childData);
    }

    String nodent = nodeType.getType();
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.