use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTAManagerImpl method reviewedTask.
@Override
public Task reviewedTask(Task task, GTACourseNode cNode) {
TaskProcess solution = nextStep(TaskProcess.correction, cNode);
TaskImpl taskImpl = (TaskImpl) task;
taskImpl.setAcceptationDate(new Date());
return updateTask(taskImpl, solution, cNode, Role.coach);
}
use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTACoachController method doBackToSubmission.
private void doBackToSubmission(UserRequest ureq, Task task) {
// 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);
cleanUpProcess();
process(ureq);
}
}
use of org.olat.course.nodes.gta.TaskProcess 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);
}
use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTAAbstractController method collapsedContents.
protected final void collapsedContents(Task currentTask) {
TaskProcess status = null;
TaskProcess previousStatus = null;
if (currentTask != null) {
status = currentTask.getTaskStatus();
previousStatus = gtaManager.previousStep(status, gtaNode);
}
boolean assignment = Boolean.TRUE.equals(stepPreferences.getAssignement()) || TaskProcess.assignment.equals(status) || TaskProcess.assignment.equals(previousStatus);
mainVC.contextPut("collapse_assignement", new Boolean(assignment));
boolean submit = Boolean.TRUE.equals(stepPreferences.getSubmit()) || TaskProcess.submit.equals(status) || TaskProcess.submit.equals(previousStatus);
mainVC.contextPut("collapse_submit", new Boolean(submit));
boolean reviewAndCorrection = Boolean.TRUE.equals(stepPreferences.getReviewAndCorrection()) || TaskProcess.review.equals(status) || TaskProcess.review.equals(previousStatus);
mainVC.contextPut("collapse_reviewAndCorrection", new Boolean(reviewAndCorrection));
boolean revision = Boolean.TRUE.equals(stepPreferences.getRevision()) || TaskProcess.revision.equals(status) || TaskProcess.revision.equals(previousStatus) || TaskProcess.correction.equals(status) || TaskProcess.correction.equals(previousStatus);
mainVC.contextPut("collapse_revision", new Boolean(revision));
boolean solution = Boolean.TRUE.equals(stepPreferences.getSolution()) || TaskProcess.solution.equals(status) || TaskProcess.solution.equals(previousStatus);
mainVC.contextPut("collapse_solution", new Boolean(solution));
boolean grading = Boolean.TRUE.equals(stepPreferences.getGrading()) || TaskProcess.grading.equals(status) || TaskProcess.grading.equals(previousStatus);
mainVC.contextPut("collapse_grading", new Boolean(grading));
}
use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTAAbstractController method process.
protected final void process(UserRequest ureq) {
Task task;
if (businessGroupTask) {
task = gtaManager.getTask(assessedGroup, taskList);
} else {
task = gtaManager.getTask(assessedIdentity, taskList);
}
if (withSubscription && subsContext != null) {
contextualSubscriptionCtr = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, publisherData);
listenTo(contextualSubscriptionCtr);
mainVC.put("contextualSubscription", contextualSubscriptionCtr.getInitialComponent());
}
boolean assignment = config.getBooleanSafe(GTACourseNode.GTASK_ASSIGNMENT);
mainVC.contextPut("assignmentEnabled", assignment);
if (assignment) {
task = stepAssignment(ureq, task);
} else if (task == null) {
TaskProcess firstStep = gtaManager.firstStep(gtaNode);
task = gtaManager.createTask(null, taskList, firstStep, assessedGroup, assessedIdentity, gtaNode);
}
boolean submit = config.getBooleanSafe(GTACourseNode.GTASK_SUBMIT);
mainVC.contextPut("submitEnabled", submit);
if (submit) {
task = stepSubmit(ureq, task);
} else if (task != null && task.getTaskStatus() == TaskProcess.submit) {
task = gtaManager.nextStep(task, gtaNode, Role.auto);
}
boolean reviewAndCorrection = config.getBooleanSafe(GTACourseNode.GTASK_REVIEW_AND_CORRECTION);
mainVC.contextPut("reviewAndCorrectionEnabled", reviewAndCorrection);
if (reviewAndCorrection) {
task = stepReviewAndCorrection(ureq, task);
} else if (task != null && task.getTaskStatus() == TaskProcess.review) {
task = gtaManager.nextStep(task, gtaNode, Role.auto);
}
boolean revision = config.getBooleanSafe(GTACourseNode.GTASK_REVISION_PERIOD);
mainVC.contextPut("revisionEnabled", reviewAndCorrection && revision);
if (reviewAndCorrection && revision) {
task = stepRevision(ureq, task);
} else if (task != null && (task.getTaskStatus() == TaskProcess.revision || task.getTaskStatus() == TaskProcess.correction)) {
task = gtaManager.nextStep(task, gtaNode, Role.auto);
}
boolean solution = config.getBooleanSafe(GTACourseNode.GTASK_SAMPLE_SOLUTION);
mainVC.contextPut("solutionEnabled", solution);
if (solution) {
stepSolution(ureq, task);
} else if (task != null && task.getTaskStatus() == TaskProcess.solution) {
task = gtaManager.nextStep(task, gtaNode, Role.auto);
}
boolean grading = config.getBooleanSafe(GTACourseNode.GTASK_GRADING);
mainVC.contextPut("gradingEnabled", grading);
if (grading) {
stepGrading(ureq, task);
} else if (task != null && task.getTaskStatus() == TaskProcess.grading) {
task = gtaManager.nextStep(task, gtaNode, Role.auto);
}
mainVC.contextPut("changelogconfig", courseModule.isDisplayChangeLog());
resetTask(ureq, task);
nodeLog();
collapsedContents(task);
}
Aggregations