use of org.olat.course.assessment.manager.BulkAssessmentTask in project OpenOLAT by OpenOLAT.
the class BulkAssessmentOverviewController method doBulkAssessment.
private Feedback doBulkAssessment(AssessableCourseNode node, Date scheduledDate, BulkAssessmentDatas datas) {
BulkAssessmentTask task = new BulkAssessmentTask(courseEntry.getOlatResource(), node, datas, getIdentity().getKey());
Feedback feedback;
if (scheduledDate == null) {
List<BulkAssessmentFeedback> feedbacks = task.process();
feedback = new Feedback(true, feedbacks);
} else {
taskManager.execute(task, getIdentity(), courseEntry.getOlatResource(), node.getIdent(), scheduledDate);
feedback = new Feedback(false, null);
}
return feedback;
}
use of org.olat.course.assessment.manager.BulkAssessmentTask in project OpenOLAT by OpenOLAT.
the class BulkAssessmentOverviewController method doUpdateBulkAssessment.
private Feedback doUpdateBulkAssessment(Task task, AssessableCourseNode node, Date scheduledDate, BulkAssessmentDatas datas) {
BulkAssessmentTask runnable = new BulkAssessmentTask(courseEntry.getOlatResource(), node, datas, getIdentity().getKey());
Feedback feedback;
if (scheduledDate == null) {
List<BulkAssessmentFeedback> feedbacks = runnable.process();
feedback = new Feedback(true, feedbacks);
if (task != null) {
taskManager.delete(task);
}
} else {
taskManager.updateAndReturn(task, runnable, getIdentity(), scheduledDate);
feedback = new Feedback(false, null);
}
return feedback;
}
use of org.olat.course.assessment.manager.BulkAssessmentTask in project openolat by klemens.
the class BulkAssessmentOverviewController method reloadTaskModel.
private void reloadTaskModel() {
List<Task> tasks = taskManager.getTasks(courseEntry.getOlatResource());
List<TaskData> taskDatas = new ArrayList<TaskData>(tasks.size());
ICourse course = CourseFactory.loadCourse(courseEntry);
Structure structure = course.getRunStructure();
for (Task task : tasks) {
String fullName = null;
if (task.getCreator() != null) {
fullName = userManager.getUserDisplayName(task.getCreator());
}
BulkAssessmentTask runnable = taskManager.getPersistedRunnableTask(task, BulkAssessmentTask.class);
AssessableCourseNode courseNode = (AssessableCourseNode) structure.getNode(runnable.getCourseNodeIdent());
taskDatas.add(new TaskData(task, runnable, courseNode, fullName));
}
taskModel.setObjects(taskDatas);
taskListEl.reset();
flc.contextPut("hasScheduledTasks", Boolean.valueOf(taskDatas.size() > 0));
}
use of org.olat.course.assessment.manager.BulkAssessmentTask in project openolat by klemens.
the class BulkAssessmentToolController method doBulkAssessment.
private Feedback doBulkAssessment(Date scheduledDate, BulkAssessmentDatas datas) {
BulkAssessmentTask task = new BulkAssessmentTask(courseOres, courseNode, datas, getIdentity().getKey());
Feedback feedback;
if (scheduledDate == null) {
List<BulkAssessmentFeedback> feedbacks = task.process();
feedback = new Feedback(true, feedbacks);
} else {
taskManager.execute(task, getIdentity(), courseOres, courseNode.getIdent(), scheduledDate);
feedback = new Feedback(false, null);
}
return feedback;
}
use of org.olat.course.assessment.manager.BulkAssessmentTask in project OpenOLAT by OpenOLAT.
the class BulkAssessmentOverviewController method reloadTaskModel.
private void reloadTaskModel() {
List<Task> tasks = taskManager.getTasks(courseEntry.getOlatResource());
List<TaskData> taskDatas = new ArrayList<TaskData>(tasks.size());
ICourse course = CourseFactory.loadCourse(courseEntry);
Structure structure = course.getRunStructure();
for (Task task : tasks) {
String fullName = null;
if (task.getCreator() != null) {
fullName = userManager.getUserDisplayName(task.getCreator());
}
BulkAssessmentTask runnable = taskManager.getPersistedRunnableTask(task, BulkAssessmentTask.class);
AssessableCourseNode courseNode = (AssessableCourseNode) structure.getNode(runnable.getCourseNodeIdent());
taskDatas.add(new TaskData(task, runnable, courseNode, fullName));
}
taskModel.setObjects(taskDatas);
taskListEl.reset();
flc.contextPut("hasScheduledTasks", Boolean.valueOf(taskDatas.size() > 0));
}
Aggregations