Search in sources :

Example 41 with NodeEditController

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);
}
Also used : NodeEditController(org.olat.course.editor.NodeEditController) CourseNode(org.olat.course.nodes.CourseNode) AbstractAccessableCourseNode(org.olat.course.nodes.AbstractAccessableCourseNode) DENEditController(de.bps.course.nodes.den.DENEditController)

Example 42 with NodeEditController

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);
}
Also used : NodeEditController(org.olat.course.editor.NodeEditController) LLEditController(de.bps.course.nodes.ll.LLEditController) CourseNode(org.olat.course.nodes.CourseNode) AbstractAccessableCourseNode(org.olat.course.nodes.AbstractAccessableCourseNode)

Example 43 with NodeEditController

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;
}
Also used : NodeEditController(org.olat.course.editor.NodeEditController) CourseNode(org.olat.course.nodes.CourseNode) AbstractAccessableCourseNode(org.olat.course.nodes.AbstractAccessableCourseNode) ChecklistEditController(de.bps.course.nodes.cl.ChecklistEditController)

Example 44 with 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);
        }
    }
}
Also used : Condition(org.olat.course.condition.Condition) NodeEditController(org.olat.course.editor.NodeEditController) DeliveryOptions(org.olat.core.gui.control.generic.iframe.DeliveryOptions)

Example 45 with NodeEditController

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;
}
Also used : NodeEditController(org.olat.course.editor.NodeEditController) VCEditController(de.bps.course.nodes.vc.VCEditController) CourseNode(org.olat.course.nodes.CourseNode) AbstractAccessableCourseNode(org.olat.course.nodes.AbstractAccessableCourseNode) TabbableDefaultController(org.olat.core.gui.control.generic.tabbable.TabbableDefaultController) VCProvider(de.bps.course.nodes.vc.provider.VCProvider) VCConfiguration(de.bps.course.nodes.vc.VCConfiguration) NoProviderController(de.bps.course.nodes.vc.NoProviderController)

Aggregations

NodeEditController (org.olat.course.editor.NodeEditController)78 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)10 AbstractAccessableCourseNode (org.olat.course.nodes.AbstractAccessableCourseNode)8 CourseNode (org.olat.course.nodes.CourseNode)8 IQEditController (org.olat.course.nodes.iq.IQEditController)6 Condition (org.olat.course.condition.Condition)4 FeedNodeEditController (org.olat.course.nodes.feed.FeedNodeEditController)4 InfoCourseNodeEditController (org.olat.course.nodes.info.InfoCourseNodeEditController)4 ChecklistEditController (de.bps.course.nodes.cl.ChecklistEditController)2 DENEditController (de.bps.course.nodes.den.DENEditController)2 LLEditController (de.bps.course.nodes.ll.LLEditController)2 NoProviderController (de.bps.course.nodes.vc.NoProviderController)2 VCConfiguration (de.bps.course.nodes.vc.VCConfiguration)2 VCEditController (de.bps.course.nodes.vc.VCEditController)2 VCProvider (de.bps.course.nodes.vc.provider.VCProvider)2 List (java.util.List)2 DeliveryOptions (org.olat.core.gui.control.generic.iframe.DeliveryOptions)2 TabbableDefaultController (org.olat.core.gui.control.generic.tabbable.TabbableDefaultController)2 LTIEditController (org.olat.course.nodes.basiclti.LTIEditController)2 BCCourseNodeEditController (org.olat.course.nodes.bc.BCCourseNodeEditController)2