use of org.olat.modules.portfolio.ui.editor.PageRunControllerElement in project OpenOLAT by OpenOLAT.
the class FileUploadHandler method getContent.
@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
if (element instanceof FileUpload) {
FileUpload fileUpload = (FileUpload) element;
Controller ctrl = new FileUploadController(ureq, wControl, fileUpload);
return new PageRunControllerElement(ctrl);
}
return null;
}
use of org.olat.modules.portfolio.ui.editor.PageRunControllerElement in project OpenOLAT by OpenOLAT.
the class EvaluationFormHandler method getContent.
@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
Controller ctrl = null;
if (element instanceof EvaluationFormPart) {
PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class);
// find assignment
EvaluationFormPart eva = (EvaluationFormPart) element;
PageBody body = eva.getBody();
Assignment assignment = portfolioService.getAssignment(body);
if (assignment == null) {
ctrl = getController(ureq, wControl, body, eva);
} else {
ctrl = getControllerForAssignment(ureq, wControl, body, assignment, hints.isOnePage());
}
}
if (ctrl == null) {
Translator translator = Util.createPackageTranslator(PortfolioHomeController.class, ureq.getLocale());
String title = translator.translate("warning.evaluation.not.visible.title");
String text = translator.translate("warning.evaluation.not.visible.text");
ctrl = MessageUIFactory.createWarnMessage(ureq, wControl, title, text);
}
return new PageRunControllerElement(ctrl);
}
use of org.olat.modules.portfolio.ui.editor.PageRunControllerElement in project openolat by klemens.
the class EvaluationFormHandler method getContent.
@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
Controller ctrl = null;
if (element instanceof EvaluationFormPart) {
PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class);
// find assignment
EvaluationFormPart eva = (EvaluationFormPart) element;
PageBody body = eva.getBody();
Assignment assignment = portfolioService.getAssignment(body);
if (assignment == null) {
ctrl = getController(ureq, wControl, body, eva);
} else {
ctrl = getControllerForAssignment(ureq, wControl, body, assignment, hints.isOnePage());
}
}
if (ctrl == null) {
Translator translator = Util.createPackageTranslator(PortfolioHomeController.class, ureq.getLocale());
String title = translator.translate("warning.evaluation.not.visible.title");
String text = translator.translate("warning.evaluation.not.visible.text");
ctrl = MessageUIFactory.createWarnMessage(ureq, wControl, title, text);
}
return new PageRunControllerElement(ctrl);
}
use of org.olat.modules.portfolio.ui.editor.PageRunControllerElement in project openolat by klemens.
the class FileUploadHandler method getContent.
@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
if (element instanceof FileUpload) {
FileUpload fileUpload = (FileUpload) element;
Controller ctrl = new FileUploadController(ureq, wControl, fileUpload);
return new PageRunControllerElement(ctrl);
}
return null;
}
Aggregations