use of org.olat.modules.forms.model.xml.FileUpload 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.forms.model.xml.FileUpload in project OpenOLAT by OpenOLAT.
the class FileUploadHandler method createPageElement.
@Override
public PageElement createPageElement(Locale locale) {
EvaluationFormsModule evaluationFormModule = CoreSpringFactory.getImpl(EvaluationFormsModule.class);
FileUpload part = new FileUpload();
part.setId(UUID.randomUUID().toString());
part.setMaxUploadSizeKB(evaluationFormModule.getMaxFileUploadLimitKB());
return part;
}
use of org.olat.modules.forms.model.xml.FileUpload 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;
}
use of org.olat.modules.forms.model.xml.FileUpload in project openolat by klemens.
the class FileUploadHandler method createPageElement.
@Override
public PageElement createPageElement(Locale locale) {
EvaluationFormsModule evaluationFormModule = CoreSpringFactory.getImpl(EvaluationFormsModule.class);
FileUpload part = new FileUpload();
part.setId(UUID.randomUUID().toString());
part.setMaxUploadSizeKB(evaluationFormModule.getMaxFileUploadLimitKB());
return part;
}
use of org.olat.modules.forms.model.xml.FileUpload in project OpenOLAT by OpenOLAT.
the class EvaluationFormController method forgeElement.
private EvaluationFormElementWrapper forgeElement(UserRequest ureq, AbstractElement element) {
EvaluationFormElementWrapper wrapper = null;
String type = element.getType();
switch(type) {
case "formhtitle":
case "formhr":
case "formhtmlraw":
wrapper = new EvaluationFormElementWrapper(element);
break;
case "formrubric":
wrapper = forgeRubric((Rubric) element);
break;
case "formtextinput":
wrapper = forgeTextInput((TextInput) element);
break;
case "formfileupload":
wrapper = forgeFileUpload(ureq, (FileUpload) element);
break;
}
return wrapper;
}
Aggregations