Search in sources :

Example 1 with CoachedElementRow

use of org.olat.course.nodes.gta.ui.CoachedElementRow in project openolat by klemens.

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"));
                }
            }
        }
    }
}
Also used : TaskProcess(org.olat.course.nodes.gta.TaskProcess) CoachedElementRow(org.olat.course.nodes.gta.ui.CoachedElementRow) Date(java.util.Date)

Example 2 with CoachedElementRow

use of org.olat.course.nodes.gta.ui.CoachedElementRow 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"));
                }
            }
        }
    }
}
Also used : TaskProcess(org.olat.course.nodes.gta.TaskProcess) CoachedElementRow(org.olat.course.nodes.gta.ui.CoachedElementRow) Date(java.util.Date)

Aggregations

Date (java.util.Date)2 TaskProcess (org.olat.course.nodes.gta.TaskProcess)2 CoachedElementRow (org.olat.course.nodes.gta.ui.CoachedElementRow)2