use of org.olat.course.nodes.gta.AssignmentResponse in project openolat by klemens.
the class GTAAvailableTaskController method doSelect.
private void doSelect(UserRequest ureq, AvailableTask row) {
String taskName = row.getTaskDef().getFilename();
File tasksFolder = gtaManager.getTasksDirectory(courseEnv, gtaNode);
File task = new File(tasksFolder, taskName);
AssignmentResponse response;
if (businessGroupTask) {
response = gtaManager.selectTask(assessedGroup, taskList, gtaNode, task);
} else {
response = gtaManager.selectTask(assessedIdentity, taskList, gtaNode, task);
}
if (response == null || response.getStatus() == AssignmentResponse.Status.error) {
showError("task.assignment.error");
} else if (response.getStatus() == AssignmentResponse.Status.alreadyAssigned) {
showWarning("task.alreadyChosen");
} else if (response == null || response.getStatus() == AssignmentResponse.Status.ok) {
showInfo("task.successfully.assigned");
fireEvent(ureq, Event.DONE_EVENT);
gtaManager.log("Assignment", "task assigned", response.getTask(), getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
doSendConfirmationEmail(response.getTask());
}
}
Aggregations