Search in sources :

Example 6 with VCProvider

use of de.bps.course.nodes.vc.provider.VCProvider 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 7 with VCProvider

use of de.bps.course.nodes.vc.provider.VCProvider in project OpenOLAT by OpenOLAT.

the class VCCourseNode method cleanupOnDelete.

@Override
public void cleanupOnDelete(ICourse course) {
    super.cleanupOnDelete(course);
    // load configuration
    final String providerId = getModuleConfiguration().getStringValue(CONF_PROVIDER_ID);
    VCProvider provider = providerId == null ? VCProviderFactory.createDefaultProvider() : VCProviderFactory.createProvider(providerId);
    VCConfiguration config = handleConfig(provider);
    // remove meeting
    provider.removeClassroom(course.getResourceableId() + "_" + this.getIdent(), config);
}
Also used : VCProvider(de.bps.course.nodes.vc.provider.VCProvider) VCConfiguration(de.bps.course.nodes.vc.VCConfiguration)

Example 8 with VCProvider

use of de.bps.course.nodes.vc.provider.VCProvider in project OpenOLAT by OpenOLAT.

the class VCSelectionForm method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    int num = VCProviderFactory.getProviders().size();
    String[] keys = new String[num];
    String[] vals = new String[num];
    int i = 0;
    for (VCProvider provider : VCProviderFactory.getProviders()) {
        keys[i] = provider.getProviderId();
        vals[i] = provider.getDisplayName();
        i++;
    }
    selVC = uifactory.addDropdownSingleselect("config.select.vc", flc, keys, vals, null);
    selVC.select(selectedProvider, true);
    selVC.addActionListener(FormEvent.ONCHANGE);
}
Also used : VCProvider(de.bps.course.nodes.vc.provider.VCProvider)

Example 9 with VCProvider

use of de.bps.course.nodes.vc.provider.VCProvider in project openolat by klemens.

the class VCSelectionForm method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    int num = VCProviderFactory.getProviders().size();
    String[] keys = new String[num];
    String[] vals = new String[num];
    int i = 0;
    for (VCProvider provider : VCProviderFactory.getProviders()) {
        keys[i] = provider.getProviderId();
        vals[i] = provider.getDisplayName();
        i++;
    }
    selVC = uifactory.addDropdownSingleselect("config.select.vc", flc, keys, vals, null);
    selVC.select(selectedProvider, true);
    selVC.addActionListener(FormEvent.ONCHANGE);
}
Also used : VCProvider(de.bps.course.nodes.vc.provider.VCProvider)

Example 10 with VCProvider

use of de.bps.course.nodes.vc.provider.VCProvider in project openolat by klemens.

the class AdobeConnectCleanupJob method executeWithDB.

@Override
public void executeWithDB(JobExecutionContext arg0) throws JobExecutionException {
    if (!VCProviderFactory.existsProvider(providerId)) {
        // same as dummy job
        return;
    }
    VCProvider provider = VCProviderFactory.createProvider(providerId);
    if (!provider.isEnabled()) {
        return;
    }
    if (!(provider instanceof AdobeConnectProvider)) {
        logger.error("Invalid configuration: defined a virtual classroom cleanup job and provider implementation doesn't fit");
        return;
    }
    AdobeConnectProvider adobe = (AdobeConnectProvider) provider;
    if (!adobe.isProviderAvailable()) {
        logger.debug("Tried to cleanup Adobe Connect meetings but it's actually not available");
        return;
    }
    // cleanup unused meetings
    if (cleanupMeetings) {
        logger.info("Start cleaning unused Adobe Connect meetings");
        cleanupMeetings(adobe, daysToKeep);
    }
    // cleanup unused moderator guest accounts
    if (cleanupModerators) {
        logger.info("Start cleaning unused Adobe Connect moderator guest accounts");
        cleanupModerators(adobe);
    }
}
Also used : VCProvider(de.bps.course.nodes.vc.provider.VCProvider)

Aggregations

VCProvider (de.bps.course.nodes.vc.provider.VCProvider)12 VCConfiguration (de.bps.course.nodes.vc.VCConfiguration)6 VCEditController (de.bps.course.nodes.vc.VCEditController)6 NoProviderController (de.bps.course.nodes.vc.NoProviderController)4 TabbableDefaultController (org.olat.core.gui.control.generic.tabbable.TabbableDefaultController)4 NodeEditController (org.olat.course.editor.NodeEditController)4 VCRunController (de.bps.course.nodes.vc.VCRunController)2 Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 Roles (org.olat.core.id.Roles)2 ICourse (org.olat.course.ICourse)2 ConditionEditController (org.olat.course.condition.ConditionEditController)2 StatusDescription (org.olat.course.editor.StatusDescription)2 AbstractAccessableCourseNode (org.olat.course.nodes.AbstractAccessableCourseNode)2 CourseNode (org.olat.course.nodes.CourseNode)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 RepositoryManager (org.olat.repository.RepositoryManager)2