Search in sources :

Example 1 with FileUpload

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;
}
Also used : PageRunControllerElement(org.olat.modules.portfolio.ui.editor.PageRunControllerElement) FileUploadController(org.olat.modules.forms.ui.FileUploadController) FileUploadEditorController(org.olat.modules.forms.ui.FileUploadEditorController) Controller(org.olat.core.gui.control.Controller) PageElementEditorController(org.olat.modules.portfolio.ui.editor.PageElementEditorController) FileUpload(org.olat.modules.forms.model.xml.FileUpload) FileUploadController(org.olat.modules.forms.ui.FileUploadController)

Example 2 with FileUpload

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;
}
Also used : EvaluationFormsModule(org.olat.modules.forms.EvaluationFormsModule) FileUpload(org.olat.modules.forms.model.xml.FileUpload)

Example 3 with FileUpload

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;
}
Also used : PageRunControllerElement(org.olat.modules.portfolio.ui.editor.PageRunControllerElement) FileUploadController(org.olat.modules.forms.ui.FileUploadController) FileUploadEditorController(org.olat.modules.forms.ui.FileUploadEditorController) Controller(org.olat.core.gui.control.Controller) PageElementEditorController(org.olat.modules.portfolio.ui.editor.PageElementEditorController) FileUpload(org.olat.modules.forms.model.xml.FileUpload) FileUploadController(org.olat.modules.forms.ui.FileUploadController)

Example 4 with FileUpload

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;
}
Also used : EvaluationFormsModule(org.olat.modules.forms.EvaluationFormsModule) FileUpload(org.olat.modules.forms.model.xml.FileUpload)

Example 5 with FileUpload

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;
}
Also used : Rubric(org.olat.modules.forms.model.xml.Rubric) EvaluationFormElementWrapper(org.olat.modules.forms.ui.model.EvaluationFormElementWrapper) TextInput(org.olat.modules.forms.model.xml.TextInput) FileUpload(org.olat.modules.forms.model.xml.FileUpload)

Aggregations

FileUpload (org.olat.modules.forms.model.xml.FileUpload)6 Controller (org.olat.core.gui.control.Controller)2 EvaluationFormsModule (org.olat.modules.forms.EvaluationFormsModule)2 Rubric (org.olat.modules.forms.model.xml.Rubric)2 TextInput (org.olat.modules.forms.model.xml.TextInput)2 FileUploadController (org.olat.modules.forms.ui.FileUploadController)2 FileUploadEditorController (org.olat.modules.forms.ui.FileUploadEditorController)2 EvaluationFormElementWrapper (org.olat.modules.forms.ui.model.EvaluationFormElementWrapper)2 PageElementEditorController (org.olat.modules.portfolio.ui.editor.PageElementEditorController)2 PageRunControllerElement (org.olat.modules.portfolio.ui.editor.PageRunControllerElement)2