Package org.olat.course.tree

Examples of org.olat.course.tree.CourseEditorTreeNode


     */
    public void visit(INode node) {
      /**
       * collect condition expressions only for not deleted nodes
       */
      CourseEditorTreeNode tmp = (CourseEditorTreeNode) node;
      CourseNode cn = tmp.getCourseNode();
      String key = cn.getIdent();
      List condExprs = cn.getConditionExpressions();
      if (condExprs.size() > 0 && !tmp.isDeleted()) {
        // evaluate each expression
        for (Iterator iter = condExprs.iterator(); iter.hasNext();) {
          ConditionExpression ce = (ConditionExpression) iter.next();
          currentCourseNodeId = key;
          currentConditionExpression = ce;
View Full Code Here


    public Convert2DGVisitor(DirectedGraph dg) {
      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();
      if(parent!=null) {
        dg.addVertex(parent.getIdent());
        Edge toParent = def.createEdge( parent.getIdent(),key);
        dg.addEdge(toParent);
      }
View Full Code Here

  /**
   * @see org.olat.course.editor.CourseEditorEnv#isEnrollmentNode(java.lang.String)
   */
  public boolean isEnrollmentNode(String nodeId) {
    CourseEditorTreeNode cen = cetm.getCourseEditorNodeById(nodeId);
    if (cen == null) return false;
    if (cen.isDeleted()) return false;
    // node exists and is not marked as deleted, check the associated course
    // node correct type
    return (cen.getCourseNode() instanceof ENCourseNode);
  }
View Full Code Here

  /**
   * @see org.olat.course.editor.CourseEditorEnv#isAssessable(java.lang.String)
   */
  public boolean isAssessable(String nodeId) {
    CourseEditorTreeNode cen = cetm.getCourseEditorNodeById(nodeId);
    if (cen == null) return false;
    if (cen.isDeleted()) return false;
    // node exists and is not marked as deleted, check the associated course
    // node for assessability.
    return AssessmentHelper.checkIfNodeIsAssessable(cen.getCourseNode());
  }
View Full Code Here

  /**
   * @see org.olat.course.editor.CourseEditorEnv#existsNode(java.lang.String)
   */
  public boolean existsNode(String nodeId) {
    CourseEditorTreeNode cen = cetm.getCourseEditorNodeById(nodeId);
    boolean retVal = cen != null && !cen.isDeleted();
    return retVal;
  }
View Full Code Here

     */
    public void visit(INode node) {
      /**
       * collect only status descriptions of not deleted nodes
       */
      CourseEditorTreeNode tmp = (CourseEditorTreeNode) node;
      if (!tmp.isDeleted()) {
        CourseNode cn = tmp.getCourseNode();
        String key = cn.getIdent();
        StatusDescription[] allSds = cn.isConfigValid(cev);
        if (allSds.length > 0) {
          for (int i = 0; i < allSds.length; i++) {
            StatusDescription sd = allSds[i];
View Full Code Here

    int childCount = node.getChildCount();
    selectedPeekviewChildKeys = new String[childCount];
    selectedPeekviewChildValues = new String[childCount];
    selectedPeekviewChildCssClasses = new String[childCount];
    for (int i = 0; i < childCount; i++) {
      CourseEditorTreeNode child = node.getCourseEditorTreeNodeChildAt(i);
      selectedPeekviewChildKeys[i] = child.getIdent();
      selectedPeekviewChildValues[i] = child.getTitle() + " (" + child.getIdent() + ")";
      selectedPeekviewChildCssClasses[i] = child.getIconCssClass() + " b_with_small_icon_left";
    }
    selectedPeekviewChildNodesConfig = config.getStringValue(STCourseNodeEditController.CONFIG_KEY_PEEKVIEW_CHILD_NODES, "");
    // initialize the form now
    initForm(ureq);
  }
View Full Code Here

    course = CourseFactory.getCourseEditSession(re.getOlatResource().getResourceableId());
    String displayName = re.getDisplayname();   
    course.getRunStructure().getRootNode().setShortTitle(Formatter.truncateOnly(displayName, 25)); //do not use truncate!
    course.getRunStructure().getRootNode().setLongTitle(displayName);
    //course.saveRunStructure();
    CourseEditorTreeNode editorRootNode = ((CourseEditorTreeNode)course.getEditorTreeModel().getRootNode());   
    editorRootNode.getCourseNode().setShortTitle(Formatter.truncateOnly(displayName, 25)); //do not use truncate!
    editorRootNode.getCourseNode().setLongTitle(displayName);
    // mark entire structure as dirty/new so the user can re-publish
    markDirtyNewRecursively(editorRootNode);
    // root has already been created during export. Unmark it.
    editorRootNode.setNewnode(false);   
   
    CourseFactory.saveCourse(course.getResourceableId());
    CourseFactory.closeCourseEditSession(course.getResourceableId(),true);
  }
View Full Code Here

   * @param ureq
   * @return True if the whole list is processed, false otherwise.
   */
  private boolean processNodeList(UserRequest ureq) {
    while (nodeListPos < nodeList.size()) {
      CourseEditorTreeNode nextNode = (CourseEditorTreeNode)nodeList.get(nodeListPos);
      nodeListPos++;
      Controller ctrl = nextNode.getCourseNode().importNode(getExportDataDir(course), course, false, ureq, getWindowControl());
      if (ctrl != null) {
        // this node needs a controller to do its import job.
        if (activeImportController != null) activeImportController.dispose();
        activeImportController = ctrl;
        activeImportController.addControllerListener(this);
View Full Code Here

TOP

Related Classes of org.olat.course.tree.CourseEditorTreeNode

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.