use of org.olat.modules.portfolio.BinderSecurityCallback in project openolat by klemens.
the class PortfolioAssessmentDetailsController method loadModel.
private void loadModel(UserRequest ureq, Binder loadedBinder) {
if (loadedBinder == null) {
mainVC.contextPut("noMap", Boolean.TRUE);
} else {
Formatter formatter = Formatter.getInstance(getLocale());
String templateTitle = loadedBinder.getTemplate().getTitle();
mainVC.contextPut("templateTitle", templateTitle);
String copyDate = "";
if (loadedBinder.getCopyDate() != null) {
copyDate = formatter.formatDateAndTime(loadedBinder.getCopyDate());
}
mainVC.contextPut("copyDate", copyDate);
String returnDate = "";
if (loadedBinder.getReturnDate() != null) {
returnDate = formatter.formatDateAndTime(loadedBinder.getReturnDate());
}
mainVC.contextPut("returnDate", returnDate);
List<AccessRights> rights = portfolioService.getAccessRights(loadedBinder, getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForCourseCoach(loadedBinder, rights);
BinderConfiguration config = BinderConfiguration.createConfig(loadedBinder);
assessmentCtrl = new BinderAssessmentController(ureq, getWindowControl(), secCallback, loadedBinder, config);
listenTo(assessmentCtrl);
mainVC.put("assessment", assessmentCtrl.getInitialComponent());
}
}
use of org.olat.modules.portfolio.BinderSecurityCallback in project openolat by klemens.
the class SharedPagesController method doSelectedPage.
private Activateable2 doSelectedPage(UserRequest ureq, SharedPageRow row) {
removeAsListenerAndDispose(pageCtrl);
Page reloadedPage = portfolioService.getPageByKey(row.getPageKey());
Binder binder = reloadedPage.getSection().getBinder();
OLATResourceable pageOres = OresHelper.createOLATResourceableInstance("Entry", reloadedPage.getKey());
WindowControl swControl = addToHistory(ureq, pageOres, null);
List<AccessRights> rights = portfolioService.getAccessRights(binder, getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForCoach(binder, rights);
pageCtrl = new PageRunController(ureq, swControl, stackPanel, secCallback, reloadedPage, false);
listenTo(pageCtrl);
stackPanel.pushController(reloadedPage.getTitle(), pageCtrl);
return pageCtrl;
}
use of org.olat.modules.portfolio.BinderSecurityCallback in project OpenOLAT by OpenOLAT.
the class SharedPagesController method doSelectedPage.
private Activateable2 doSelectedPage(UserRequest ureq, SharedPageRow row) {
removeAsListenerAndDispose(pageCtrl);
Page reloadedPage = portfolioService.getPageByKey(row.getPageKey());
Binder binder = reloadedPage.getSection().getBinder();
OLATResourceable pageOres = OresHelper.createOLATResourceableInstance("Entry", reloadedPage.getKey());
WindowControl swControl = addToHistory(ureq, pageOres, null);
List<AccessRights> rights = portfolioService.getAccessRights(binder, getIdentity());
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForCoach(binder, rights);
pageCtrl = new PageRunController(ureq, swControl, stackPanel, secCallback, reloadedPage, false);
listenTo(pageCtrl);
stackPanel.pushController(reloadedPage.getTitle(), pageCtrl);
return pageCtrl;
}
use of org.olat.modules.portfolio.BinderSecurityCallback in project openolat by klemens.
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.BinderSecurityCallback in project openolat by klemens.
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;
}
}
Aggregations