Search in sources :

Example 46 with OLATResourceable

use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.

the class BinderController method activateEntries.

private void activateEntries(UserRequest ureq) {
    int numOfPages = doOpenEntries(ureq).getNumOfPages();
    if (numOfPages == 1 && !secCallback.canEditBinder()) {
        PortfolioElementRow firstPage = entriesCtrl.getFirstPage();
        if (firstPage != null) {
            OLATResourceable ores = OresHelper.createOLATResourceableInstance("Page", firstPage.getPage().getKey());
            List<ContextEntry> entries = BusinessControlFactory.getInstance().createCEListFromString(ores);
            entriesCtrl.activate(ureq, entries, null);
        }
    }
}
Also used : PortfolioElementRow(org.olat.modules.portfolio.ui.model.PortfolioElementRow) OLATResourceable(org.olat.core.id.OLATResourceable) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 47 with OLATResourceable

use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.

the class BinderController method doOpenOverview.

private TableOfContentController doOpenOverview(UserRequest ureq) {
    popUpToBinderController(ureq);
    if (overviewCtrl == null) {
        OLATResourceable bindersOres = OresHelper.createOLATResourceableInstance("Toc", 0l);
        WindowControl swControl = addToHistory(ureq, bindersOres, null);
        overviewCtrl = new TableOfContentController(ureq, swControl, stackPanel, secCallback, binder, config);
        // because it will not end in the stackPanel as a pushed controller
        overviewCtrl.initTools();
        listenTo(overviewCtrl);
    } else {
        overviewCtrl.loadModel();
        overviewCtrl.updateSummaryView(ureq);
    }
    segmentButtonsCmp.setSelectedButton(overviewLink);
    mainPanel.setContent(overviewCtrl.getInitialComponent());
    return overviewCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 48 with OLATResourceable

use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.

the class BinderListController method doOpenBinder.

protected BinderController doOpenBinder(UserRequest ureq, Binder binder) {
    if (binder == null) {
        showWarning("warning.portfolio.not.found");
        return null;
    } else {
        removeAsListenerAndDispose(binderCtrl);
        portfolioService.updateBinderUserInformations(binder, getIdentity());
        OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
        WindowControl swControl = addToHistory(ureq, binderOres, null);
        BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForOwnedBinder(binder);
        BinderConfiguration config = BinderConfiguration.createConfig(binder);
        binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
        listenTo(binderCtrl);
        stackPanel.pushController(binder.getTitle(), binderCtrl);
        return binderCtrl;
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) BinderConfiguration(org.olat.modules.portfolio.BinderConfiguration)

Example 49 with OLATResourceable

use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.

the class PortfolioServiceImpl method updateCategories.

@Override
public void updateCategories(Media media, List<String> categories) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Media.class, media.getKey());
    updateCategories(ores, categories);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable)

Example 50 with OLATResourceable

use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.

the class PortfolioServiceImpl method updateCategories.

@Override
public void updateCategories(PortfolioElement element, List<String> categories) {
    OLATResourceable ores = getOLATResoucreable(element);
    updateCategories(ores, categories);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable)

Aggregations

OLATResourceable (org.olat.core.id.OLATResourceable)924 WindowControl (org.olat.core.gui.control.WindowControl)304 Test (org.junit.Test)158 Identity (org.olat.core.id.Identity)154 RepositoryEntry (org.olat.repository.RepositoryEntry)130 ContextEntry (org.olat.core.id.context.ContextEntry)82 ArrayList (java.util.ArrayList)68 OLATResource (org.olat.resource.OLATResource)60 Controller (org.olat.core.gui.control.Controller)48 Date (java.util.Date)46 AssertException (org.olat.core.logging.AssertException)32 StateSite (org.olat.core.id.context.StateSite)30 SyncerExecutor (org.olat.core.util.coordinate.SyncerExecutor)30 ICourse (org.olat.course.ICourse)30 CourseNode (org.olat.course.nodes.CourseNode)28 DBCheckbox (org.olat.course.nodes.cl.model.DBCheckbox)28 BusinessControl (org.olat.core.id.context.BusinessControl)24 BusinessGroup (org.olat.group.BusinessGroup)24 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)22 BinderSecurityCallback (org.olat.modules.portfolio.BinderSecurityCallback)22