Examples of CourseNode


Examples of org.olat.course.nodes.CourseNode

    /**
     * @param newRunStruct
     * @param cetn
     */
    private void addNodeTo(final Structure newRunStruct, CourseNode courseNode, CourseEditorTreeNode cetn) {
      CourseNode clone = (CourseNode) XStreamHelper.xstreamClone(courseNode);
      clone.removeAllChildren();// children get also visited
      // parent in the course editor model
      CourseEditorTreeNode parentCetn = (CourseEditorTreeNode) cetn.getParent();
      CourseNode parent = parentCetn.getCourseNode();
      CourseNode parentClone = newRunStruct.getNode(parent.getIdent());
      parentClone.addChild(clone);
    }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   *
   * @param courseEnv
   * @return The list of assessable nodes from this course
   */
  public static List loadAssessableNodes(CourseEnvironment courseEnv) {
    CourseNode rootNode = courseEnv.getRunStructure().getRootNode();
    List nodeList = new ArrayList();
    collectAssessableCourseNodes(rootNode, nodeList);

    return nodeList;
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    if (node instanceof AssessableCourseNode) {
      nodeList.add(node);
    }
    int count = node.getChildCount();
    for (int i = 0; i < count; i++) {
      CourseNode cn = (CourseNode) node.getChildAt(i);
      collectAssessableCourseNodes(cn, nodeList);
    }
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

        OLATResourceable ores = null;
        if (p.getResName().equals( CourseModule.getCourseTypeName() ) ) {
          // resId = CourseResourceableId           p.getSubidentifier() = wikiCourseNode.getIdent()
          ICourse course = CourseFactory.loadCourse(resId);
          CourseEnvironment cenv = course.getCourseEnvironment();
          CourseNode courseNode = cenv.getRunStructure().getNode(p.getSubidentifier());
          if(courseNode == null){
            //OLAT-3356 because removing wikicoursenodes was not propagated to
            // disable subcriptions, we may end up here with a NULL wikicoursenode
            // Best we can do here -> return noSubsInfo and clean up
            NotificationsManager.getInstance().deactivate(p);
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

        // Repositioning to move/copy course node
        String nodeId = moveCopyController.getCopyNodeId();       
        if (nodeId != null) {
          menuTree.setSelectedNodeId(nodeId);
          euce.getCourseEditorEnv().setCurrentCourseNodeId(nodeId);         
          CourseNode copyNode = cetm.getCourseNode(nodeId);
          initNodeEditor(ureq, copyNode);
        }                       
        euce.getCourseEditorEnv().validateCourse();
        StatusDescription[] courseStatus = euce.getCourseEditorEnv().getCourseStatus();
        updateCourseStatusMessages(ureq.getLocale(), courseStatus);
       
      } else if (event == Event.FAILED_EVENT) {       
        getWindowControl().setError("Error in copy of subtree.");       
      } else if (event == Event.CANCELLED_EVENT) {
        // user canceled           
      }
     
    } else if (source == insertNodeController) {          
      cmc.deactivate();
      if (event == Event.DONE_EVENT) {
        // Activate new node in menu and create necessary edit controllers
        // necessary if previous action was a delete node action       
        tabbedNodeConfig.setVisible(true);
        main.setPage(VELOCITY_ROOT + "/index.html");       
        CourseNode newNode = insertNodeController.getInsertedNode();       
        menuTree.setSelectedNodeId(newNode.getIdent());
        // update the current node in the editor course environment
        euce.getCourseEditorEnv().setCurrentCourseNodeId(newNode.getIdent());
        euce.getCourseEditorEnv().validateCourse();
        StatusDescription[] courseStatus = euce.getCourseEditorEnv().getCourseStatus();
        updateCourseStatusMessages(ureq.getLocale(), courseStatus);         
        initNodeEditor(ureq, newNode);
      }
      // in all cases:
      removeAsListenerAndDispose(insertNodeController);
      insertNodeController = null;
    } else if (source == deleteDialogController){
      removeAsListenerAndDispose(deleteDialogController);
      deleteDialogController = null;
      if (DialogBoxUIFactory.isYesEvent(event)){
        // delete confirmed
        String ident = menuTree.getSelectedNode().getIdent();
        // udpate the current node in the course editor environment
        euce.getCourseEditorEnv().setCurrentCourseNodeId(ident);
        CourseNode activeNode = cetm.getCourseNode(ident);

        cetm.markDeleted(activeNode);
        menuTree.setDirty(true);
     
        CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

        referencingNodes.removeAll(allSubTreeids);
        if (referencingNodes.size() > 0) {
          List<String> nodeNames = new ArrayList<String>();
          for (Iterator iter = referencingNodes.iterator(); iter.hasNext();) {
            String nodeId = (String) iter.next();
            CourseNode cn = cetm.getCourseNode(nodeId);
            nodeNames.add(cn.getShortTitle());
          }
          allRefs.put(node.getIdent(), nodeNames);
        }
      }
    }, tn, true);
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    if(businessPath != null && businessPath.startsWith("[")) return null;
   
    Long resId = publisher.getResId();
    if (publisher.getResName().equals( CourseModule.getCourseTypeName() ) ) {
      // resId = CourseResourceableId           p.getSubidentifier() = wikiCourseNode.getIdent()
      CourseNode courseNode = null;
      try {
        ICourse course = CourseFactory.loadCourse(resId);
        CourseEnvironment cenv = course.getCourseEnvironment();
        courseNode = cenv.getRunStructure().getNode(publisher.getSubidentifier());
      } catch (Exception e) {
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

      this.dg = dg;
      def = new EdgeFactories.DirectedEdgeFactory();
    }
    public void visit(INode node) {
      CourseEditorTreeNode tmp = (CourseEditorTreeNode) node;
      CourseNode cn = tmp.getCourseNode();
      String key = cn.getIdent();
      dg.addVertex(key);
      /*
       * add edge from parent to child. This directed edge represents the visibility accessability inheritance direction.
       */
      INode parent = tmp.getParent();
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

          i18nMgr.setMarkLocalizedStringsEnabled(ureq.getUserSession(), true);
        }
        ///// END Special inline translation case
       
        // Insert it now
        CourseNode selectedNode = insertModel.getCourseNode(tp.getParentTreeNode());
        course.getEditorTreeModel().insertCourseNodeAt(insertedNode, selectedNode, pos);       
        CourseFactory.saveCourseEditorTreeModel(course.getResourceableId());

        fireEvent(ureq, Event.DONE_EVENT);
      } else {
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    ienv.setIdentity(identity);
    ienv.setRoles(roles);
    UserCourseEnvironment userCourseEnv = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
    if (log.isDebug()) log.debug("userCourseEnv=" + userCourseEnv + "ienv=" + ienv );
   
    CourseNode rootCn = userCourseEnv.getCourseEnvironment().getRunStructure().getRootNode();

    String nodeIdS = nodeId.toString();
    CourseNode courseNode = course.getRunStructure().getNode(nodeIdS);
    if (log.isDebug()) log.debug("courseNode=" + courseNode );
   
    TreeEvaluation treeEval = new TreeEvaluation();
    NodeEvaluation rootNodeEval = rootCn.eval(userCourseEnv.getConditionInterpreter(), treeEval);
    if (log.isDebug()) log.debug("rootNodeEval=" + rootNodeEval );
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.