use of org.olat.course.nodes.gta.TaskDueDate in project openolat by klemens.
the class EditDueDatesController method formOK.
@Override
protected void formOK(UserRequest ureq) {
TaskDueDate dueDates = gtaManager.getDueDatesTask(task);
dueDates.setAssignmentDueDate(assignmentDueDateEl.getDate());
dueDates.setSubmissionDueDate(submissionDueDateEl.getDate());
dueDates.setRevisionsDueDate(revisionDueDateEl.getDate());
dueDates.setSolutionDueDate(solutionDueDateEl.getDate());
dueDates = gtaManager.updateTaskDueDate(dueDates);
if (task.getTaskStatus().ordinal() > TaskProcess.submit.ordinal() && dueDates.getSubmissionDueDate() != null && dueDates.getSubmissionDueDate().after(ureq.getRequestTimestamp())) {
// only submit allowed
TaskProcess submit = gtaManager.previousStep(TaskProcess.review, gtaNode);
if (submit == TaskProcess.submit) {
task = gtaManager.updateTask(task, submit, gtaNode, Role.coach);
gtaManager.log("Back to submission", "revert status of task back to submission", task, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
}
}
fireEvent(ureq, Event.DONE_EVENT);
}
Aggregations