Merge pull request #1001 from jloguercio/8050-t

Fix can not import any report on any extension in Gradebook - Refs #8050
1.10.x
José Loguercio 9 years ago
commit bac93b9c43
  1. 10
      main/gradebook/gradebook_flatview.php
  2. 4
      main/gradebook/lib/GradebookUtils.php
  3. 2
      main/gradebook/lib/gradebook_result.class.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;
}

@ -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;
}

@ -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++;

Loading…
Cancel
Save