Package org.olat.course.tree

Examples of org.olat.course.tree.CourseEditorTreeModel


    // accessability config tab   
    accessContent = this.createVelocityContainer("edit_access");

    CourseGroupManager groupMgr = course.getCourseEnvironment().getCourseGroupManager();
    CourseEditorTreeModel editorModel = course.getEditorTreeModel();
    // Reader precondition
    Condition readerCondition = courseNode.getPreConditionReader();
    // TODO:gs:a getAssessableNodes ist der dialog node assessable oder nicht?
    readerCondContr = new ConditionEditController(ureq, getWindowControl(), groupMgr, readerCondition, "readerConditionForm",
        AssessmentHelper.getAssessableNodes(editorModel, courseNode), userCourseEnv);   
View Full Code Here


  }
 
  private void upgradeEditorTreeModel(ICourse course) {
    // EDITOR: get all course nodes
    CourseEditorTreeModel cT = course.getEditorTreeModel();
    TreeNode rootNode = cT.getRootNode();
    final Set<String> allSubTreeids = new HashSet<String>();
    TreeVisitor tv = new TreeVisitor(new Visitor() {
      public void visit(INode node) {
        allSubTreeids.add(node.getIdent());
      }
    }, rootNode, true);
    tv.visitAll();

    CourseEditorTreeModel editorTreeModel = course.getEditorTreeModel();
    // EDITOR: loop all course nodes
    int nodeCounter = 0;
    for (Iterator<String> iterator2 = allSubTreeids.iterator(); iterator2.hasNext();) {
      String nodeId = iterator2.next();
      CourseNode cetn = editorTreeModel.getCourseNode(nodeId);
      // migrate if this node is a Task
      if (cetn.getType().equals(TACourseNode.CONF_TASK_TYPE)) {
        migrateSingleTask(cetn);
      }
      // migrate no access text for every node:
View Full Code Here

    runRootNode.setLearningObjectives(learningObjectives);
    initialStructure.setRootNode(runRootNode);
    newCourse.setRunStructure(initialStructure);
    newCourse.saveRunStructure();

    CourseEditorTreeModel editorTreeModel = new CourseEditorTreeModel();
    CourseEditorTreeNode editorRootNode = new CourseEditorTreeNode((CourseNode) ObjectCloner.deepCopy(runRootNode));
    editorTreeModel.setRootNode(editorRootNode);
    newCourse.setEditorTreeModel(editorTreeModel);
    newCourse.saveEditorTreeModel();

    return newCourse;
  }
View Full Code Here

  public void migrateCourse(ICourse course){
    PersistingCourseImpl ccourse = (PersistingCourseImpl) course;
    // only upgrade from version 1 => 2
    // this will migrate wiki-syntax to html
    int migrateTargetVersion = 2;
    CourseEditorTreeModel editorTreeModel = course.getEditorTreeModel();
    if (!editorTreeModel.isVersionUpToDate() && editorTreeModel.getVersion() != migrateTargetVersion){
      upgradeEditorTreeModel(ccourse);
      editorTreeModel.setVersion(migrateTargetVersion);
      ccourse.setEditorTreeModel(editorTreeModel);
      ccourse.saveEditorTreeModel();
    }   
    Structure runStructure = course.getRunStructure();
    if (!runStructure.isVersionUpToDate() && runStructure.getVersion() != migrateTargetVersion){
View Full Code Here

TOP

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

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.