diff --git a/main/gradebook/gradebook_flatview.php b/main/gradebook/gradebook_flatview.php index 35ddfe29ea..dd10ea083b 100755 --- a/main/gradebook/gradebook_flatview.php +++ b/main/gradebook/gradebook_flatview.php @@ -228,18 +228,28 @@ if (!empty($_GET['export_report']) && switch ($_GET['export_format']) { case 'xls': + ob_start(); $export = new GradeBookResult(); $export->exportCompleteReportXLS($printable_data); + $content = ob_get_contents(); + ob_end_clean(); + echo $content; break; case 'doc': + ob_start(); $export = new GradeBookResult(); $export->exportCompleteReportDOC($printable_data); + ob_end_clean(); exit; break; case 'csv': default: + ob_start(); $export = new GradeBookResult(); $export->exportCompleteReportCSV($printable_data); + $content = ob_get_contents(); + ob_end_clean(); + echo $content; exit; break; } diff --git a/main/gradebook/lib/GradebookUtils.php b/main/gradebook/lib/GradebookUtils.php index e43341bf45..17346c61ce 100644 --- a/main/gradebook/lib/GradebookUtils.php +++ b/main/gradebook/lib/GradebookUtils.php @@ -943,8 +943,12 @@ class GradebookUtils ); $page_format = $params['orientation'] == 'landscape' ? 'A4-L' : 'A4'; + ob_start(); $pdf = new PDF($page_format, $page_format, $pdfParams); $pdf->html_to_pdf_with_template($flatviewtable->return_table()); + $content = ob_get_contents(); + ob_end_clean(); + echo $content; exit; } diff --git a/main/gradebook/lib/gradebook_result.class.php b/main/gradebook/lib/gradebook_result.class.php index b497819a19..efb17e3f7b 100644 --- a/main/gradebook/lib/gradebook_result.class.php +++ b/main/gradebook/lib/gradebook_result.class.php @@ -91,7 +91,7 @@ class GradeBookResult //headers foreach ($data[0] as $header_col) { - $worksheet->SetCellValueByColumnAndRow($line, $column, $header_col); + $worksheet->SetCellValueByColumnAndRow($line, $column, html_entity_decode(strip_tags($header_col))); $column++; } $line++;