use of org.olat.course.nodes.gta.TaskProcess in project OpenOLAT by OpenOLAT.
the class GTAParticipantRevisionAndCorrectionsController method initRevisionProcess.
private void initRevisionProcess(UserRequest ureq) {
List<String> revisionStepNames = new ArrayList<>();
mainVC.contextPut("previousRevisions", revisionStepNames);
if (assignedTask.getRevisionLoop() > 1) {
for (int i = 1; i < assignedTask.getRevisionLoop(); i++) {
// revisions
setRevisionIteration(ureq, i, revisionStepNames);
}
}
TaskProcess status = assignedTask.getTaskStatus();
if (status == TaskProcess.revision) {
// assessed user can return some revised documents
setUploadRevision(ureq, assignedTask);
} else if (status == TaskProcess.correction) {
// coach can return some corrections
setRevision(ureq, "revisions", assignedTask.getRevisionLoop());
setCorrections(ureq, "corrections", assignedTask.getRevisionLoop());
} else {
int lastRevision = assignedTask.getRevisionLoop();
setRevisionIteration(ureq, lastRevision, revisionStepNames);
}
}
use of org.olat.course.nodes.gta.TaskProcess in project OpenOLAT by OpenOLAT.
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 OpenOLAT.
the class SubmissionDateCellRenderer method render.
@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator trans) {
Object object = source.getFlexiTableElement().getTableDataModel().getObject(row);
if (object instanceof CoachedElementRow) {
CoachedElementRow ciRow = (CoachedElementRow) object;
TaskProcess status = ciRow.getTaskStatus();
if (status == null || status == TaskProcess.assignment || status == TaskProcess.submit) {
// do nothing
} else {
Date date = ciRow.getSyntheticSubmissionDate();
if (date != null) {
if (ciRow.getHasSubmittedDocuments()) {
target.append(formatter.formatDate(date));
} else {
target.append(translator.translate("no.submission"));
}
}
}
}
}
use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTAParticipantController method setRevisionsAndCorrections.
private void setRevisionsAndCorrections(UserRequest ureq, Task task) {
if (task.getRevisionLoop() > 0) {
revisionDocumentsCtrl = new GTAParticipantRevisionAndCorrectionsController(ureq, getWindowControl(), userCourseEnv, task, gtaNode, assessedGroup, taskListEventResource);
listenTo(revisionDocumentsCtrl);
mainVC.put("revisionDocs", revisionDocumentsCtrl.getInitialComponent());
String msg = null;
if (task.getTaskStatus() == TaskProcess.revision) {
// message about rejected work is displayed in GTAParticipantRevisionAndCorrectionsController
} else if (task.getTaskStatus() == TaskProcess.correction) {
msg = "<i class='o_icon o_icon_info'> </i> " + translate("run.review.waiting");
} else {
msg = "<i class='o_icon o_icon_ok'> </i> " + translate("run.review.closed");
}
mainVC.contextPut("revisionMessage", msg);
} else {
TaskProcess status = task.getTaskStatus();
if (status == TaskProcess.solution || status == TaskProcess.grading || status == TaskProcess.graded) {
mainVC.contextPut("skipRevisions", Boolean.TRUE);
}
}
}
use of org.olat.course.nodes.gta.TaskProcess in project openolat by klemens.
the class GTAParticipantRevisionAndCorrectionsController method initRevisionProcess.
private void initRevisionProcess(UserRequest ureq) {
List<String> revisionStepNames = new ArrayList<>();
mainVC.contextPut("previousRevisions", revisionStepNames);
if (assignedTask.getRevisionLoop() > 1) {
for (int i = 1; i < assignedTask.getRevisionLoop(); i++) {
// revisions
setRevisionIteration(ureq, i, revisionStepNames);
}
}
TaskProcess status = assignedTask.getTaskStatus();
if (status == TaskProcess.revision) {
// assessed user can return some revised documents
setUploadRevision(ureq, assignedTask);
} else if (status == TaskProcess.correction) {
// coach can return some corrections
setRevision(ureq, "revisions", assignedTask.getRevisionLoop());
setCorrections(ureq, "corrections", assignedTask.getRevisionLoop());
} else {
int lastRevision = assignedTask.getRevisionLoop();
setRevisionIteration(ureq, lastRevision, revisionStepNames);
}
}
Aggregations