Use default header see BT#12959

pull/2487/head
jmontoyaa 8 years ago
parent 8bf43270c3
commit 764949d0d9
  1. 11
      main/gradebook/index.php
  2. 8
      main/gradebook/lib/GradebookUtils.php

@ -975,8 +975,6 @@ if (isset($first_time) && $first_time == 1 && api_is_allowed_to_edit(null, true)
if ($action == 'export_table') {
ob_clean();
$sessionName = api_get_session_name(api_get_session_id());
$sessionName = !empty($sessionName) ? " - $sessionName" : '';
$params = array(
'pdf_title' => sprintf(get_lang('GradeFromX'), $courseInfo['name']),
'course_code' => api_get_course_id(),
@ -986,16 +984,11 @@ if (isset($first_time) && $first_time == 1 && api_is_allowed_to_edit(null, true)
'student_info' => api_get_user_info(),
'show_grade_generated_date' => true,
'show_real_course_teachers' => false,
'show_teacher_as_myself' => false
'show_teacher_as_myself' => false,
'orientation' => 'P'
);
$pdf = new PDF('A4', $params['orientation'], $params);
$address = api_get_setting('institution_address');
$phone = api_get_setting('administratorTelephone');
$address = str_replace('\n', '<br />', $address);
$pdf->custom_header = array('html' => "<h5 align='right'>$address <br />$phone</h5>");
$pdf->html_to_pdf_with_template(
$table.
$graph.

@ -1564,9 +1564,6 @@ class GradebookUtils
$table = $gradebooktable->return_table();
$graph = $gradebooktable->getGraph();
$sessionName = api_get_session_name(api_get_session_id());
$sessionName = !empty($sessionName) ? " - $sessionName" : '';
$params = array(
'pdf_title' => sprintf(get_lang('GradeFromX'), $courseInfo['name']),
'session_info' => '',
@ -1593,11 +1590,6 @@ class GradebookUtils
'<br />'.get_lang('Feedback').'<br />
<textarea rows="5" cols="100" ></textarea>';
/*$address = api_get_setting('institution_address');
$phone = api_get_setting('administratorTelephone');
$address = str_replace('\n', '<br />', $address);
$pdf->custom_header = array('html' => "<h5 align='right'>$address <br />$phone</h5>");*/
$result = $pdf->html_to_pdf_with_template(
$content,
$saveToFile,

Loading…
Cancel
Save