use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project OpenOLAT by OpenOLAT.
the class GTAParticipantController method doSubmitDocuments.
private void doSubmitDocuments(UserRequest ureq, Task task) {
int numOfDocs = getNumberOfSubmittedDocuments();
task = gtaManager.submitTask(task, gtaNode, numOfDocs, Role.user);
showInfo("run.documents.successfully.submitted");
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUMBIT_TASK, assessedIdentity, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
gtaManager.log("Submit", "submit documents", task, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
cleanUpProcess();
process(ureq);
doUpdateAttempts();
// do send e-mail
if (config.getBooleanSafe(GTACourseNode.GTASK_SUBMISSION_MAIL_CONFIRMATION)) {
doSubmissionEmail();
}
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project openolat by klemens.
the class GTACoachRevisionAndCorrectionsController method doCollect.
private void doCollect() {
assignedTask = gtaManager.updateTask(assignedTask, TaskProcess.correction, gtaNode, Role.coach);
gtaManager.log("Collect revision", "revision collected", assignedTask, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
ICourse course = CourseFactory.loadCourse(courseEnv.getCourseResourceableId());
if (businessGroupTask) {
List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
for (Identity identity : identities) {
UserCourseEnvironment userCourseEnv = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
gtaNode.incrementUserAttempts(userCourseEnv, Role.coach);
}
} else {
gtaNode.incrementUserAttempts(assessedUserCourseEnv, Role.coach);
}
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUBMIT_REVISION, assessedGroup == null ? getIdentity() : null, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project openolat by klemens.
the class GTAParticipantController method doSubmitDocuments.
private void doSubmitDocuments(UserRequest ureq, Task task) {
int numOfDocs = getNumberOfSubmittedDocuments();
task = gtaManager.submitTask(task, gtaNode, numOfDocs, Role.user);
showInfo("run.documents.successfully.submitted");
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUMBIT_TASK, assessedIdentity, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
gtaManager.log("Submit", "submit documents", task, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
cleanUpProcess();
process(ureq);
doUpdateAttempts();
// do send e-mail
if (config.getBooleanSafe(GTACourseNode.GTASK_SUBMISSION_MAIL_CONFIRMATION)) {
doSubmissionEmail();
}
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project OpenOLAT by OpenOLAT.
the class GTACoachController method doCollectTask.
private void doCollectTask(UserRequest ureq, Task task) {
File[] submittedDocuments;
if (GTAType.group.name().equals(config.getStringValue(GTACourseNode.GTASK_TYPE))) {
File documentsDir = gtaManager.getSubmitDirectory(courseEnv, gtaNode, assessedGroup);
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
} else {
File documentsDir = gtaManager.getSubmitDirectory(courseEnv, gtaNode, assessedIdentity);
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
}
int numOfDocs = submittedDocuments == null ? 0 : submittedDocuments.length;
task = gtaManager.collectTask(task, gtaNode, numOfDocs);
showInfo("run.documents.successfully.submitted");
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUMBIT_TASK, assessedIdentity, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
gtaManager.log("Collect", "collect documents", task, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
cleanUpProcess();
process(ureq);
doUpdateAttempts();
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project OpenOLAT by OpenOLAT.
the class GTACoachRevisionAndCorrectionsController method doCollect.
private void doCollect() {
assignedTask = gtaManager.updateTask(assignedTask, TaskProcess.correction, gtaNode, Role.coach);
gtaManager.log("Collect revision", "revision collected", assignedTask, getIdentity(), assessedIdentity, assessedGroup, courseEnv, gtaNode);
ICourse course = CourseFactory.loadCourse(courseEnv.getCourseResourceableId());
if (businessGroupTask) {
List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
for (Identity identity : identities) {
UserCourseEnvironment userCourseEnv = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
gtaNode.incrementUserAttempts(userCourseEnv, Role.coach);
}
} else {
gtaNode.incrementUserAttempts(assessedUserCourseEnv, Role.coach);
}
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUBMIT_REVISION, assessedGroup == null ? getIdentity() : null, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
}
Aggregations