[svn r19950] logic changes - allow export to PDF in flat view - (partial FS#4073)

skala
Isaac Flores 16 years ago
parent 5cdadaa2e7
commit 0d49b82876
  1. 15
      main/gradebook/gradebook_flatview.php
  2. 2
      main/gradebook/lib/fe/displaygradebook.php

@ -122,7 +122,20 @@ if (isset ($_GET['exportpdf'])) {
$export= $export_pdf_form->exportValues();
$format = $export['orientation'];
$pdf =& new Cezpdf('a4',$format); //format is 'portrait' or 'landscape'
export_pdf($pdf,$printable_data[1],$printable_data[0],$format);
$clear_printable_data=array();
$clear_send_printable_data=array();
//var_dump(count($printable_data[1]));
for ($i=0;$i<count($printable_data[1]);$i++) {
for ($k=0;$k<count($printable_data[1][$i]);$k++) {
$clear_printable_data[]=strip_tags($printable_data[1][$i][$k]);
}
$clear_send_printable_data[]=$clear_printable_data;
$clear_printable_data=array();
}
/*var_dump($printable_data[1]);
var_dump('--------------');
var_dump($clear_send_printable_data);*/
export_pdf($pdf,$clear_send_printable_data,$printable_data[0],$format);
exit;
}
}

@ -162,6 +162,8 @@ class DisplayGradebook
$header .= '<a class="quiz_export_link" href="#" onclick="document.form1b.submit();">'.Display::return_icon('excel.gif', get_lang('ExportAsXLS')).' '.get_lang('ExportAsXLS').'</a>';
$header .= '<a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank">'.Display::return_icon('printmgr.gif', get_lang('Print')).' ' . get_lang('Print') . '</a>';
$header .= '<a href="' . api_get_self() . '?exportpdf=&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('file_pdf.gif', get_lang('ExportAsPDF')).' ' . get_lang('ExportToPDF') . '</a>';
//exportpdf
$header .= '</div>';
if (!$catobj->get_id() == '0') {

Loading…
Cancel
Save