Search in sources :

Example 1 with SecuritySettingsForm

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());
        }
    }
}
Also used : LinkFileCombiCalloutController(org.olat.core.commons.controllers.filechooser.LinkFileCombiCalloutController) SecuritySettingsForm(org.olat.course.nodes.sp.SecuritySettingsForm) CourseInternalLinkTreeModel(org.olat.course.tree.CourseInternalLinkTreeModel)

Example 2 with SecuritySettingsForm

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());
        }
    }
}
Also used : LinkFileCombiCalloutController(org.olat.core.commons.controllers.filechooser.LinkFileCombiCalloutController) SecuritySettingsForm(org.olat.course.nodes.sp.SecuritySettingsForm) CourseInternalLinkTreeModel(org.olat.course.tree.CourseInternalLinkTreeModel)

Aggregations

LinkFileCombiCalloutController (org.olat.core.commons.controllers.filechooser.LinkFileCombiCalloutController)2 SecuritySettingsForm (org.olat.course.nodes.sp.SecuritySettingsForm)2 CourseInternalLinkTreeModel (org.olat.course.tree.CourseInternalLinkTreeModel)2