Search in sources :

Example 1 with TabbableDefaultController

use of org.olat.core.gui.control.generic.tabbable.TabbableDefaultController 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)

Example 2 with TabbableDefaultController

use of org.olat.core.gui.control.generic.tabbable.TabbableDefaultController in project openolat by klemens.

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

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 TabbableDefaultController (org.olat.core.gui.control.generic.tabbable.TabbableDefaultController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 AbstractAccessableCourseNode (org.olat.course.nodes.AbstractAccessableCourseNode)2 CourseNode (org.olat.course.nodes.CourseNode)2