Search in sources :

Example 1 with TaskDueDate

use of org.olat.course.nodes.gta.TaskDueDate in project OpenOLAT by OpenOLAT.

the class EditMultipleDueDatesController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    for (Task task : tasks) {
        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(), task.getIdentity(), task.getBusinessGroup(), courseEnv, gtaNode);
            }
        }
    }
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : Task(org.olat.course.nodes.gta.Task) TaskDueDate(org.olat.course.nodes.gta.TaskDueDate) TaskProcess(org.olat.course.nodes.gta.TaskProcess)

Example 2 with TaskDueDate

use of org.olat.course.nodes.gta.TaskDueDate in project openolat by klemens.

the class EditMultipleDueDatesController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    for (Task task : tasks) {
        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(), task.getIdentity(), task.getBusinessGroup(), courseEnv, gtaNode);
            }
        }
    }
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : Task(org.olat.course.nodes.gta.Task) TaskDueDate(org.olat.course.nodes.gta.TaskDueDate) TaskProcess(org.olat.course.nodes.gta.TaskProcess)

Example 3 with TaskDueDate

use of org.olat.course.nodes.gta.TaskDueDate in project openolat by klemens.

the class ConfirmRevisionsController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    TaskDueDate dueDates = gtaManager.getDueDatesTask(assignedTask);
    dueDates.setRevisionsDueDate(revisionDueDateEl.getDate());
    gtaManager.updateTaskDueDate(dueDates);
    dbInstance.commit();
    // make sure the task is up to date
    assignedTask = gtaManager.getTask(dueDates);
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : TaskDueDate(org.olat.course.nodes.gta.TaskDueDate)

Example 4 with TaskDueDate

use of org.olat.course.nodes.gta.TaskDueDate in project OpenOLAT by OpenOLAT.

the class ConfirmRevisionsController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    TaskDueDate dueDates = gtaManager.getDueDatesTask(assignedTask);
    dueDates.setRevisionsDueDate(revisionDueDateEl.getDate());
    gtaManager.updateTaskDueDate(dueDates);
    dbInstance.commit();
    // make sure the task is up to date
    assignedTask = gtaManager.getTask(dueDates);
    fireEvent(ureq, Event.DONE_EVENT);
}
Also used : TaskDueDate(org.olat.course.nodes.gta.TaskDueDate)

Example 5 with TaskDueDate

use of org.olat.course.nodes.gta.TaskDueDate in project OpenOLAT by OpenOLAT.

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