Search in sources :

Example 6 with TaskDueDate

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);
}
Also used : TaskDueDate(org.olat.course.nodes.gta.TaskDueDate) TaskProcess(org.olat.course.nodes.gta.TaskProcess)

Aggregations

TaskDueDate (org.olat.course.nodes.gta.TaskDueDate)6 TaskProcess (org.olat.course.nodes.gta.TaskProcess)4 Task (org.olat.course.nodes.gta.Task)2