Skip to content
Snippets Groups Projects
Commit 5002e4b0 authored by srosse's avatar srosse
Browse files

OO-4579: allow upload / multipart in two other wizards of grading flow

parent 074b5558
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,7 @@ import org.olat.core.id.Identity;
import org.olat.core.id.Roles;
import org.olat.core.id.context.ContextEntry;
import org.olat.core.id.context.StateEntry;
import org.olat.core.util.FileUtils;
import org.olat.core.util.StringHelper;
import org.olat.core.util.mail.ContactList;
import org.olat.core.util.mail.ContactMessage;
......@@ -716,6 +717,9 @@ public class GradingAssignmentsListController extends FormBasicController implem
for(GradingAssignment assignment:assignments) {
gradingService.assignGrader(assignment, assignGrader.getGrader(), sendTemplate, result);
}
if(mailTemplate.getAttachmentsTmpDir() != null) {
FileUtils.deleteDirsAndFiles(mailTemplate.getAttachmentsTmpDir(), true, true);
}
return StepsMainRunController.DONE_MODIFIED;
};
......@@ -760,6 +764,9 @@ public class GradingAssignmentsListController extends FormBasicController implem
GradingAssignment unassignedAssignment = gradingService.unassignGrader(assignment);
gradingService.assignGrader(unassignedAssignment, assignGrader.getGrader(), sendTemplate, result);
}
if(mailTemplate.getAttachmentsTmpDir() != null) {
FileUtils.deleteDirsAndFiles(mailTemplate.getAttachmentsTmpDir(), true, true);
}
return StepsMainRunController.DONE_MODIFIED;
};
......
......@@ -52,6 +52,7 @@ public class AssignGrader1ChooseMemberStep extends BasicStep {
@Override
public StepFormController getStepController(UserRequest ureq, WindowControl wControl, StepsRunContext runContext, Form form) {
form.setMultipartEnabled(true);
return new AssignGraderBySearchController(ureq, wControl, assignGrader, form, runContext);
}
......
......@@ -55,6 +55,7 @@ public class AssignGrader3MailStep extends BasicStep {
public StepFormController getStepController(UserRequest ureq, WindowControl wControl, StepsRunContext runContext, Form form) {
ContactList contacts = new ContactList(getTranslator().translate("assign.grader.contact"));
contacts.add(assignGrader.getGrader());
form.setMultipartEnabled(true);
return new ImportGraderMailController(ureq, wControl, mailTemplate, contacts, assignGrader, form, runContext);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment