use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class QTI21ArchiveFormat method writeHeaders_2.
private void writeHeaders_2(OpenXMLWorksheet exportSheet, OpenXMLWorkbook workbook) {
CellStyle headerStyle = workbook.getStyles().getHeaderStyle();
// second header
// reset column counter
int col = 0;
Row header2Row = exportSheet.newRow();
String sequentialNumber = translator.translate("column.header.seqnum");
header2Row.addCell(col++, sequentialNumber, headerStyle);
if (anonymizerCallback != null) {
col++;
} else {
for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
if (userPropertyHandler == null) {
continue;
}
String header = translator.translate(userPropertyHandler.i18nFormElementLabelKey());
header2Row.addCell(col++, header, headerStyle);
}
// add other user and session information
header2Row.addCell(col++, translator.translate("column.header.homepage"), headerStyle);
}
// course node points and passed
if (courseNode instanceof AssessableCourseNode) {
AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
if (assessableCourseNode.hasScoreConfigured()) {
header2Row.addCell(col++, translator.translate("archive.table.header.node.points"), headerStyle);
}
if (assessableCourseNode.hasPassedConfigured()) {
header2Row.addCell(col++, translator.translate("archive.table.header.node.passed"), headerStyle);
}
}
header2Row.addCell(col++, translator.translate("archive.table.header.points"), headerStyle);
header2Row.addCell(col++, translator.translate("archive.table.header.manual.points"), headerStyle);
header2Row.addCell(col++, translator.translate("archive.table.header.final.points"), headerStyle);
header2Row.addCell(col++, translator.translate("column.header.passed"), headerStyle);
if (anonymizerCallback == null) {
header2Row.addCell(col++, translator.translate("column.header.date"), headerStyle);
}
header2Row.addCell(col++, translator.translate("column.header.duration"), headerStyle);
List<AbstractInfos> infos = getItemInfos();
for (int i = 0; i < infos.size(); i++) {
AbstractInfos info = infos.get(i);
if (info instanceof ItemInfos) {
ItemInfos item = (ItemInfos) info;
if (exportConfig.isResponseCols()) {
List<Interaction> interactions = item.getInteractions();
for (int j = 0; j < interactions.size(); j++) {
Interaction interaction = interactions.get(j);
col = interactionArchiveMap.get(interaction.getQtiClassName()).writeHeader2(item.getAssessmentItem(), interaction, i, j, header2Row, col, workbook);
}
}
if (exportConfig.isPointCol()) {
header2Row.addCell(col++, translator.translate("item.score"), headerStyle);
}
if (exportConfig.isCommentCol()) {
header2Row.addCell(col++, translator.translate("item.comment"), headerStyle);
}
if (exportConfig.isTimeCols()) {
if (anonymizerCallback == null) {
header2Row.addCell(col++, translator.translate("item.start"), headerStyle);
}
header2Row.addCell(col++, translator.translate("item.duration"), headerStyle);
}
} else if (numOfSections > 1 && info instanceof SectionInfos) {
SectionInfos section = (SectionInfos) info;
if (!section.getItemInfos().isEmpty()) {
header2Row.addCell(col++, translator.translate("archive.table.header.points"), headerStyle);
}
}
}
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class RepositoryEntryAuditLogExport method addHeaders.
@Override
protected void addHeaders(OpenXMLWorksheet exportSheet) {
Row headerRow = exportSheet.newRow();
int pos = 0;
headerRow.addCell(pos++, translator.translate("export.header.entry", new String[] { entry.getDisplayname() }));
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class AbstractLectureBlockAuditLogExport method addHeader.
private void addHeader(OpenXMLWorksheet exportSheet) {
exportSheet.setHeaderRows(2);
Row headerRow = exportSheet.newRow();
int pos = 0;
// creationDate
headerRow.addCell(pos++, translator.translate("table.header.date"));
// action
headerRow.addCell(pos++, translator.translate("table.header.log.action"));
// repository entry title
headerRow.addCell(pos++, translator.translate("table.header.entry"));
// lecture block title
headerRow.addCell(pos++, translator.translate("table.header.lecture.block"));
// audit block
// lecture block status
headerRow.addCell(pos++, translator.translate("table.header.status"));
// lecture block planned lectures
headerRow.addCell(pos++, translator.translate("table.header.log.planned.lectures"));
// lecture block effective lectures
headerRow.addCell(pos++, translator.translate("table.header.log.effective.lectures"));
// lecture block effective end date
headerRow.addCell(pos++, translator.translate("table.header.log.effective.end.date"));
// audit roll call
// roll call user
headerRow.addCell(pos++, translator.translate("table.header.log.user"));
// roll call attended
headerRow.addCell(pos++, translator.translate("table.header.attended.lectures"));
// roll call absent
headerRow.addCell(pos++, translator.translate("table.header.absent.lectures"));
if (authorizedAbsenceEnabled) {
// roll call authorized
headerRow.addCell(pos++, translator.translate("table.header.authorized.absence"));
// roll call reason
headerRow.addCell(pos++, translator.translate("authorized.absence.reason"));
}
// roll call comment
headerRow.addCell(pos++, translator.translate("rollcall.comment"));
// author
// author
headerRow.addCell(pos++, translator.translate("table.header.log.author"));
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class AbstractLectureBlockAuditLogExport method addContent.
private void addContent(OpenXMLWorksheet exportSheet, OpenXMLWorkbook workbook) {
for (LectureBlockAuditLog logEntry : auditLog) {
int pos = 0;
Row row = exportSheet.newRow();
Date creationDate = logEntry.getCreationDate();
row.addCell(pos++, creationDate, workbook.getStyles().getDateTimeStyle());
row.addCell(pos++, logEntry.getAction());
// repo entry title
row.addCell(pos++, getRepositoryEntryDisplayName(logEntry.getEntryKey()), null);
// lecture block
row.addCell(pos++, getLectureBlockTitle(logEntry.getLectureBlockKey()), null);
// date start / end
// planned / effective
LectureBlock auditBlock = null;
LectureBlockRollCall auditRollCall = null;
LectureParticipantSummary auditSummary = null;
if (logEntry.getRollCallKey() != null) {
auditRollCall = getAuditRollCall(logEntry.getAfter());
}
if (auditRollCall == null) {
if (logEntry.getLectureBlockKey() != null) {
auditBlock = getAuditLectureBlock(logEntry.getAfter());
} else {
auditSummary = getAuditLectureParticipantSummary(logEntry.getAfter());
}
}
if (auditBlock != null) {
if (auditBlock.getStatus() == null) {
pos++;
} else {
row.addCell(pos++, auditBlock.getStatus().name(), null);
}
row.addCell(pos++, auditBlock.getPlannedLecturesNumber(), null);
row.addCell(pos++, auditBlock.getEffectiveLecturesNumber(), null);
row.addCell(pos++, auditBlock.getEffectiveEndDate(), workbook.getStyles().getDateTimeStyle());
} else {
pos += 4;
}
if (auditRollCall != null) {
Long assessedIdentityKey = logEntry.getIdentityKey();
String fullname = userManager.getUserDisplayName(assessedIdentityKey);
row.addCell(pos++, fullname);
row.addCell(pos++, auditRollCall.getLecturesAttendedNumber(), null);
row.addCell(pos++, auditRollCall.getLecturesAbsentNumber(), null);
if (authorizedAbsenceEnabled) {
if (auditRollCall.getAbsenceAuthorized() != null && auditRollCall.getAbsenceAuthorized().booleanValue()) {
row.addCell(pos++, "x");
} else {
pos++;
}
row.addCell(pos++, auditRollCall.getAbsenceReason(), null);
}
row.addCell(pos++, auditRollCall.getComment(), null);
} else if (auditSummary != null) {
Long assessedIdentityKey = logEntry.getIdentityKey();
String fullname = userManager.getUserDisplayName(assessedIdentityKey);
row.addCell(pos++, fullname);
pos += 2;
if (authorizedAbsenceEnabled) {
pos += 2;
}
String summaryComment = getSummaryComment(getAuditLectureParticipantSummary(logEntry.getBefore()), auditSummary);
row.addCell(pos++, summaryComment, null);
} else {
pos += 4;
if (authorizedAbsenceEnabled) {
pos += 2;
}
}
Long authorKey = logEntry.getAuthorKey();
if (authorKey != null) {
String fullname = userManager.getUserDisplayName(authorKey);
row.addCell(pos++, fullname);
}
}
}
use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.
the class IdentityAuditLogExport method addHeaders.
@Override
protected void addHeaders(OpenXMLWorksheet exportSheet) {
Row headerRow = exportSheet.newRow();
int pos = 0;
headerRow.addCell(pos++, userManager.getUserDisplayName(identity));
}
Aggregations