use of org.olat.modules.portfolio.BinderConfiguration in project openolat by klemens.
the class DeletedBinderController method doOpenBinder.
@Override
protected BinderController doOpenBinder(UserRequest ureq, Binder binder) {
if (binder == null) {
showWarning("warning.portfolio.not.found");
return null;
} else {
removeAsListenerAndDispose(binderCtrl);
OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
WindowControl swControl = addToHistory(ureq, binderOres, null);
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForDeletedBinder();
BinderConfiguration config = BinderConfiguration.createConfig(binder);
binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
listenTo(binderCtrl);
stackPanel.pushController(binder.getTitle(), binderCtrl);
return binderCtrl;
}
}
use of org.olat.modules.portfolio.BinderConfiguration 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.BinderConfiguration 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.BinderConfiguration 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