use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project OpenOLAT by OpenOLAT.
the class GTAParticipantRevisionAndCorrectionsController method doSubmitRevisions.
private void doSubmitRevisions() {
File[] submittedDocuments;
int iteration = assignedTask.getRevisionLoop();
if (GTAType.group.name().equals(gtaNode.getModuleConfiguration().getStringValue(GTACourseNode.GTASK_TYPE))) {
File documentsDir = gtaManager.getRevisedDocumentsDirectory(courseEnv, gtaNode, iteration, assessedGroup);
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
} else {
File documentsDir = gtaManager.getRevisedDocumentsDirectory(courseEnv, gtaNode, iteration, getIdentity());
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
}
int numOfDocs = submittedDocuments == null ? 0 : submittedDocuments.length;
assignedTask = gtaManager.submitRevisions(assignedTask, gtaNode, numOfDocs, Role.user);
gtaManager.log("Revision", "revision submitted", assignedTask, getIdentity(), getIdentity(), assessedGroup, courseEnv, gtaNode);
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUBMIT_REVISION, assessedGroup == null ? getIdentity() : null, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
if (businessGroupTask) {
List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
ICourse course = CourseFactory.loadCourse(courseEnv.getCourseResourceableId());
for (Identity identity : identities) {
UserCourseEnvironment userCourseEnv = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
gtaNode.incrementUserAttempts(userCourseEnv, Role.user);
}
} else {
gtaNode.incrementUserAttempts(assessedUserCourseEnv, Role.user);
}
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project openolat by klemens.
the class GTAParticipantRevisionAndCorrectionsController method doSubmitRevisions.
private void doSubmitRevisions() {
File[] submittedDocuments;
int iteration = assignedTask.getRevisionLoop();
if (GTAType.group.name().equals(gtaNode.getModuleConfiguration().getStringValue(GTACourseNode.GTASK_TYPE))) {
File documentsDir = gtaManager.getRevisedDocumentsDirectory(courseEnv, gtaNode, iteration, assessedGroup);
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
} else {
File documentsDir = gtaManager.getRevisedDocumentsDirectory(courseEnv, gtaNode, iteration, getIdentity());
submittedDocuments = documentsDir.listFiles(new SystemFilenameFilter(true, false));
}
int numOfDocs = submittedDocuments == null ? 0 : submittedDocuments.length;
assignedTask = gtaManager.submitRevisions(assignedTask, gtaNode, numOfDocs, Role.user);
gtaManager.log("Revision", "revision submitted", assignedTask, getIdentity(), getIdentity(), assessedGroup, courseEnv, gtaNode);
TaskMultiUserEvent event = new TaskMultiUserEvent(TaskMultiUserEvent.SUBMIT_REVISION, assessedGroup == null ? getIdentity() : null, assessedGroup, getIdentity());
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(event, taskListEventResource);
if (businessGroupTask) {
List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
ICourse course = CourseFactory.loadCourse(courseEnv.getCourseResourceableId());
for (Identity identity : identities) {
UserCourseEnvironment userCourseEnv = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
gtaNode.incrementUserAttempts(userCourseEnv, Role.user);
}
} else {
gtaNode.incrementUserAttempts(assessedUserCourseEnv, Role.user);
}
}
use of org.olat.course.nodes.gta.ui.events.TaskMultiUserEvent in project openolat by klemens.
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();
}
Aggregations