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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations