use of org.olat.course.editor.NodeEditController in project openolat by klemens.
the class DENCourseNode method createEditController.
@Override
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, 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, userCourseEnv, childTabCntrllr);
}
use of org.olat.course.editor.NodeEditController in project openolat by klemens.
the class LLCourseNode method createEditController.
/**
* {@inheritDoc}
*/
@Override
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, 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, userCourseEnv, childTabCntrllr);
}
use of org.olat.course.editor.NodeEditController in project openolat by klemens.
the class ChecklistCourseNode method createEditController.
@Override
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, 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, euce, editController);
nodeEditController.addControllerListener(editController);
return nodeEditController;
}
use of org.olat.course.editor.NodeEditController in project OpenOLAT by OpenOLAT.
the class SPEditController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
public void event(UserRequest urequest, Controller source, Event event) {
if (source instanceof NodeEditController) {
if (combiLinkCtr != null && combiLinkCtr.isDoProposal()) {
combiLinkCtr.setRelFilePath(CourseEditorHelper.createUniqueRelFilePathFromShortTitle(courseNode, courseFolderBaseContainer));
}
} else if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
courseNode.setPreConditionAccess(cond);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == deliveryOptionsCtrl) {
if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
DeliveryOptions config = deliveryOptionsCtrl.getDeliveryOptions();
if (config != null) {
moduleConfiguration.set(CONFIG_KEY_DELIVERYOPTIONS, config);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
} else if (source == combiLinkCtr) {
if (event == Event.DONE_EVENT) {
String relPath = VFSManager.getRelativeItemPath(combiLinkCtr.getFile(), courseFolderBaseContainer, null);
combiLinkCtr.setEditable(hasEditRights(relPath));
moduleConfiguration.set(CONFIG_KEY_FILE, relPath);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
if (!myTabbedPane.containsTab(deliveryOptionsCtrl.getInitialComponent())) {
myTabbedPane.addTab(translate(PANE_TAB_DELIVERYOPTIONS), deliveryOptionsCtrl.getInitialComponent());
}
myContent.contextPut("editorEnabled", combiLinkCtr.isEditorEnabled());
}
} else if (source == securitySettingForm) {
if (event == Event.DONE_EVENT) {
boolean allowRelativeLinks = securitySettingForm.getAllowRelativeLinksConfig();
moduleConfiguration.set(CONFIG_KEY_ALLOW_RELATIVE_LINKS, allowRelativeLinks);
moduleConfiguration.set(CONFIG_KEY_ALLOW_COACH_EDIT, securitySettingForm.getAllowCoachEditConfig());
combiLinkCtr.setAllowEditorRelativeLinks(allowRelativeLinks);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
}
use of org.olat.course.editor.NodeEditController in project OpenOLAT by OpenOLAT.
the class VCCourseNode method createEditController.
@Override
public TabbableController createEditController(UserRequest ureq, WindowControl wControl, BreadcrumbPanel stackPanel, ICourse course, UserCourseEnvironment userCourseEnv) {
updateModuleConfigDefaults(false);
CourseNode chosenNode = course.getEditorTreeModel().getCourseNode(userCourseEnv.getCourseEditorEnv().getCurrentCourseNodeId());
// load and check configuration
String providerId = getModuleConfiguration().getStringValue(CONF_PROVIDER_ID);
VCProvider provider = providerId == null ? VCProviderFactory.createDefaultProvider() : VCProviderFactory.createProvider(providerId);
TabbableDefaultController childTabCntrllr;
if (provider != null) {
VCConfiguration config = handleConfig(provider);
// create room if configured to do it immediately
if (config.isCreateMeetingImmediately()) {
Long key = course.getResourceableId();
// here, the config is empty in any case, thus there are no start and end dates
provider.createClassroom(key + "_" + this.getIdent(), this.getShortName(), this.getLongTitle(), null, null, config);
}
// create edit controller
childTabCntrllr = new VCEditController(ureq, wControl, this, course, userCourseEnv, provider, config);
} else {
// empty panel
childTabCntrllr = new NoProviderController(ureq, wControl);
}
NodeEditController nodeEditCtr = new NodeEditController(ureq, wControl, course.getEditorTreeModel(), course, chosenNode, userCourseEnv, childTabCntrllr);
nodeEditCtr.addControllerListener(childTabCntrllr);
return nodeEditCtr;
}
Aggregations