Examples of CourseNode


Examples of org.olat.course.nodes.CourseNode

    return checklist;
  }

  @Override
  public TabbableController createEditController(UserRequest ureq, WindowControl wControl, ICourse course, UserCourseEnvironment euce) {
    CourseNode chosenNode = course.getEditorTreeModel().getCourseNode(euce.getCourseEditorEnv().getCurrentCourseNodeId());
    ChecklistEditController editController = new ChecklistEditController(ureq, wControl, this, course, euce);
    getModuleConfiguration().set(CONF_COURSE_ID, course.getResourceableId());
    getModuleConfiguration().set(CONF_COURSE_NODE_ID, chosenNode.getIdent());
    NodeEditController nodeEditController = new NodeEditController(ureq, wControl, course.getEditorTreeModel(), course, chosenNode, course.getCourseEnvironment()
        .getCourseGroupManager(), euce, editController);
    nodeEditController.addControllerListener(editController);
    return nodeEditController;
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    return "checklist_"+this.getIdent()+".xml";
  }
 
  @Override
  public CourseNode createInstanceForCopy(boolean isNewTitle) {
    CourseNode copyInstance = super.createInstanceForCopy(isNewTitle);
    ChecklistManager cm = ChecklistManager.getInstance();
    // load checklist
    Checklist checklist = cm.loadChecklist((Checklist) getModuleConfiguration().get(ChecklistCourseNode.CONF_CHECKLIST));
    // remove old config
    copyInstance.getModuleConfiguration().remove(ChecklistCourseNode.CONF_CHECKLIST);
    // create new checklist with same settings and save to db
    Checklist initialChecklist = cm.copyChecklist(checklist);
    // set to config
    copyInstance.getModuleConfiguration().set(CONF_CHECKLIST_COPY, initialChecklist);
   
    return copyInstance;
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    }

    /*
     * the real function evaluation which is used during run time
     */
    CourseNode node = getUserCourseEnv().getCourseEnvironment().getRunStructure().getNode(nodeId);
    // invalid node id's return still a valid double
    // TODO fg: check with editor tree model DONE: the above checks ensure only
    // valid node references
    // if (node == null) return new Double(Double.NEGATIVE_INFINITY);

View Full Code Here

Examples of org.olat.course.nodes.CourseNode

  @Override
  public TabbableController createEditController(UserRequest ureq, WindowControl wControl, ICourse course,
      UserCourseEnvironment userCourseEnv) {
    updateModuleConfigDefaults(false);
    LLEditController childTabCntrllr = new LLEditController(getModuleConfiguration(), ureq, wControl, this, course, userCourseEnv);
    CourseNode chosenNode = course.getEditorTreeModel().getCourseNode(userCourseEnv.getCourseEditorEnv().getCurrentCourseNodeId());
    // needed for DENEditController.isConfigValid()
    getModuleConfiguration().set(CONF_COURSE_ID, course.getResourceableId());
    getModuleConfiguration().set(CONF_COURSE_NODE_ID, chosenNode.getIdent());
    return new NodeEditController(ureq, wControl, course.getEditorTreeModel(), course, chosenNode, course.getCourseEnvironment()
        .getCourseGroupManager(), userCourseEnv, childTabCntrllr);
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   * @param BCNodesContainer
   * @param courseNode
   */
  private void addFolderBuildingBlocks(MergeSource BCNodesContainer, CourseNode courseNode) {
    for (int i = 0; i < courseNode.getChildCount(); i++) {
      CourseNode child = (CourseNode) courseNode.getChildAt(i);
      if (child instanceof BCCourseNode) {
        BCCourseNode bcNode = (BCCourseNode) child;
        // add folder not to merge source. Use name and node id to have unique name
        String path = BCCourseNode.getFoldernodePathRelToFolderBase(getCourseEnvironment(), bcNode);
        OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(path, null);
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

   */
  private CourseNode findNode(CourseNode node, String nodeId) {
    if (node.getIdent().equals(nodeId)) return node;
    int childcnt = node.getChildCount();
    for (int i = 0; i < childcnt; i++) {
      CourseNode element = (CourseNode) node.getChildAt(i);
      CourseNode foo = findNode(element, nodeId);
      if (foo != null) return foo;
    }
    return null;
  }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    treeModel = nclr.getTreeModel();
    luTree.setTreeModel(treeModel);
    String selNodeId = nclr.getSelectedNodeId();
    luTree.setSelectedNodeId(selNodeId);
    CourseNode courseNode = nclr.getCalledCourseNode();
    updateState(courseNode);

    // dispose old node controller
    if (currentNodeController != null) {
      currentNodeController.dispose();
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    } else if (source == coursemain) {
      if (event.getCommand().equals("activateCourseNode")) {
        // Events from the JS function o_activateCourseNode() - activate the given node id
        String nodeid = ureq.getModuleURI();
        if (nodeid != null) {
          CourseNode identNode = course.getRunStructure().getNode(nodeid);
          boolean success = updateTreeAndContent(ureq, identNode, null);
          if (success) currentCourseNode = identNode;
          else getWindowControl().setWarning(translate("msg.nodenotavailableanymore"));
        }
      }
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

      if (event instanceof OlatCmdEvent) {
        OlatCmdEvent oe = (OlatCmdEvent) event;
        String cmd = oe.getCommand();
        if (cmd.equals(OlatCmdEvent.GOTONODE_CMD)) {
          String subcmd = oe.getSubcommand(); // "69680861018558/node-specific-data";
          CourseNode identNode;
          String nodecmd = null;
          int slPos = subcmd.indexOf('/');
          if (slPos != -1) {
            nodecmd = subcmd.substring(slPos + 1);
            identNode = course.getRunStructure().getNode(subcmd.substring(0, slPos));
View Full Code Here

Examples of org.olat.course.nodes.CourseNode

    } else {
      if (currentNodeController != null) {
        currentNodeController.dispose();
      }
     
      CourseNode cn = null;
      cn = (viewIdentifier == null ? null : course.getRunStructure().getNode(viewIdentifier));
      String subsubId = null;

      // check for subsubIdent (jump into the third level)
      if (viewIdentifier != null) {
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.