Package org.olat.course.nodes

Examples of org.olat.course.nodes.CourseNodeConfiguration


      toolC.addHeader(translate(NLS_HEADER_INSERTNODES));
      CourseNodeFactory cnf = CourseNodeFactory.getInstance();
      for (Iterator<String> iter = cnf.getRegisteredCourseNodeAliases().iterator(); iter.hasNext();) {
        String courseNodeAlias = iter.next();
        CourseNodeConfiguration cnConfig = cnf.getCourseNodeConfiguration(courseNodeAlias);
        toolC.addLink(TB_ACTION + courseNodeAlias, cnConfig.getLinkText(ureq.getLocale()), courseNodeAlias, cnConfig.getIconCSSClass());
      }

      toolC.addHeader(translate(NLS_COMMAND_DELETENODE_HEADER));
      toolC.addLink(CMD_DELNODE, translate(NLS_COMMAND_DELETENODE), CMD_DELNODE, "b_toolbox_delete");
      toolC.addLink(CMD_MOVENODE, translate(NLS_COMMAND_MOVENODE), CMD_MOVENODE, "b_toolbox_move");
View Full Code Here


        ICourse course = CourseFactory.getCourseEditSession(ores.getResourceableId());
        // user chose a position to insert a new node
        String nodeId = te.getNodeId();
        TreePosition tp = insertModel.getTreePosition(nodeId);
        int pos = tp.getChildpos();
        CourseNodeConfiguration newNodeConfig = CourseNodeFactory.getInstance().getCourseNodeConfiguration(type);
        insertedNode = newNodeConfig.getInstance();

        // Set some default values
        ///// START Special inline translation case: disable inline translation rendering (generates too long titles)
        I18nManager i18nMgr = I18nManager.getInstance();
        boolean isInlineTrans = i18nMgr.isCurrentThreadMarkLocalizedStringsEnabled();
        if (isInlineTrans) {
          i18nMgr.setMarkLocalizedStringsEnabled(ureq.getUserSession(), false);
        }
        //--
        String title = new String(newNodeConfig.getLinkText(ureq.getLocale()));
        insertedNode.setShortTitle(title);
        String longTitle = new String(translate("longtitle.default") + " " + title);
        insertedNode.setLongTitle(longTitle);
        insertedNode.setNoAccessExplanation(translate("form.noAccessExplanation.default"));
        //--
View Full Code Here

TOP

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

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.