Package org.olat.course.nodes

Examples of org.olat.course.nodes.CourseNode.eval()


      // 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);
View Full Code Here


    // build the new treemodel by evaluating the preconditions
    TreeEvaluation treeEval = new TreeEvaluation();
    GenericTreeModel treeModel = new GenericTreeModel();
    CourseNode rootCn = userCourseEnv.getCourseEnvironment().getRunStructure().getRootNode();
    NodeEvaluation rootNodeEval = rootCn.eval(userCourseEnv.getConditionInterpreter(), treeEval);
    TreeNode treeRoot = rootNodeEval.getTreeNode();
    treeModel.setRootNode(treeRoot);

    // find the treenode that corresponds to the node (!= selectedTreeNode since
    // we built the TreeModel anew in the meantime
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.