use of org.olat.modules.lecture.LectureBlockStatus in project openolat by klemens.
the class LectureBlockStatusCellRenderer method render.
@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator trans) {
if (cellValue instanceof LectureBlockStatus) {
LectureBlockStatus status = (LectureBlockStatus) cellValue;
target.append(translator.translate(status.name()));
} else if (cellValue instanceof LectureBlock) {
LectureBlock block = (LectureBlock) cellValue;
String status = getStatus(block, translator);
if (StringHelper.containsNonWhitespace(status)) {
target.append(status);
}
}
}
use of org.olat.modules.lecture.LectureBlockStatus in project OpenOLAT by OpenOLAT.
the class LectureBlockRollCallStatusCellRenderer method render.
private void render(StringOutput target, LectureBlockAndRollCall rollCall) {
if (rollCall.isRollCalled()) {
LectureBlockStatus status = rollCall.getStatus();
LectureRollCallStatus rollCallStatus = rollCall.getRollCallStatus();
if (status == LectureBlockStatus.cancelled) {
String title = translator.translate("cancelled");
target.append("<span title='").append(title).append("'><i class='o_icon o_icon-lg o_icon_cancelled'> </i></span>");
} else if (status == LectureBlockStatus.done && (rollCallStatus == LectureRollCallStatus.closed || rollCallStatus == LectureRollCallStatus.autoclosed)) {
renderClosed(target, rollCall);
} else {
String title = translator.translate("in.progress");
target.append("<span title='").append(title).append("'><i class='o_icon o_icon-lg o_icon_status_in_review'> </i></span>");
}
} else if (!rollCall.isCompulsory()) {
String title = translator.translate("rollcall.tooltip.free");
target.append("<span title='").append(title).append("'><i class='o_icon o_icon-lg o_lectures_rollcall_free'> </i></span>");
}
}
use of org.olat.modules.lecture.LectureBlockStatus in project OpenOLAT by OpenOLAT.
the class ParticipantLectureBlocksDataModel method isDataVisible.
private boolean isDataVisible(LectureBlockAndRollCall row) {
LectureBlockStatus status = row.getStatus();
if (LectureBlockStatus.cancelled.equals(status)) {
return false;
}
LectureRollCallStatus rollCallStatus = row.getRollCallStatus();
return status == LectureBlockStatus.done && (rollCallStatus == LectureRollCallStatus.closed || rollCallStatus == LectureRollCallStatus.autoclosed);
}
Aggregations