Package org.olat.course.nodes

Examples of org.olat.course.nodes.CourseNode


    }

    /*
     * the real function evaluation which is used during run time
     */
    CourseNode node = getUserCourseEnv().getCourseEnvironment().getRunStructure().getNode(nodeId);
    AssessmentManager am = getUserCourseEnv().getCourseEnvironment().getAssessmentManager();
    Identity identity = getUserCourseEnv().getIdentityEnvironment().getIdentity();

    return am.getNodeAttempts(node, identity);
  }
View Full Code Here


      synchronized (subsContexts) { //o_clusterOK by:ld - no problem to have independent subsContexts caches for each cluster node
        sctx = subsContexts.get(courseId);
        if (sctx == null) {
          // a subscription context showing to the root node (the course's root
          // node is started when clicking such a notification)
          CourseNode cn = course.getRunStructure().getRootNode();
          CourseEnvironment ce = course.getCourseEnvironment();
          //FIXME:fg:b little problem is that the assessment tool and the course are not "the same" anymore, that is you can open the same course twice in the
          // dynamic tabs by a) klicking e.g. via repo, and b via notifications link to the assementtool
          sctx = new SubscriptionContext(CourseModule.ORES_COURSE_ASSESSMENT, ce.getCourseResourceableId(), cn.getIdent());
          subsContexts.put(courseId, sctx);
        }
      }
    }
View Full Code Here

   */
  private List<IQTESTCourseNode> getCourseTestNodes(ICourse course) {
    List<IQTESTCourseNode> assessableNodes = new ArrayList<IQTESTCourseNode>(10);

    Structure courseStruct = course.getRunStructure();
    CourseNode rootNode = courseStruct.getRootNode();

    getCourseTestNodes(rootNode, assessableNodes);

    return assessableNodes;
  }
View Full Code Here

    //find an assessableCourseNode
    List<CourseNode> assessableNodeList = AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), null);
    Iterator<CourseNode> nodesIterator = assessableNodeList.iterator();
    boolean testNodeFound = false;
    while(nodesIterator.hasNext()) {
      CourseNode currentNode = nodesIterator.next();     
      if(currentNode instanceof AssessableCourseNode) {
        System.out.println("Yes, we found a test node! - currentNode.getType(): " + currentNode.getType());
        assessableCourseNode = (AssessableCourseNode)currentNode;
        testNodeFound = true;
        break;
      }
    }
View Full Code Here

    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 = addManualTaskNodesAndParentsToList(0, rootNode);
   
    // only populate data model if data available
    if (nodesTableObjectArrayList == null) {
      step2VC.contextPut("hasMsOrTaNodes", Boolean.FALSE);
View Full Code Here

  @SuppressWarnings("unchecked")
  private List addManualTaskNodesAndParentsToList(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 = addManualTaskNodesAndParentsToList( (recursionLevel + 1),  child);
      if (childData != null)
        childrenData.addAll(childData);
    }
   
View Full Code Here

      return false;
    }   
    if (type instanceof CourseHandler) {
      // course
      ICourse course = CourseFactory.loadCourse(repositoryEntry.getOlatResource());
      CourseNode rootNode = course.getRunStructure().getRootNode();
      UserCourseEnvironmentImpl uce = new UserCourseEnvironmentImpl(ureq.getUserSession().getIdentityEnvironment(), course
          .getCourseEnvironment());
      NodeEvaluation nodeEval = rootNode.eval(uce.getConditionInterpreter(), new TreeEvaluation());
      boolean mayAccessWholeTreeUp = NavigationHandler.mayAccessWholeTreeUp(nodeEval);
      if (!mayAccessWholeTreeUp || !nodeEval.isVisible()) {
        String explan = rootNode.getNoAccessExplanation();
        String sExplan = (explan == null ? translate("launch.noaccess") : Formatter.formatLatexFormulas(explan));
        main.contextPut("disabledlaunchreason", sExplan);
        return false;
      }
    }
View Full Code Here

    if (ce != null) {
      OLATResourceable oresNode = ce.getOLATResourceable();
      if (OresHelper.isOfType(oresNode, CourseNode.class)) {
        Long courseNodeId = oresNode.getResourceableId();
        Structure runStructure = assessedUserCourseEnvironment.getCourseEnvironment().getRunStructure();
        CourseNode courseNode = runStructure.getNode(courseNodeId.toString());
        if(courseNode instanceof AssessableCourseNode) {
          doEditNodeAssessment(ureq, (AssessableCourseNode)courseNode);
        }
      }
    }
View Full Code Here

    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(courseId);
    CourseNode rootNode = course.getRunStructure().getRootNode();
    List<Map<String,Object>> objectArrayList = addScormNodesAndParentsToList(0, rootNode);
    return objectArrayList;   
  }
View Full Code Here

 
  private List<Map<String,Object>> addScormNodesAndParentsToList(int recursionLevel, CourseNode courseNode) {
    // 1) Get list of children data using recursion of this method
    List<Map<String,Object>> childrenData = new ArrayList<Map<String,Object>>();
    for (int i = 0; i < courseNode.getChildCount(); i++) {
      CourseNode child = (CourseNode) courseNode.getChildAt(i);
      List<Map<String,Object>> childData = addScormNodesAndParentsToList( (recursionLevel + 1),  child);
      if (childData != null) {
        childrenData.addAll(childData);
      }
    }
View Full Code Here

TOP

Related Classes of org.olat.course.nodes.CourseNode

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.