Search in sources :

Example 1 with CorrectionRow

use of org.olat.ims.qti21.ui.assessment.model.CorrectionRow in project openolat by klemens.

the class NotCorrectedFlexiCellRenderer method render.

@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator trans) {
    Object obj = source.getFlexiTableElement().getTableDataModel().getObject(row);
    if (obj instanceof CorrectionRow) {
        CorrectionRow itemRow = (CorrectionRow) obj;
        if (itemRow.isManualCorrection() && itemRow.getNumNotCorrected() > 0) {
            target.append(itemRow.getNumNotCorrected());
            target.append(" <i class='o_icon o_icon_fw o_icon_error'> </i> ");
        }
    } else if (obj instanceof CorrectionIdentityAssessmentItemRow) {
        CorrectionIdentityAssessmentItemRow itemRow = (CorrectionIdentityAssessmentItemRow) obj;
        if (itemRow.isManualCorrection() && itemRow.getManualScore() == null) {
            target.append("<i class='o_icon o_icon_fw o_icon_error'> </i>");
        }
    }
}
Also used : CorrectionIdentityAssessmentItemRow(org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityAssessmentItemRow) CorrectionRow(org.olat.ims.qti21.ui.assessment.model.CorrectionRow)

Example 2 with CorrectionRow

use of org.olat.ims.qti21.ui.assessment.model.CorrectionRow in project OpenOLAT by OpenOLAT.

the class NotCorrectedFlexiCellRenderer method render.

@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator trans) {
    Object obj = source.getFlexiTableElement().getTableDataModel().getObject(row);
    if (obj instanceof CorrectionRow) {
        CorrectionRow itemRow = (CorrectionRow) obj;
        if (itemRow.isManualCorrection() && itemRow.getNumNotCorrected() > 0) {
            target.append(itemRow.getNumNotCorrected());
            target.append(" <i class='o_icon o_icon_fw o_icon_error'> </i> ");
        }
    } else if (obj instanceof CorrectionIdentityAssessmentItemRow) {
        CorrectionIdentityAssessmentItemRow itemRow = (CorrectionIdentityAssessmentItemRow) obj;
        if (itemRow.isManualCorrection() && itemRow.getManualScore() == null) {
            target.append("<i class='o_icon o_icon_fw o_icon_error'> </i>");
        }
    }
}
Also used : CorrectionIdentityAssessmentItemRow(org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityAssessmentItemRow) CorrectionRow(org.olat.ims.qti21.ui.assessment.model.CorrectionRow)

Aggregations

CorrectionIdentityAssessmentItemRow (org.olat.ims.qti21.ui.assessment.model.CorrectionIdentityAssessmentItemRow)2 CorrectionRow (org.olat.ims.qti21.ui.assessment.model.CorrectionRow)2