Search in sources :

Example 1 with LecturesBlockPDFExport

use of org.olat.modules.lecture.ui.export.LecturesBlockPDFExport in project OpenOLAT by OpenOLAT.

the class TeacherLecturesTableController method doExportAttendanceList.

private void doExportAttendanceList(UserRequest ureq, LectureBlock row) {
    LectureBlock lectureBlock = lectureService.getLectureBlock(row);
    List<Identity> participants = lectureService.getParticipants(lectureBlock);
    List<LectureBlockRollCall> rollCalls = lectureService.getRollCalls(row);
    try {
        LecturesBlockPDFExport export = new LecturesBlockPDFExport(lectureBlock, authorizedAbsenceEnabled, getTranslator());
        export.setTeacher(userManager.getUserDisplayName(getIdentity()));
        export.create(participants, rollCalls);
        ureq.getDispatchResult().setResultingMediaResource(export);
    } catch (IOException | TransformerException e) {
        logError("", e);
    }
}
Also used : LectureBlock(org.olat.modules.lecture.LectureBlock) LectureBlockRollCall(org.olat.modules.lecture.LectureBlockRollCall) LecturesBlockPDFExport(org.olat.modules.lecture.ui.export.LecturesBlockPDFExport) IOException(java.io.IOException) Identity(org.olat.core.id.Identity) TransformerException(javax.xml.transform.TransformerException)

Example 2 with LecturesBlockPDFExport

use of org.olat.modules.lecture.ui.export.LecturesBlockPDFExport in project openolat by klemens.

the class TeacherLecturesTableController method doExportAttendanceList.

private void doExportAttendanceList(UserRequest ureq, LectureBlock row) {
    LectureBlock lectureBlock = lectureService.getLectureBlock(row);
    List<Identity> participants = lectureService.getParticipants(lectureBlock);
    List<LectureBlockRollCall> rollCalls = lectureService.getRollCalls(row);
    try {
        LecturesBlockPDFExport export = new LecturesBlockPDFExport(lectureBlock, authorizedAbsenceEnabled, getTranslator());
        export.setTeacher(userManager.getUserDisplayName(getIdentity()));
        export.create(participants, rollCalls);
        ureq.getDispatchResult().setResultingMediaResource(export);
    } catch (IOException | TransformerException e) {
        logError("", e);
    }
}
Also used : LectureBlock(org.olat.modules.lecture.LectureBlock) LectureBlockRollCall(org.olat.modules.lecture.LectureBlockRollCall) LecturesBlockPDFExport(org.olat.modules.lecture.ui.export.LecturesBlockPDFExport) IOException(java.io.IOException) Identity(org.olat.core.id.Identity) TransformerException(javax.xml.transform.TransformerException)

Aggregations

IOException (java.io.IOException)2 TransformerException (javax.xml.transform.TransformerException)2 Identity (org.olat.core.id.Identity)2 LectureBlock (org.olat.modules.lecture.LectureBlock)2 LectureBlockRollCall (org.olat.modules.lecture.LectureBlockRollCall)2 LecturesBlockPDFExport (org.olat.modules.lecture.ui.export.LecturesBlockPDFExport)2