Package org.olat.course.nodes

Examples of org.olat.course.nodes.CourseNode


    genericPeekViewVC = createVelocityContainer("stPeekView");
   
    List<CourseNode> childNodes = new ArrayList<CourseNode>();
    for (int i = 0; i < courseNode.getChildCount(); i++) {
      CourseNode child = (CourseNode) courseNode.getChildAt(i);
      childNodes.add(child);
      // Add link to jump to course node
      Link nodeLink = LinkFactory.createLink("nodeLink_" + child.getIdent(), genericPeekViewVC, this);
      nodeLink.setCustomDisplayText(child.getShortTitle());
      // Add css class for course node type
      String iconCSSClass = CourseNodeFactory.getInstance().getCourseNodeConfiguration(child.getType()).getIconCSSClass();
      nodeLink.setCustomEnabledLinkCSS("b_with_small_icon_left o_gotoNode " + iconCSSClass);
      nodeLink.setUserObject(child.getIdent());
    }
    // Add course node to get title etc
    genericPeekViewVC.contextPut("childNodes", childNodes);
    // Add css class for course node type
    CourseNodeFactory courseNodeFactory = CourseNodeFactory.getInstance();
View Full Code Here


        null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
    nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1,
        CMD_SELECT_NODE, ureq.getLocale()));
   
    // get list of course node data and populate table data model
    CourseNode rootNode = course.getRunStructure().getRootNode();
    List nodesTableObjectArrayList = addAssessableNodesAndParentsToList(0, rootNode);
   
    // only populate data model if data available
    if (nodesTableObjectArrayList == null) {
      nodeChoose.contextPut("hasAssessableNodes", Boolean.FALSE);
View Full Code Here

   */
  private List addAssessableNodesAndParentsToList(int recursionLevel, CourseNode courseNode) {
    // 1) Get list of children data using recursion of this method
    List childrenData = new ArrayList();
    for (int i = 0; i < courseNode.getChildCount(); i++) {
      CourseNode child = (CourseNode) courseNode.getChildAt(i);
      List childData = addAssessableNodesAndParentsToList( (recursionLevel + 1),  child);
      if (childData != null)
        childrenData.addAll(childData);
    }
   
View Full Code Here

    int chdCnt = ne.getChildCount();
    for (int i = 0; i < chdCnt; i++) {
      NodeEvaluation neChd = ne.getNodeEvaluationChildAt(i);
      if (neChd.isVisible()) {
        // Build and add child generic or specific peek view
        CourseNode child = neChd.getCourseNode();
        Controller childViewController = null;
        Controller childPeekViewController = null;
        if (displayType.equals(STCourseNodeEditController.CONFIG_VALUE_DISPLAY_PEEKVIEW)) {
          if (peekviewChildNodes.size() == 0) {
            // Special case: no child nodes configured. This is the case when
            // the node has been configured before it had any children. We just
            // use the first children as they appear in the list
            if (i < STCourseNodeConfiguration.MAX_PEEKVIEW_CHILD_NODES) {
              childPeekViewController = child.createPeekViewRunController(ureq, wControl, userCourseEnv, neChd);
            } else {
              // Stop, we already reached the max count
              break;
            }
          } else {
            // Only add configured children
            if (peekviewChildNodes.contains(child.getIdent())) {
              childPeekViewController = child.createPeekViewRunController(ureq, wControl, userCourseEnv, neChd);
            } else {
              // Skip this child - not configured
              continue;
            }
          }
        }
        // Add child to list
        children.add(child);
        childViewController = new PeekViewWrapperController(ureq, wControl, child, childPeekViewController);
        listenTo(childViewController); // auto-dispose controller
        myContent.put("childView_" + child.getIdent(), childViewController.getInitialComponent());
      }
    }

    myContent.contextPut("children", children);
    myContent.contextPut("nodeFactory", CourseNodeFactory.getInstance());
View Full Code Here

      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent tae = (TableEvent)event;
       
        Map<String,Object> nodeData = (Map<String,Object>) nodeTableModel.getObject(tae.getRowId());
        ICourse course = CourseFactory.loadCourse(courseId);
        CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
        if(node instanceof ScormCourseNode) {
          finishedVC = createVelocityContainer("finished");
          showFileButton = LinkFactory.createButton("showfile", finishedVC, this);
          finishedVC.contextPut("nodetitle", node.getShortTitle());
         
          doExport(ureq, (ScormCourseNode)node);
         
          finishedVC.contextPut("filename", targetFileName);
          wc.setWizardTitle(getTranslator().translate("wizard.finished.title"));
View Full Code Here

    }

    /*
     * 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: above checks ensure correct node references
    //if (node == null) return new Double(Double.NEGATIVE_INFINITY);

    CoursePropertyManager pm = getUserCourseEnv().getCourseEnvironment().getCoursePropertyManager();
View Full Code Here

  @Override
  public TabbableController createEditController(UserRequest ureq,
      WindowControl wControl, ICourse course, UserCourseEnvironment userCourseEnv) {
    DENEditController childTabCntrllr = new DENEditController(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

        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_SELECT_NODE)) {
          int rowid = te.getRowId();
          Map<String,Object> nodeData = (Map<String,Object>)nodesTableModel.getObject(rowid);
          CourseNode node = runStructure.getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
          this.selectedCourseNode = (AssessableCourseNode) node;
          // cast should be save, only assessable nodes are selectable
          fireEvent(ureq, EVENT_NODE_SELECTED);
        }
      } else if (event.equals(TableController.EVENT_FILTER_SELECTED)) {
View Full Code Here

  private void doIdentityAssessmentOverview(UserRequest ureq) {
    List<Map<String, Object>> nodesTableList;
    if (loadNodesFromCourse) {
      // get list of course node and user data and populate table data model
      CourseNode rootNode = runStructure.getRootNode();   
      nodesTableList = AssessmentHelper.addAssessableNodeAndDataToList(0, rootNode, userCourseEnvironment, this.discardEmptyNodes, false);
    } else {
      // use list from efficiency statement
      nodesTableList = preloadedNodesList;
    }
View Full Code Here

   */
  private List<DENCourseNode> getCourseDENNodes(ICourse course) {
    List<DENCourseNode> denNodes = new ArrayList<DENCourseNode>(10);

    Structure courseStruct = course.getRunStructure();
    CourseNode rootNode = courseStruct.getRootNode();

    getCourseDENNodes(rootNode, denNodes);
    return denNodes;
  }
View Full Code Here

TOP

Related Classes of org.olat.course.nodes.CourseNode

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.