Search in sources :

Example 26 with ReferencableEntriesSearchController

use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.

the class CourseSiteAdminController method doSelecCourse.

private void doSelecCourse(UserRequest ureq, LanguageConfigurationRow row) {
    removeAsListenerAndDispose(selectCtrl);
    selectCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { "CourseModule" }, translate("select"), true, true, false, true);
    selectCtrl.setUserObject(row);
    listenTo(selectCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), selectCtrl.getInitialComponent(), true, translate("select"));
    cmc.activate();
    listenTo(cmc);
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 27 with ReferencableEntriesSearchController

use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.

the class SelectCourseStepForm method doChooseCourse.

private void doChooseCourse(UserRequest ureq) {
    removeAsListenerAndDispose(cmc);
    removeAsListenerAndDispose(searchCtrl);
    searchCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.ORES_TYPE_COURSE }, translate("step.select.course"));
    listenTo(searchCtrl);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), searchCtrl.getInitialComponent(), true, translate("step.select.course"));
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 28 with ReferencableEntriesSearchController

use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.

the class VarForm method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
public void event(UserRequest ureq, Component source, Event event) {
    if (source == chooseCPButton || source == changeCPButton) {
        // those must be links
        removeAsListenerAndDispose(searchController);
        searchController = new ReferencableEntriesSearchController(getWindowControl(), ureq, ScormCPFileResource.TYPE_NAME, translate("command.choosecp"));
        listenTo(searchController);
        removeAsListenerAndDispose(cmc);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), searchController.getInitialComponent(), true, translate("command.importcp"));
        listenTo(cmc);
        cmc.activate();
    } else if (source == previewLink) {
        // Preview as modal dialogue
        // only if the config is valid
        RepositoryEntry re = getScormCPReference(config, false);
        if (re == null) {
            // we cannot preview it, because the repository entry
            // had been deleted between the time when it was
            // chosen here, and now
            showError("error.cprepoentrymissing");
        } else {
            File cpRoot = FileResourceManager.getInstance().unzipFileResource(re.getOlatResource());
            boolean showMenu = config.getBooleanSafe(CONFIG_SHOWMENU, true);
            boolean fullWindow = config.getBooleanSafe(CONFIG_FULLWINDOW, true);
            ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapScormRepositoryEntry(re));
            ScormAPIandDisplayController previewController = ScormMainManager.getInstance().createScormAPIandDisplayController(ureq, getWindowControl(), showMenu, null, cpRoot, null, course.getResourceableId().toString(), ScormConstants.SCORM_MODE_BROWSE, ScormConstants.SCORM_MODE_NOCREDIT, true, null, true, fullWindow, false, null);
            // configure some display options
            boolean showNavButtons = config.getBooleanSafe(ScormEditController.CONFIG_SHOWNAVBUTTONS, true);
            previewController.showNavButtons(showNavButtons);
            DeliveryOptions deliveryOptions = deliveryOptionsCtrl.getOptionsForPreview();
            previewController.setDeliveryOptions(deliveryOptions);
            previewController.activate();
        }
    }
}
Also used : ScormAPIandDisplayController(org.olat.modules.scorm.ScormAPIandDisplayController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntry(org.olat.repository.RepositoryEntry) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController) File(java.io.File) DeliveryOptions(org.olat.core.gui.control.generic.iframe.DeliveryOptions)

Example 29 with ReferencableEntriesSearchController

use of org.olat.repository.controllers.ReferencableEntriesSearchController in project OpenOLAT by OpenOLAT.

the class BusinessGroupEditResourceController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == addTabResourcesButton) {
        removeAsListenerAndDispose(repoSearchCtr);
        removeAsListenerAndDispose(cmc);
        RepositoryEntryFilter filter = new ManagedEntryfilter();
        repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("resources.add"), true, true, true, true, Can.referenceable);
        listenTo(repoSearchCtr);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, translate("resources.add.title"));
        listenTo(cmc);
        cmc.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntryFilter(org.olat.repository.controllers.RepositoryEntryFilter) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 30 with ReferencableEntriesSearchController

use of org.olat.repository.controllers.ReferencableEntriesSearchController in project openolat by klemens.

the class EPMapRunController method popUpCreateMapFromTemplateBox.

private void popUpCreateMapFromTemplateBox(UserRequest ureq) {
    String title = translate("create.map");
    String commandLabel = translate("create.map.selectTemplate");
    removeAsListenerAndDispose(searchTemplateCtrl);
    searchTemplateCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { EPTemplateMapResource.TYPE_NAME }, commandLabel, false, false, false, false);
    listenTo(searchTemplateCtrl);
    createMapBox = new CloseableModalController(getWindowControl(), title, searchTemplateCtrl.getInitialComponent(), true, title);
    createMapBox.setCustomWindowCSS("o_sel_add_map_template_window");
    listenTo(createMapBox);
    createMapBox.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Aggregations

ReferencableEntriesSearchController (org.olat.repository.controllers.ReferencableEntriesSearchController)40 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)38 RepositoryEntry (org.olat.repository.RepositoryEntry)10 File (java.io.File)6 DeliveryOptions (org.olat.core.gui.control.generic.iframe.DeliveryOptions)4 Identity (org.olat.core.id.Identity)4 RepositoryEntryFilter (org.olat.repository.controllers.RepositoryEntryFilter)4 SubscriptionContext (org.olat.core.commons.services.notifications.SubscriptionContext)2 MultipleSelectionElement (org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement)2 SelectionElement (org.olat.core.gui.components.form.flexible.elements.SelectionElement)2 LocalFolderImpl (org.olat.core.util.vfs.LocalFolderImpl)2 CourseEnvironment (org.olat.course.run.environment.CourseEnvironment)2 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)2 QTIResult (org.olat.ims.qti.QTIResult)2 ScormAPIandDisplayController (org.olat.modules.scorm.ScormAPIandDisplayController)2 VideoDisplayController (org.olat.modules.video.ui.VideoDisplayController)2 FeedPreviewSecurityCallback (org.olat.modules.webFeed.FeedPreviewSecurityCallback)2 FeedSecurityCallback (org.olat.modules.webFeed.FeedSecurityCallback)2 WikiSecurityCallback (org.olat.modules.wiki.WikiSecurityCallback)2 WikiSecurityCallbackImpl (org.olat.modules.wiki.WikiSecurityCallbackImpl)2