Search in sources :

Example 26 with Row

use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.

the class LectureBlockExport method addHeaders_2.

private void addHeaders_2(OpenXMLWorksheet exportSheet) {
    Row headerRow = exportSheet.newRow();
    int pos = 0;
    if (isAdministrativeUser) {
        pos++;
    }
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
        if (userPropertyHandler == null)
            continue;
        pos++;
    }
    headerRow.addCell(pos++, translator.translate("export.header.lectures"));
}
Also used : Row(org.olat.core.util.openxml.OpenXMLWorksheet.Row) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 27 with Row

use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.

the class LectureBlockExport method addFooter.

private void addFooter(OpenXMLWorksheet exportSheet) {
    exportSheet.newRow();
    exportSheet.newRow();
    Row footerRow = exportSheet.newRow();
    int pos = 0;
    if (isAdministrativeUser) {
        pos++;
    }
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
        if (userPropertyHandler == null)
            continue;
        pos++;
    }
    footerRow.addCell(pos, translator.translate("export.footer.lectures.hint"));
}
Also used : Row(org.olat.core.util.openxml.OpenXMLWorksheet.Row) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 28 with Row

use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.

the class LectureBlockExport method addHeaders_3.

private void addHeaders_3(OpenXMLWorksheet exportSheet) {
    Row headerRow = exportSheet.newRow();
    int pos = 0;
    if (isAdministrativeUser) {
        headerRow.addCell(pos++, translator.translate("table.header.username"));
    }
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
        if (userPropertyHandler == null)
            continue;
        String propName = userPropertyHandler.getName();
        headerRow.addCell(pos++, translator.translate("form.name." + propName));
    }
    for (int i = 0; i < lectureBlock.getPlannedLecturesNumber(); i++) {
        headerRow.addCell(pos++, Integer.toString(i + 1));
    }
    if (authorizedAbsenceEnabled) {
        // authorized absence
        headerRow.addCell(pos++, translator.translate("table.header.authorized.absence"));
        // authorized absence reason
        headerRow.addCell(pos++, translator.translate("authorized.absence.reason"));
    }
    // comment
    headerRow.addCell(pos++, translator.translate("table.header.comment"));
}
Also used : Row(org.olat.core.util.openxml.OpenXMLWorksheet.Row) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 29 with Row

use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.

the class LecturesStatisticsExport method addHeadersDetailled.

private void addHeadersDetailled(OpenXMLWorksheet exportSheet) {
    Row headerRow = exportSheet.newRow();
    int pos = 0;
    pos = addHeadersUser(headerRow, pos);
    headerRow.addCell(pos++, translator.translate("table.header.external.ref"));
    headerRow.addCell(pos++, translator.translate("table.header.entry"));
    addHeadersStatistics(headerRow, pos);
}
Also used : Row(org.olat.core.util.openxml.OpenXMLWorksheet.Row)

Example 30 with Row

use of org.olat.core.util.openxml.OpenXMLWorksheet.Row in project openolat by klemens.

the class XlsFlexiTableExporter method createData.

protected void createData(FlexiTableComponent ftC, List<FlexiColumnModel> columns, Translator translator, OpenXMLWorksheet sheet, OpenXMLWorkbook workbook) {
    FlexiTableDataModel<?> dataModel = ftC.getFlexiTableElement().getTableDataModel();
    int numOfRow = dataModel.getRowCount();
    int numOfColumns = columns.size();
    for (int r = 0; r < numOfRow; r++) {
        Row dataRow = sheet.newRow();
        for (int c = 0; c < numOfColumns; c++) {
            FlexiColumnModel cd = columns.get(c);
            createCell(ftC, cd, dataRow, r, c, translator, workbook);
        }
    }
}
Also used : Row(org.olat.core.util.openxml.OpenXMLWorksheet.Row)

Aggregations

Row (org.olat.core.util.openxml.OpenXMLWorksheet.Row)66 UserPropertyHandler (org.olat.user.propertyhandlers.UserPropertyHandler)24 Date (java.util.Date)12 Identity (org.olat.core.id.Identity)12 IOException (java.io.IOException)10 Translator (org.olat.core.gui.translator.Translator)10 OpenXMLWorkbook (org.olat.core.util.openxml.OpenXMLWorkbook)10 OpenXMLWorksheet (org.olat.core.util.openxml.OpenXMLWorksheet)10 OutputStream (java.io.OutputStream)8 CellStyle (org.olat.core.util.openxml.workbookstyle.CellStyle)8 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)8 User (org.olat.core.id.User)6 Formatter (org.olat.core.util.Formatter)6 OpenXMLWorkbookResource (org.olat.core.util.openxml.OpenXMLWorkbookResource)6 AssociateInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.AssociateInteraction)6 ChoiceInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.ChoiceInteraction)6 CustomInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.CustomInteraction)6 DrawingInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.DrawingInteraction)6 EndAttemptInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.EndAttemptInteraction)6 ExtendedTextInteraction (uk.ac.ed.ph.jqtiplus.node.item.interaction.ExtendedTextInteraction)6