use of org.olat.course.nodes.sp.SecuritySettingsForm in project OpenOLAT by OpenOLAT.
the class STCourseNodeEditController method addCustomFileConfigToView.
private void addCustomFileConfigToView(UserRequest ureq) {
// Read configuration
boolean relFilPathIsProposal = false;
String relFilePath = chosenFile;
if (relFilePath == null) {
// Use calculated file and folder name as default when not yet configured
relFilePath = CourseEditorHelper.createUniqueRelFilePathFromShortTitle(stNode, courseFolderContainer);
relFilPathIsProposal = true;
}
// File create/select controller
combiLinkCtr = new LinkFileCombiCalloutController(ureq, getWindowControl(), courseFolderContainer, relFilePath, relFilPathIsProposal, allowRelativeLinks, false, new CourseInternalLinkTreeModel(editorModel));
listenTo(combiLinkCtr);
configvc.put("combiCtr", combiLinkCtr.getInitialComponent());
configvc.contextPut("editorEnabled", combiLinkCtr.isEditorEnabled());
// Security configuration form
boolean allowCoachEdit = stNode.getModuleConfiguration().getBooleanSafe(CONFIG_KEY_ALLOW_COACH_EDIT, false);
securitySettingForm = new SecuritySettingsForm(ureq, getWindowControl(), allowRelativeLinks, allowCoachEdit);
listenTo(securitySettingForm);
configvc.put("allowRelativeLinksForm", securitySettingForm.getInitialComponent());
// Add options tab
if (myTabbedPane != null) {
if (!myTabbedPane.containsTab(deliveryOptionsCtrl.getInitialComponent())) {
myTabbedPane.addTab(translate(PANE_TAB_DELIVERYOPTIONS), deliveryOptionsCtrl.getInitialComponent());
}
}
}
use of org.olat.course.nodes.sp.SecuritySettingsForm in project openolat by klemens.
the class STCourseNodeEditController method addCustomFileConfigToView.
private void addCustomFileConfigToView(UserRequest ureq) {
// Read configuration
boolean relFilPathIsProposal = false;
String relFilePath = chosenFile;
if (relFilePath == null) {
// Use calculated file and folder name as default when not yet configured
relFilePath = CourseEditorHelper.createUniqueRelFilePathFromShortTitle(stNode, courseFolderContainer);
relFilPathIsProposal = true;
}
// File create/select controller
combiLinkCtr = new LinkFileCombiCalloutController(ureq, getWindowControl(), courseFolderContainer, relFilePath, relFilPathIsProposal, allowRelativeLinks, false, new CourseInternalLinkTreeModel(editorModel));
listenTo(combiLinkCtr);
configvc.put("combiCtr", combiLinkCtr.getInitialComponent());
configvc.contextPut("editorEnabled", combiLinkCtr.isEditorEnabled());
// Security configuration form
boolean allowCoachEdit = stNode.getModuleConfiguration().getBooleanSafe(CONFIG_KEY_ALLOW_COACH_EDIT, false);
securitySettingForm = new SecuritySettingsForm(ureq, getWindowControl(), allowRelativeLinks, allowCoachEdit);
listenTo(securitySettingForm);
configvc.put("allowRelativeLinksForm", securitySettingForm.getInitialComponent());
// Add options tab
if (myTabbedPane != null) {
if (!myTabbedPane.containsTab(deliveryOptionsCtrl.getInitialComponent())) {
myTabbedPane.addTab(translate(PANE_TAB_DELIVERYOPTIONS), deliveryOptionsCtrl.getInitialComponent());
}
}
}
Aggregations