use of org.olat.modules.portfolio.ui.BinderController in project OpenOLAT by OpenOLAT.
the class PortfolioConfigForm method doPreview.
private void doPreview(UserRequest ureq) {
removeAsListenerAndDispose(previewCtr);
removeAsListenerAndDispose(columnLayoutCtr);
if (map != null) {
EPSecurityCallback secCallback = new EPSecurityCallbackImpl(false, true);
previewCtr = EPUIFactory.createPortfolioStructureMapPreviewController(ureq, getWindowControl(), map, secCallback);
} else if (binder != null && stackPanel instanceof TooledStackedPanel) {
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getReadOnlyCallback();
BinderConfiguration bConfig = BinderConfiguration.createTemplateConfig(false);
previewCtr = new BinderController(ureq, getWindowControl(), (TooledStackedPanel) stackPanel, secCallback, binder, bConfig);
} else {
return;
}
listenTo(previewCtr);
columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), previewCtr);
stackPanel.pushController(translate("preview.map"), columnLayoutCtr);
listenTo(columnLayoutCtr);
}
use of org.olat.modules.portfolio.ui.BinderController in project OpenOLAT by OpenOLAT.
the class PortfolioResultDetailsController method doOpenMap.
private void doOpenMap(UserRequest ureq, Binder binder) {
if (stackPanel instanceof TooledStackedPanel) {
binder = portfolioService.getBinderByKey(binder.getKey());
portfolioService.updateBinderUserInformations(binder, getIdentity());
List<AccessRights> rights = portfolioService.getAccessRights(binder, getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForCourseCoach(binder, rights);
BinderConfiguration config = BinderConfiguration.createConfig(binder);
BinderController binderCtrl = new BinderController(ureq, getWindowControl(), (TooledStackedPanel) stackPanel, secCallback, binder, config);
String displayName = StringHelper.escapeHtml(binder.getTitle());
stackPanel.pushController(displayName, binderCtrl);
binderCtrl.activate(ureq, null, null);
}
}
use of org.olat.modules.portfolio.ui.BinderController in project OpenOLAT by OpenOLAT.
the class MySharedItemsController method doSelectBinder.
private BinderController doSelectBinder(UserRequest ureq, MySharedItemRow row) {
Binder binder = portfolioService.getBinderByKey(row.getBinderKey());
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);
String displayName = StringHelper.escapeHtml(binder.getTitle());
stackPanel.pushController(displayName, binderCtrl);
return binderCtrl;
}
}
use of org.olat.modules.portfolio.ui.BinderController in project OpenOLAT by OpenOLAT.
the class SharedBindersController method doSelectBinder.
private BinderController doSelectBinder(UserRequest ureq, SharedItemRow row) {
Binder binder = portfolioService.getBinderByKey(row.getBinderKey());
if (binder == null) {
showWarning("warning.portfolio.not.found");
return null;
} else {
removeAsListenerAndDispose(binderCtrl);
portfolioService.updateBinderUserInformations(binder, getIdentity());
row.setRecentLaunch(new Date());
OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
WindowControl swControl = addToHistory(ureq, binderOres, null);
List<AccessRights> rights = portfolioService.getAccessRights(binder, getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForCoach(binder, rights);
BinderConfiguration config = BinderConfiguration.createConfig(binder);
binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
String displayName = StringHelper.escapeHtml(binder.getTitle());
stackPanel.pushController(displayName, binderCtrl);
return binderCtrl;
}
}
use of org.olat.modules.portfolio.ui.BinderController in project OpenOLAT by OpenOLAT.
the class CollaborationTools method createPortfolioController.
/**
* @param ureq
* @param wControl
* @param mapProperty The property is mandatory!
* @return
*/
private Controller createPortfolioController(UserRequest ureq, WindowControl wControl, TooledStackedPanel stackPanel, Property mapProperty) {
Long key = mapProperty.getLongValue();
String version = mapProperty.getStringValue();
Controller ctrl;
if ("2".equals(version)) {
PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class);
Binder binder = portfolioService.getBinderByKey(key);
portfolioService.updateBinderUserInformations(binder, ureq.getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForBusinessGroup();
BinderController binderCtrl = new BinderController(ureq, wControl, stackPanel, secCallback, binder, BinderConfiguration.createBusinessGroupConfig());
ctrl = binderCtrl;
} else {
PortfolioStructureMap map = (PortfolioStructureMap) CoreSpringFactory.getImpl(EPFrontendManager.class).loadPortfolioStructureByKey(key);
EPSecurityCallback secCallback = new EPSecurityCallbackImpl(true, true);
ctrl = EPUIFactory.createMapViewController(ureq, wControl, map, secCallback);
}
return ctrl;
}
Aggregations