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"));
//--